mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
staging: comedi: rewrite the right hand side of an assignment
This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
410c944eda
commit
f559108b4b
1 changed files with 2 additions and 2 deletions
|
|
@ -579,7 +579,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev,
|
|||
|
||||
/* read data */
|
||||
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
|
||||
d = d >> 3; /* low 3 bits are marker lines */
|
||||
d >>= 3; /* low 3 bits are marker lines */
|
||||
|
||||
/* convert bipolar data to comedi unsigned data */
|
||||
if (comedi_range_is_bipolar(s, range))
|
||||
|
|
@ -616,7 +616,7 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
|
|||
}
|
||||
|
||||
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
|
||||
d = d >> 3; /* low 3 bits are marker lines */
|
||||
d >>= 3; /* low 3 bits are marker lines */
|
||||
|
||||
/* convert bipolar data to comedi unsigned data */
|
||||
if (comedi_range_is_bipolar(s, range))
|
||||
|
|
|
|||
Loading…
Reference in a new issue