linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind
@ 2014-06-20 20:40 Fabian Frederick
  2014-06-21  0:09 ` Sergei Shtylyov
  2014-06-23  6:58 ` Oliver Neukum
  0 siblings, 2 replies; 3+ messages in thread
From: Fabian Frederick @ 2014-06-20 20:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, David S. Miller, Emil Goode, linux-usb

inline this one line function used in driver_info structure

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Emil Goode <emilgoode@gmail.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/net/usb/asix_devices.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index 8a7582b..a41926a 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -497,7 +497,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
 	return 0;
 }
 
-static void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
+static inline void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
 {
 	kfree(dev->driver_priv);
 }
-- 
1.8.4.5


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

* Re: [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind
  2014-06-20 20:40 [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind Fabian Frederick
@ 2014-06-21  0:09 ` Sergei Shtylyov
  2014-06-23  6:58 ` Oliver Neukum
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-06-21  0:09 UTC (permalink / raw)
  To: Fabian Frederick, linux-kernel; +Cc: David S. Miller, Emil Goode, linux-usb

Hello.

On 06/21/2014 12:40 AM, Fabian Frederick wrote:

> inline this one line function used in driver_info structure

> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Emil Goode <emilgoode@gmail.com>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>   drivers/net/usb/asix_devices.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
> index 8a7582b..a41926a 100644
> --- a/drivers/net/usb/asix_devices.c
> +++ b/drivers/net/usb/asix_devices.c
> @@ -497,7 +497,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
>   	return 0;
>   }
>
> -static void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
> +static inline void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
>   {
>   	kfree(dev->driver_priv);
>   }

    gcc is perfectly capable of figuring that out. No need to use *inline* 
outside the *.h files.

WBR, Sergei


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

* Re: [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind
  2014-06-20 20:40 [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind Fabian Frederick
  2014-06-21  0:09 ` Sergei Shtylyov
@ 2014-06-23  6:58 ` Oliver Neukum
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2014-06-23  6:58 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: linux-kernel, David S. Miller, Emil Goode, linux-usb

On Fri, 2014-06-20 at 22:40 +0200, Fabian Frederick wrote:
> inline this one line function used in driver_info structure

That precisely is this the reason not to inline this.
It is used as a function pointer. gcc must generate
a non-inlined version of the function.

Your patch has zero effect and suggests something that is
actually wrong.

	Regards
		Oliver



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

end of thread, other threads:[~2014-06-23  8:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 20:40 [PATCH 2/2] drivers/net/usb/asix_devices.c: inline ax88772_unbind Fabian Frederick
2014-06-21  0:09 ` Sergei Shtylyov
2014-06-23  6:58 ` Oliver Neukum

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