Re: [PATCH] usb: fix defined but not used warnings in hcd-pci.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Feb 2012, Paul Gortmaker wrote:

> [Re: [PATCH] usb: fix defined but not used warnings in hcd-pci.c] On 26/02/2012 (Sun 10:39) Alan Stern wrote:
> 
> > On Sat, 25 Feb 2012, Paul Gortmaker wrote:
> > 
> > > Shows up on ia64 builds (and possibly elsewhere) for configs that
> > > don't set PM_RUNTIME or PM_SLEEP as follows:
> > > 
> > > drivers/usb/core/hcd-pci.c:383:12: warning: 'suspend_common' defined but not used
> > > drivers/usb/core/hcd-pci.c:438:12: warning: 'resume_common' defined but not used
> > > 
> > > As per above, the functions are only used if RUNTIME/SLEEP are set,
> > > so make the two functions conditional on these Kconfig values.

> > Don't you also need to include powermac_set_asic() in the #if block?
> > And you might as well include check_root_hub_suspended() too (just 
> > remember to define it as NULL if neither SLEEP nor RUNTIME is enabled).
> 
> Actually no - I fixed the only warning.  But I was curious why, and
> determined that the inline on the powermac stub is enough to keep gcc
> from complaining -- when I removed that, then I could force a warning.
> So this should be fine as-is.

Ah, okay, that makes sense.  Thanks.

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux