7 Commits
Author SHA1 Message Date
Rikard Falkeborn c55cdc5cd6 const_structs.checkpatch: add frequently used ops structs
Add commonly used structs (>50 instances) which are always or almost
always const.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Rikard Falkeborn <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2022-01-20 08:52:54 +02:00
Rikard Falkeborn 3e421469dd const_structs.checkpatch: add a few sound ops structs
Add a couple of commonly used (>50 instances) sound ops structs that are
typically const.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Rikard Falkeborn <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2021-11-09 10:02:50 -08:00
Rikard Falkeborn c12093a114 const_structs.checkpatch: add pinctrl_ops and pinmux_ops
All usages of include/linux of these are const pointers, and all instances
in the kernel except one, that are not const can be made const (patches
have been posted for those separately).

Signed-off-by: Rikard Falkeborn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Manivannan Sadhasivam <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Andreas Färber <[email protected]>
Cc: Rikard Falkeborn <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
2020-10-16 11:11:21 -07:00
Rikard Falkeborn ed4761f780 const_structs.checkpatch: add phy_ops
All usages of phy_ops in include/linux uses const phy_ops * and all
instances of phy_ops in the kernel that are not const already can be made
const (patches have been posted for those separately).

Suggested-by: Joe Perches <[email protected]>
Signed-off-by: Rikard Falkeborn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Kishon Vijay Abraham I <[email protected]>
Cc: Vinod Koul <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
2020-10-16 11:11:21 -07:00
Joe Perches d2b02165df const_structs.checkpatch: add regulator_ops
Add regulator_ops to expected to be const list.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Pi-Hsun Shih <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Benson Leung <[email protected]>
Cc: Enric Balletbo i Serra <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Rikard Falkeborn <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
2020-08-07 11:33:21 -07:00
Joe Perches 15c03cfeab const_structs.checkpatch: add frequently used from Julia Lawall's list
Using const is generally a good idea.

Julia Lawall has created a list of always const and almost always const
structs in the kernel sources.

Link: https://lkml.org/lkml/2016/8/28/95

Add the most frequently used (> 50 cases) that are almost always or
always const.

Link: http://lkml.kernel.org/r/1e16020f8027654db0095bbfbcc11da51025365c.1472664220.git.joe@perches.com
Signed-off-by: Joe Perches <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-10-11 15:06:30 -07:00
Joe Perches bf1fa1dae6 checkpatch: externalize the structs that should be const
Make it easier to add new structs that should be const.

Link: http://lkml.kernel.org/r/e5a8da43e7c11525bafbda1ca69a8323614dd942.1472664220.git.joe@perches.com
Signed-off-by: Joe Perches <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2016-10-11 15:06:30 -07:00