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: <877dzoy1pq.fsf@mpe.ellerman.id.au>
Date:   Fri, 13 Mar 2020 21:43:29 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Bjorn Helgaas <helgaas@...nel.org>,
        Chen Zhou <chenzhou10@...wei.com>
Cc:     paulus@...ba.org, tyreld@...ux.ibm.com,
        linuxppc-dev@...ts.ozlabs.org, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

Bjorn Helgaas <helgaas@...nel.org> writes:
> On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote:
>> On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote:
>> > Fixes gcc '-Wunused-but-set-variable' warning:
>> > 
>> > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type:
>> > drivers/pci/hotplug/rpaphp_core.c:291:16: warning:
>> > 	variable value set but not used [-Wunused-but-set-variable]
>> > 
>> > Reported-by: Hulk Robot <hulkci@...wei.com>
>> > Signed-off-by: Chen Zhou <chenzhou10@...wei.com>
>> 
>> Michael, if you want this:
>> 
>> Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
>> 
>> If you don't mind, edit the subject to follow the convention, e.g.,
>> 
>>   PCI: rpaphp: Remove unused variable 'value'
>> 
>> Apparently simple_strtoul() is deprecated and we're supposed to use
>> kstrtoul() instead.  Looks like kstrtoul() might simplify the code a
>> little, too, e.g.,
>> 
>>   if (kstrtoul(drc_type, 0, &value) == 0)
>>     return 1;
>> 
>>   return 0;
>
> I guess there are several other uses of simple_strtoul() in this file.
> Not sure if it's worth changing them all, just this one, or just the
> patch below as-is.

I'll take this patch as-is, and someone can send a follow-up to convert
the whole file to kstrtoul().

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ