staging: comedi: Remove useless cast.
authorVarsha Rao <rvarsha016@gmail.com>
Thu, 9 Mar 2017 14:19:01 +0000 (19:49 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 18:07:57 +0000 (19:07 +0100)
Variable dac_data is already declared as of type u8. Again explicit type
casting of dac_data to u8, is not required. Hence this patch removes it
by using the following coccinelle script.

@@
type T;
T *ptr;
T p;
@@
(
- (T *)(&p)
+ &p
|
- (T *)ptr
+ ptr
|
- (T *)(ptr)
+ ptr
|
- (T)(p)
+ p
)

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/s626.c

index 452337814da59306ea54bc94d8e256ff31a92174..0b189c5b62d3926a7df13994730a37b6ecfdb735 100644 (file)
@@ -599,7 +599,7 @@ static int s626_write_trim_dac(struct comedi_device *dev,
         * Save the new setpoint in case the application needs to read it back
         * later.
         */
-       devpriv->trim_setpoint[logical_chan] = (u8)dac_data;
+       devpriv->trim_setpoint[logical_chan] = dac_data;
 
        /* Map logical channel number to physical channel number. */
        chan = s626_trimchan[logical_chan];