kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line 599)
@ 2012-09-13 23:49 Fengguang Wu
  2012-09-14  0:29 ` ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2012-09-13 23:49 UTC (permalink / raw)
  To: kernel-janitors

Hi Richard,

FYI, there are new smatch warnings show up in

commit 3807e26d69b9ad3864fe03224ebebc9610d5802e
Author:     Alek Du <alek.du@intel.com>
AuthorDate: Tue Jul 14 07:23:29 2009 +0800

drivers/usb/chipidea/../host/ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line 599)

vim +656 drivers/usb/chipidea/../host/ehci-dbg.c
   596 
   597                         switch (hc32_to_cpu(ehci, tag)) {
   598                         case Q_TYPE_QH:
   599                                 hw = p.qh->hw;
...
 > 656					if (p.qh) {
   657						tag = Q_NEXT_TYPE(ehci, hw->hw_next);
   658						p = p.qh->qh_next;
   659					}
   660					break;

---
0-DAY kernel build testing backend         Open Source Technology Centre
Fengguang Wu <wfg@linux.intel.com>                     Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line
  2012-09-13 23:49 ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line 599) Fengguang Wu
@ 2012-09-14  0:29 ` Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2012-09-14  0:29 UTC (permalink / raw)
  To: kernel-janitors

On Fri, 14 Sep 2012, Fengguang Wu wrote:

> Hi Richard,
> 
> FYI, there are new smatch warnings show up in
> 
> commit 3807e26d69b9ad3864fe03224ebebc9610d5802e
> Author:     Alek Du <alek.du@intel.com>
> AuthorDate: Tue Jul 14 07:23:29 2009 +0800
> 
> drivers/usb/chipidea/../host/ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line 599)
> 
> vim +656 drivers/usb/chipidea/../host/ehci-dbg.c
>    596 
>    597                         switch (hc32_to_cpu(ehci, tag)) {
>    598                         case Q_TYPE_QH:
>    599                                 hw = p.qh->hw;
> ...
>  > 656					if (p.qh) {
>    657						tag = Q_NEXT_TYPE(ehci, hw->hw_next);
>    658						p = p.qh->qh_next;
>    659					}
>    660					break;

smatch is right; the test on line 656 isn't needed.  I'll take it out.

Thank you.

Alan Stern


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-14  0:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 23:49 ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line 599) Fengguang Wu
2012-09-14  0:29 ` ehci-dbg.c:656 fill_periodic_buffer() warn: variable dereferenced before check 'p.qh' (see line Alan Stern

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).