From: Dan Williams <dan.j.williams@intel•com>
To: Cedric Xing <cedric.xing@intel•com>, <linux@weissschuh•net>,
<dan.j.williams@intel•com>
Cc: <sfr@canb•auug.org.au>,
<sathyanarayanan.kuppuswamy@linux•intel.com>,
<yilun.xu@intel•com>, <sameo@rivosinc•com>, <aik@amd•com>,
<suzuki.poulose@arm•com>, <steven.price@arm•com>,
<lukas@wunner•de>, <greg@kroah•com>, <linux-next@vger•kernel.org>,
Cedric Xing <cedric.xing@intel•com>
Subject: Re: [PATCH v2] tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase
Date: Tue, 13 May 2025 11:37:51 -0700 [thread overview]
Message-ID: <6823917fc70a7_29032946b@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20250513164154.10109-1-cedric.xing@intel.com>
Cedric Xing wrote:
> Commit 9bec944506fa ("sysfs: constify attribute_group::bin_attrs") enforced
> the ro-after-init principle by making elements of bin_attrs_new pointing to
> const.
>
> To align with this change, introduce a temporary variable `bap` within the
> initialization loop. This improves code clarity by explicitly marking the
> initialization scope and eliminates the need for type casts when assigning
> to bin_attrs_new.
>
> Signed-off-by: Cedric Xing <cedric.xing@intel•com>
Looks good to me, added to linux-next for more exposure.
prev parent reply other threads:[~2025-05-13 18:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 15:47 [PATCH] tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase Cedric Xing
2025-05-13 16:24 ` Thomas Weißschuh
2025-05-13 16:41 ` [PATCH v2] " Cedric Xing
2025-05-13 16:49 ` Thomas Weißschuh
2025-05-13 17:27 ` dan.j.williams
2025-05-13 17:29 ` dan.j.williams
2025-05-13 18:25 ` Thomas Weißschuh
2025-05-13 18:37 ` Dan Williams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6823917fc70a7_29032946b@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel$(echo .)com \
--cc=aik@amd$(echo .)com \
--cc=cedric.xing@intel$(echo .)com \
--cc=greg@kroah$(echo .)com \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux@weissschuh$(echo .)net \
--cc=lukas@wunner$(echo .)de \
--cc=sameo@rivosinc$(echo .)com \
--cc=sathyanarayanan.kuppuswamy@linux$(echo .)intel.com \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=steven.price@arm$(echo .)com \
--cc=suzuki.poulose@arm$(echo .)com \
--cc=yilun.xu@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox