mirror of https://gitee.com/openkylin/linux.git
staging: comedi: adl_pci6208: remove redundant initialization of 'val'
Variable 'val' is initialized with a value that is never read, it is updated with a new value again after intitialization. Remove the redundant initialization and move the declaration and assignment into the scope of the for-loop. Cleans up clang warning: drivers/staging/comedi/drivers/adl_pci6208.c:61:15: warning: Value stored to 'val' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8b6f053790
commit
b8461ff774
|
@ -58,12 +58,11 @@ static int pci6208_ao_insn_write(struct comedi_device *dev,
|
||||||
unsigned int *data)
|
unsigned int *data)
|
||||||
{
|
{
|
||||||
unsigned int chan = CR_CHAN(insn->chanspec);
|
unsigned int chan = CR_CHAN(insn->chanspec);
|
||||||
unsigned int val = s->readback[chan];
|
|
||||||
int ret;
|
int ret;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < insn->n; i++) {
|
for (i = 0; i < insn->n; i++) {
|
||||||
val = data[i];
|
unsigned int val = data[i];
|
||||||
|
|
||||||
/* D/A transfer rate is 2.2us */
|
/* D/A transfer rate is 2.2us */
|
||||||
ret = comedi_timeout(dev, s, insn, pci6208_ao_eoc, 0);
|
ret = comedi_timeout(dev, s, insn, pci6208_ao_eoc, 0);
|
||||||
|
|
Loading…
Reference in New Issue