Skip to content
Commit b0ca403a authored by Cedric Xing's avatar Cedric Xing Committed by Dan Williams
Browse files

tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const...


tsm-mr: Fix init breakage after bin_attrs constification by scoping non-const pointers to init phase

Commit 9bec9445 ("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: default avatarCedric Xing <cedric.xing@intel.com>
Link: https://patch.msgid.link/20250513164154.10109-1-cedric.xing@intel.com


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 1f450730
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment