lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXHbyMoH-EQFwOhaMRixdcEkzsxCDqFW95jcyRabb3WeoOqcA@mail.gmail.com>
Date:	Wed, 28 Jan 2015 22:44:15 +0100
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Ian Abbott <abbotti@....co.uk>,
	H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Chase Southwood <chase.southwood@...il.com>,
	Conrad Meyer <cemeyer@...edu>, Fred Akers <knivey@...ops.net>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: comedi: drivers: addi-data: hwdrv_apci1500:
 Change variables that is never used

2015-01-28 22:42 GMT+01:00 Rickard Strandqvist
<rickard_strandqvist@...ctrumdigital.se>:
> Variable ar assigned a value that is never used.
> Instead use the struct variable of the same name.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
> ---
>  drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c |   12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
> index bfa9228..faa71a9 100644
> --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
> +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
> @@ -467,8 +467,6 @@ static int apci1500_di_write(struct comedi_device *dev,
>                              unsigned int *data)
>  {
>         struct apci1500_private *devpriv = dev->private;
> -       int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
> -               0, i_RegValue;
>
>         switch (data[0]) {
>         case START:
> @@ -499,11 +497,9 @@ static int apci1500_di_write(struct comedi_device *dev,
>                                         outb(0xF4,
>                                                 devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
> -                                       i_Event1InterruptStatus = 1;
>                                         outb(APCI1500_RW_PORT_A_SPECIFICATION,
>                                                 devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
> -                                       i_RegValue =
>                                                 inb(devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
>
> @@ -549,7 +545,6 @@ static int apci1500_di_write(struct comedi_device *dev,
>                                         outb(0xD0,
>                                                 devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
> -                                       i_Event2InterruptStatus = 1;
>                                 } else {
>                                         dev_warn(dev->class_dev,
>                                                 "Event 2 not initialised\n");
> @@ -592,7 +587,6 @@ static int apci1500_di_write(struct comedi_device *dev,
>                                         outb(0xF4,
>                                                 devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
> -                                       i_Event1InterruptStatus = 0;
>                                 } else {
>                                         dev_warn(dev->class_dev,
>                                                 "Event 1 not initialised\n");
> @@ -621,7 +615,6 @@ static int apci1500_di_write(struct comedi_device *dev,
>                                         outb(0xF4,
>                                                 devpriv->iobase +
>                                                 APCI1500_Z8536_CONTROL_REGISTER);
> -                                       i_Event2InterruptStatus = 0;
>                                 } else {
>
>                                         dev_warn(dev->class_dev,
> @@ -1896,7 +1889,6 @@ static int apci1500_do_bits(struct comedi_device *dev,
>                             unsigned int *data)
>  {
>         struct apci1500_private *devpriv = dev->private;
> -       unsigned int ui_Status;
>         int i_RegValue;
>         int i_Constant;
>
> @@ -2004,8 +1996,8 @@ static int apci1500_do_bits(struct comedi_device *dev,
>
>         /* Enables the PCI interrupt */
>         outl(0x3000, devpriv->i_IobaseAmcc + 0x38);
> -       ui_Status = inl(devpriv->i_IobaseAmcc + 0x10);
> -       ui_Status = inl(devpriv->i_IobaseAmcc + 0x38);
> +       inl(devpriv->i_IobaseAmcc + 0x10);
> +       inl(devpriv->i_IobaseAmcc + 0x38);
>         outl(0x23000, devpriv->i_IobaseAmcc + 0x38);
>
>         return insn->n;
> --
> 1.7.10.4
>



Hi

Sorry,  ignore this!

Wrong commit message, sending a new patch.

Kind regards
Rickard Strandqvist
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ