lkml.org 
[lkml]   [2016]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] pwm: core: use bitops's BIT macro
Date
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
\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.031 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site