Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins/wdc: Fix code scanning alert #2211

Merged
merged 2 commits into from
Mar 25, 2024
Merged

Conversation

ikegami-t
Copy link
Contributor

Fix the comparison of narrow type with wide type in loop condition.
Note: Include some coding style errors fixes.

@ikegami-t
Copy link
Contributor Author

Fix for the issue #2204.

__u32 chunckSize = WDC_DE_VU_READ_BUFFER_STANDARD_OFFSET;
__u32 maximumTransferLength = 0;
__u32 buffSize = 0;
__u64 offsetIdx = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not mix whitespace changes with code changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for mixing the changes everytime so just split the changes to commits.

@igaw
Copy link
Collaborator

igaw commented Feb 13, 2024

Please use a more fitting commit title.

Delete the loop variable since not changed the value.
Also delete the some variables initial values not necessary.

Signed-off-by: Tokunori Ikegami <[email protected]>
Fix the comparison of narrow type with wide type in loop condition.

Signed-off-by: Tokunori Ikegami <[email protected]>
@ikegami-t
Copy link
Contributor Author

Sorry for too late to do this and just fixed the commit subject as below.

- plugins/wdc: Change for loop index variable type to __u32
+ plugins/wdc: Fix narrow index variable type in for loop to __u32

@igaw igaw merged commit 8d1292d into linux-nvme:master Mar 25, 2024
16 checks passed
@igaw
Copy link
Collaborator

igaw commented Mar 25, 2024

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