Skip to content

plugins/wdc: fix typed malloc size expressions for log buffers#3526

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
bellis-ibm:fix-plugins-wdc-sizeof
Jul 1, 2026
Merged

plugins/wdc: fix typed malloc size expressions for log buffers#3526
igaw merged 1 commit into
linux-nvme:masterfrom
bellis-ibm:fix-plugins-wdc-sizeof

Conversation

@bellis-ibm

@bellis-ibm bellis-ibm commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Use pointee-sized allocations for structured log buffers in
nvme_get_hw_rev_log() and nvme_get_print_ocp_cloud_smart_log(),
and simplify raw byte-buffer allocation in wdc_enc_submit_move_data().

This eliminates clang-analyzer allocator-size mismatch warnings and
improves maintainability by typing allocation sizes directly
to the destination pointer type.

Signed-off-by: Brooke Ellis Brooke.Ellis@ibm.com

@bellis-ibm bellis-ibm force-pushed the fix-plugins-wdc-sizeof branch from 956e7d8 to 289f6c7 Compare June 30, 2026 18:13
@bellis-ibm bellis-ibm marked this pull request as ready for review June 30, 2026 20:14
Use pointee-sized allocations for structured log buffers in
nvme_get_hw_rev_log() and nvme_get_print_ocp_cloud_smart_log(), and
simplify raw byte-buffer allocation in wdc_enc_submit_move_data().

This eliminates clang-analyzer allocator-size mismatch warnings and
improves maintainability by typing allocation sizes directly to the
destination pointer type.

Signed-off-by: Brooke Ellis <Brooke.Ellis@ibm.com>
@igaw igaw force-pushed the fix-plugins-wdc-sizeof branch from 289f6c7 to fd26c95 Compare July 1, 2026 15:40
@igaw

igaw commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

reformatted commit message.

@igaw igaw merged commit 736b62c into linux-nvme:master Jul 1, 2026
32 checks passed
@igaw

igaw commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants