linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: gregkh@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	Oliver Neukum <oliver@neukum.org>
Subject: Re: [PATCH 4/6] usb-serial: optimize sysrq function calls
Date: Wed, 10 Mar 2010 16:18:42 -0600	[thread overview]
Message-ID: <4B981AC2.90201@windriver.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1003091008070.1693-100000@iolanthe.rowland.org>

Alan Stern wrote:
> On Tue, 9 Mar 2010, Jason Wessel wrote:
>
>   
>> There is no need to have external function calls for the sysrq
>> functions.  The compiler can inline the sysrq calls such that they are
>> entirely a NOP if CONFIG_MAGIC_SYSRQ is not set.
>>     
>
> This is not the best way to do what you want.  Keep 
> usb_serial_handle_sysrq_char() and usb_serial_handle_break() as 
> out-of-line routines in generic.c, but make them conditional on 
> CONFIG_MAGIC_SYSRQ.  Then in the header file, depending on whether or 
> not CONFIG_MAGIC_SYSRQ is defined, either put the usual extern function 
> declarations or else put do-nothing inline definitions.
>
> The advantage of keeping the functions out-of-line is the reduced
> amount of code space (since the bodies aren't replicated every place
> they get used).  This way you keep that advantage while still getting
> the NOP implementation if CONFIG_MAGIC_SYSRQ isn't set.
>   

It is probably fine to just drop this patch entirely then.

I had originally made the change to keep it similar to the uart based
serial drivers where the definitions are inlined.

Jason.

  reply	other threads:[~2010-03-10 22:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09  6:29 [PATCH 0/6] usb console improvements series Jason Wessel
2010-03-09  6:29 ` [PATCH 1/6] tty_port,usb-console: Fix usb serial console open/close regression Jason Wessel
2010-03-09  6:29   ` [PATCH 2/6] usb-serial: Use tty_port version of console instead of the usb_serial_port version Jason Wessel
2010-03-09  6:29     ` [PATCH 3/6] usb-console: pass baud from console to the initial tty open Jason Wessel
2010-03-09  6:29       ` [PATCH 4/6] usb-serial: optimize sysrq function calls Jason Wessel
2010-03-09  6:29         ` [PATCH 5/6] usb-hcd,usb-console: poll hcd device to force usb console writes Jason Wessel
2010-03-09  6:29           ` [PATCH 6/6] usb-serialy,sysrq: Run the sysrq handler in a tasklet Jason Wessel
2010-03-09 15:08           ` [PATCH 5/6] usb-hcd,usb-console: poll hcd device to force usb console writes Alan Stern
2010-03-10 22:27             ` Jason Wessel
2010-03-09 15:14         ` [PATCH 4/6] usb-serial: optimize sysrq function calls Alan Stern
2010-03-10 22:18           ` Jason Wessel [this message]
2010-03-16 20:30 ` [PATCH 0/6] usb console improvements series Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B981AC2.90201@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=alan@linux.intel.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).