lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 26 Aug 2016 09:40:50 +0200
From:   Olliver Schinagl <oliver@...inagl.nl>
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Olliver Schinagl <oliver@...inagl.nl>
Subject: [PATCH 1/1] pwm: core: use bitops's BIT macro

Checkpatch warns about not using the BIT() macro. Replace 1 << bit with
BIT().

Signed-off-by: Olliver Schinagl <oliver@...inagl.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ