Skip to contentSkip to conversation

staging: comedi: dyna_pci10xx: fixed check patch warnings about memory barrier comments

PATCH In review devendra sharma 2 participants 2 messages Dec 19, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: comedi: dyna_pci10xx: fixed check patch warnings about memory barrier comments

Added comments before memory barrier

---
 drivers/staging/comedi/drivers/dyna_pci10xx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/staging/comedi/drivers/dyna_pci10xx.c +3 -0
index c9eb26f..c3b5236 100644
@@ -122,6 +122,7 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
 
 	mutex_lock(&devpriv->mutex);
 	for (n = 0; n < insn->n; n++) {
+		/*multi-processor memory barrier*/
 		smp_mb();
 		/* trigger conversion and write data */
 		outw_p(data[n], dev->iobase);
@@ -141,6 +142,7 @@ static int dyna_pci10xx_di_insn_bits(struct comedi_device *dev,
 	u16 d = 0;
 
 	mutex_lock(&devpriv->mutex);
+	/*multi-processor memory barrier*/
 	smp_mb();
 	d = inw_p(devpriv->BADR3);
 	udelay(10);
@@ -161,6 +163,7 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev,
 
 	mutex_lock(&devpriv->mutex);
 	if (comedi_dio_update_state(s, data)) {
+		/*multi-processor memory barrier*/
 		smp_mb();
 		outw_p(s->state, devpriv->BADR3);
 		udelay(10);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · devendra sharma

Added comments before memory barrier

---
  drivers/staging/comedi/drivers/dyna_pci10xx.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/staging/comedi/drivers/dyna_pci10xx.c +0 -0
index c9eb26f..c3b5236 100644

drivers/staging/comedi/drivers/dyna_pci10xx.c static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev, · line 126

Quoted 5 lines
drivers/staging/comedi/drivers/dyna_pci10xx.c +1 -0
@@ -122,6 +122,7 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
 
  	mutex_lock(&devpriv->mutex);
  	for (n = 0; n < insn->n; n++) {
+		/*multi-processor memory barrier*/
  		smp_mb();

Thanks for the effort, but these comments add no useful information and serve only to silence the checkpatch warnings. Also, there is no space after the '/*' and before the '*/'.

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