* Re: [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true
[not found] <202211081120.s8hX7ZW3-lkp@intel.com>
@ 2022-11-08 13:08 ` Bjorn Helgaas
2022-11-08 17:06 ` Pali Rohár
2022-11-14 9:17 ` Chen, Rong A
0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2022-11-08 13:08 UTC (permalink / raw)
To: kernel test robot; +Cc: Pali Rohár, llvm, oe-kbuild-all, linux-pci
Why did the bot tell me the build was *SUCCESSFUL* even though this is
clearly a problem? Here's the "success" message:
https://lore.kernel.org/all/636a47ad.UocsB2qjv%2FcFWvK2%25lkp@intel.com/
On Tue, Nov 08, 2022 at 03:21:20PM +0800, kernel test robot wrote:
> >> drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> if (bus->domain_nr < 0)
> ^~~~~~~~~~~~~~~~~~
I set "err = -EINVAL" here; let me know if you prefer something
different.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true
2022-11-08 13:08 ` [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true Bjorn Helgaas
@ 2022-11-08 17:06 ` Pali Rohár
2022-11-08 17:15 ` Bjorn Helgaas
2022-11-14 9:17 ` Chen, Rong A
1 sibling, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2022-11-08 17:06 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: kernel test robot, llvm, oe-kbuild-all, linux-pci
On Tuesday 08 November 2022 07:08:16 Bjorn Helgaas wrote:
> Why did the bot tell me the build was *SUCCESSFUL* even though this is
> clearly a problem? Here's the "success" message:
>
> https://lore.kernel.org/all/636a47ad.UocsB2qjv%2FcFWvK2%25lkp@intel.com/
>
> On Tue, Nov 08, 2022 at 03:21:20PM +0800, kernel test robot wrote:
>
> > >> drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> > if (bus->domain_nr < 0)
> > ^~~~~~~~~~~~~~~~~~
>
> I set "err = -EINVAL" here; let me know if you prefer something
> different.
Hello! I agree that there is missing err= assignment.
Instead of -EINVAL you can use also bus->domain_nr as it is negative and
would contained error code (from ida_alloc() call).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true
2022-11-08 17:06 ` Pali Rohár
@ 2022-11-08 17:15 ` Bjorn Helgaas
0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2022-11-08 17:15 UTC (permalink / raw)
To: Pali Rohár; +Cc: kernel test robot, llvm, oe-kbuild-all, linux-pci
On Tue, Nov 08, 2022 at 06:06:19PM +0100, Pali Rohár wrote:
> On Tuesday 08 November 2022 07:08:16 Bjorn Helgaas wrote:
> > Why did the bot tell me the build was *SUCCESSFUL* even though this is
> > clearly a problem? Here's the "success" message:
> >
> > https://lore.kernel.org/all/636a47ad.UocsB2qjv%2FcFWvK2%25lkp@intel.com/
> >
> > On Tue, Nov 08, 2022 at 03:21:20PM +0800, kernel test robot wrote:
> >
> > > >> drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> > > if (bus->domain_nr < 0)
> > > ^~~~~~~~~~~~~~~~~~
> >
> > I set "err = -EINVAL" here; let me know if you prefer something
> > different.
>
> Hello! I agree that there is missing err= assignment.
>
> Instead of -EINVAL you can use also bus->domain_nr as it is negative and
> would contained error code (from ida_alloc() call).
Good idea, I adopted that :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true
2022-11-08 13:08 ` [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true Bjorn Helgaas
2022-11-08 17:06 ` Pali Rohár
@ 2022-11-14 9:17 ` Chen, Rong A
1 sibling, 0 replies; 4+ messages in thread
From: Chen, Rong A @ 2022-11-14 9:17 UTC (permalink / raw)
To: Bjorn Helgaas, kernel test robot
Cc: Pali Rohár, llvm, oe-kbuild-all, linux-pci
On 11/8/2022 9:08 PM, Bjorn Helgaas wrote:
> Why did the bot tell me the build was *SUCCESSFUL* even though this is
> clearly a problem? Here's the "success" message:
Hi Bjorn,
Sorry about that, it's an internal bug in our service.
Best Regards,
Rong Chen
>
> https://lore.kernel.org/all/636a47ad.UocsB2qjv%2FcFWvK2%25lkp@intel.com/
>
> On Tue, Nov 08, 2022 at 03:21:20PM +0800, kernel test robot wrote:
>
>>>> drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
>> if (bus->domain_nr < 0)
>> ^~~~~~~~~~~~~~~~~~
>
> I set "err = -EINVAL" here; let me know if you prefer something
> different.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-11-14 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202211081120.s8hX7ZW3-lkp@intel.com>
2022-11-08 13:08 ` [helgaas-pci:pci/enumeration 3/3] drivers/pci/probe.c:909:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true Bjorn Helgaas
2022-11-08 17:06 ` Pali Rohár
2022-11-08 17:15 ` Bjorn Helgaas
2022-11-14 9:17 ` Chen, Rong A
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).