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] [day] [month] [year] [list]
Date:   Tue, 3 Jul 2018 21:25:39 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Colin King <colin.king@...onical.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        kernel-janitors@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Pavan Savoy <pavan_savoy@...com>
Subject: Re: [PATCH] misc: ti-st: remove redundant variable 'type'

On Tue, Jul 3, 2018 at 9:32 AM, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> Variable type is being assigned but is never used hence it is
> redundant and can be removed.
>
> Cleans up clang warning:
> warning: variable 'type' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Acked-by: Arnd Bergmann <arnd@...db.de>


It seems that version of the code dates back to 2011 with
5c88b02196a9 ("drivers:misc: ti-st: register with channel IDs").
I don't understand that patch, but if nobody has noticed a problem
in seven years, it's probably harmless.

> ---
>  drivers/misc/ti-st/st_kim.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
> index 5ec3f5a43718..28fba5b3625e 100644
> --- a/drivers/misc/ti-st/st_kim.c
> +++ b/drivers/misc/ti-st/st_kim.c
> @@ -138,7 +138,7 @@ static void kim_int_recv(struct kim_data_s *kim_gdata,
>         const unsigned char *data, long count)
>  {
>         const unsigned char *ptr;
> -       int len = 0, type = 0;
> +       int len = 0;
>         unsigned char *plen;
>
>         pr_debug("%s", __func__);
> @@ -183,7 +183,6 @@ static void kim_int_recv(struct kim_data_s *kim_gdata,
>                 case 0x04:
>                         kim_gdata->rx_state = ST_W4_HEADER;
>                         kim_gdata->rx_count = 2;
> -                       type = *ptr;
>                         break;
>                 default:
>                         pr_info("unknown packet");
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ