Thread (1 message) 1 message, 1 author, 2008-11-07

Re: [PATCH v2] usbnet: enable more aggressive autosuspend

From: David Miller <hidden>
Date: 2008-11-07 20:22:36

From: Oliver Neukum <redacted>
Date: Fri, 7 Nov 2008 13:24:17 +0100
Am Freitag, 7. November 2008 13:00:05 schrieb Jeff Garzik:
quoted
Oliver Neukum wrote:
quoted
Am Freitag, 7. November 2008 09:26:33 schrieb Jeff Garzik:
quoted
I pondered taking the easy route of fixing this by surrounding the 
auto_pm reference with an ifdef, but it seems like usbnet could use a 
bit more thought -- it is questionable whether usbnet_suspend/resume 
should be built at all, if !CONFIG_PM, even though they are exported.
As this is a generic problem, shouldn't we get the compiler to do
this for us?
Can you be more specific?
As these methods are static the compiler is able to tell whether they
are referenced by anything but the tables. We should be able to set
an attribute in the header file that tells the compiler that these methods
won't be called and can be omitted in the build. Otherwise we have to ifdef
all those methods.
The problem is that the content of these functions still needs to be
parsed, so references to ifdef'd out structure members are still going
to throw errors.

For the time being please add the necessary CONFIG_PM wrappers around
the suspend and resume methods, as this is what we do tree wide and
I don't think you want these usbnet changes blocked by some fancy
compiler facility that hasn't been implemented yet.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help