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

Add vzalloc() and vmalloc() functions to alloc-with-multiplies check in checkpatch.pl #342

Open
GustavoARSilva opened this issue Sep 12, 2023 · 1 comment
Assignees

Comments

@GustavoARSilva
Copy link
Collaborator

Update checkpatch.pl to check for instances of vzalloc()/vmalloc() that could be replaced with their 2-factor multiplication argument form vcalloc()/vmalloc_array (). So, they can be caught before new code is even committed.

Related to:
#187

@GustavoARSilva GustavoARSilva self-assigned this Sep 12, 2023
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 12, 2023
… check

vmalloc() and vzalloc() functions have now 2-factor multiplication
argument forms vmalloc_array() and vcalloc(), correspondingly.

Add alloc-with-multiplies checks for these new functions.

Link: KSPP#342
Signed-off-by: Gustavo A. R. Silva <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 13, 2023
… check

vmalloc() and vzalloc() functions have now 2-factor multiplication
argument forms vmalloc_array() and vcalloc(), correspondingly.

Add alloc-with-multiplies checks for these new functions.

Simplify the original codes repeated else to use a hash.

Link: KSPP#342

Original-patch-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/lkml/ZQCaO+tYycDxVLy7@work/
Signed-off-by: Joe Perches <[email protected]>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this issue Sep 14, 2023
… check

vmalloc() and vzalloc() functions have now 2-factor multiplication
argument forms vmalloc_array() and vcalloc(), correspondingly.

Add alloc-with-multiplies checks for these new functions.

Simplify the original codes repeated else to use a hash.

Link: KSPP#342

Link: https://lore.kernel.org/lkml/ZQCaO+tYycDxVLy7@work/
Link: https://lkml.kernel.org/r/edb667e19211652a32ef6069159bb85dbc3bcdfc.1694636817.git.joe@perches.com
Original-patch-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
@kees
Copy link

kees commented Feb 7, 2024

Did this get sent upstream? I see the earlier commit 73f1d07, though?

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

No branches or pull requests

2 participants