linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] pwm: core: use bitops's BIT macro
@ 2016-08-26  7:40 Olliver Schinagl
  0 siblings, 0 replies; only message in thread
From: Olliver Schinagl @ 2016-08-26  7:40 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-pwm, linux-kernel, Olliver Schinagl

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-26  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26  7:40 [PATCH 1/1] pwm: core: use bitops's BIT macro Olliver Schinagl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).