Skip to contentSkip to conversation

comedi: comedi_parport: Fix coding style - use BIT macro

PATCH In review Ranjith T 2 participants 5 messages Nov 9, 2015 – Nov 11, 2015 Staging

lore
Share & tools
lore

Ranjith T

author
#0 lore raw

PATCH 1/1 comedi: comedi_parport: Fix coding style - use BIT macro

BIT macro is used for defining BIT location instead of shifting operator - coding style issue

---
 drivers/staging/comedi/drivers/comedi_parport.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/comedi_parport.c +2 -2
index 15a4093..1bf8ddc 100644
@@ -75,8 +75,8 @@
 #define PARPORT_DATA_REG	0x00
 #define PARPORT_STATUS_REG	0x01
 #define PARPORT_CTRL_REG	0x02
-#define PARPORT_CTRL_IRQ_ENA	(1 << 4)
-#define PARPORT_CTRL_BIDIR_ENA	(1 << 5)
+#define PARPORT_CTRL_IRQ_ENA	BIT(4)
+#define PARPORT_CTRL_BIDIR_ENA	BIT(5)
 
 static int parport_data_reg_insn_bits(struct comedi_device *dev,
 				      struct comedi_subdevice *s,
Signature · 1 line
1.7.10.4
author
#1 lore raw

Is this patch is fine?.

Thanks,
Ranjith T.

Quoted 25 lines · Ranjith T

BIT macro is used for defining BIT location instead of shifting operator - coding style issue

---
 drivers/staging/comedi/drivers/comedi_parport.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/comedi_parport.c +2 -3
index 15a4093..1bf8ddc 100644
@@ -75,8 +75,8 @@
 #define PARPORT_DATA_REG       0x00
 #define PARPORT_STATUS_REG     0x01
 #define PARPORT_CTRL_REG       0x02
-#define PARPORT_CTRL_IRQ_ENA   (1 << 4)
-#define PARPORT_CTRL_BIDIR_ENA (1 << 5)
+#define PARPORT_CTRL_IRQ_ENA   BIT(4)
+#define PARPORT_CTRL_BIDIR_ENA BIT(5)
 
 static int parport_data_reg_insn_bits(struct comedi_device *dev,
                                      struct comedi_subdevice *s,
--

1.7.10.4

#2 lore raw
Quoted 4 lines · Ranjith T

Is this patch is fine?.

Thanks,
Ranjith T.

Fine apart from the "Signed-off-by" line. I'm guessing your last name isn't really "T".

Quoted 26 lines · Ranjith T
Quoted 25 lines

BIT macro is used for defining BIT location instead of shifting operator - coding style issue

---
  drivers/staging/comedi/drivers/comedi_parport.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/comedi_parport.c +2 -3
index 15a4093..1bf8ddc 100644
@@ -75,8 +75,8 @@
  #define PARPORT_DATA_REG       0x00
  #define PARPORT_STATUS_REG     0x01
  #define PARPORT_CTRL_REG       0x02
-#define PARPORT_CTRL_IRQ_ENA   (1 << 4)
-#define PARPORT_CTRL_BIDIR_ENA (1 << 5)
+#define PARPORT_CTRL_IRQ_ENA   BIT(4)
+#define PARPORT_CTRL_BIDIR_ENA BIT(5)
 
  static int parport_data_reg_insn_bits(struct comedi_device *dev,
                                       struct comedi_subdevice *s,
--

1.7.10.4

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
author
#3 lore raw

Actually my name is Ranjith and father name is Thangavel. So I used to mention my name as Ranjith T.

Thanks,
Ranjith T

Quoted 45 lines · Ian Abbott
Quoted 5 lines · Ranjith T

Is this patch is fine?.

Thanks,
Ranjith T.

Fine apart from the "Signed-off-by" line. I'm guessing your last name isn't really "T".

Quoted 24 lines · Ranjith T
Quoted 23 lines

BIT macro is used for defining BIT location instead of shifting operator - coding style issue

---
  drivers/staging/comedi/drivers/comedi_parport.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/comedi_parport.c +2 -2
index 15a4093..1bf8ddc 100644
@@ -75,8 +75,8 @@
  #define PARPORT_DATA_REG       0x00
  #define PARPORT_STATUS_REG     0x01
  #define PARPORT_CTRL_REG       0x02
-#define PARPORT_CTRL_IRQ_ENA   (1 << 4)
-#define PARPORT_CTRL_BIDIR_ENA (1 << 5)
+#define PARPORT_CTRL_IRQ_ENA   BIT(4)
+#define PARPORT_CTRL_BIDIR_ENA BIT(5)
 
Quoted 4 lines
Quoted 4 lines
drivers/staging/comedi/drivers/comedi_parport.c +0 -1
  static int parport_data_reg_insn_bits(struct comedi_device *dev,
                                       struct comedi_subdevice *s,
--

1.7.10.4

--
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=-
-=( Web: http://www.mev.co.uk/ )=-

#4 lore raw
Quoted 2 lines · Ranjith T

Actually my name is Ranjith and father name is Thangavel. So I used to mention my name as Ranjith T.

How do you write your name on legal documents? That is what you should use on the patch's "Signed-off-by:" line, and on the email's "From:" line.

Thanks.

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-