From a2be06266b65c17df7ec5d1331670eb61b848993 Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Thu, 9 Mar 2017 19:49:01 +0530 Subject: [PATCH] staging: comedi: Remove useless cast. 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 Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s626.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 452337814da5..0b189c5b62d3 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -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]; -- 2.30.2