Messages in this thread Patch in this message | | | From | Olliver Schinagl <> | Subject | [PATCH 1/1] pwm: core: use bitops's BIT macro | Date | Fri, 26 Aug 2016 09:40:50 +0200 |
| |
Checkpatch warns about not using the BIT() macro. Replace 1 << bit with BIT().
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> --- Hi Thierry,
I submitted this patch a year ago and you said you didn't much care for it. After a year however, have you changed your mind? I notice it's becoming mandatory in more and more subsystems. Checkpatch is unhappy about it and isn't it likely to be mandatory throughout the entire kernel at some point?
If you still think it should be omitted however, feel free to /dev/null this patch :)
Olliver
Changes since v1: - Rebased the patch
include/linux/pwm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/pwm.h b/include/linux/pwm.h index f1bbae0..a8b70ac 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -1,6 +1,7 @@ #ifndef __LINUX_PWM_H #define __LINUX_PWM_H +#include <linux/bitops.h> #include <linux/err.h> #include <linux/mutex.h> #include <linux/of.h> @@ -43,8 +44,8 @@ struct pwm_args { }; enum { - PWMF_REQUESTED = 1 << 0, - PWMF_EXPORTED = 1 << 1, + PWMF_REQUESTED = BIT(0), + PWMF_EXPORTED = BIT(1), }; /* -- 2.8.1
| |