public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Adrian Bunk <bunk@kernel.org>
Cc: linux-kernel@vger.kernel.org, Frank Seidel <fseidel@suse.de>
Subject: Re: [RFC 13/13] Char: nozomi, cleanup read and write
Date: Sat, 10 Nov 2007 23:04:41 +0100	[thread overview]
Message-ID: <47362AF9.5080009@gmail.com> (raw)
In-Reply-To: <20071110161511.GA21669@stusta.de>

On 11/10/2007 05:15 PM, Adrian Bunk wrote:
> On Fri, Nov 09, 2007 at 06:51:35PM -0500, Jiri Slaby wrote:
>> ...
>> --- a/drivers/char/nozomi.c
>> +++ b/drivers/char/nozomi.c
>> ...
>> -		if (size_bytes - i == 2) {
>> +		if (unlikely(size_bytes - i == 2)) {
>> ...
> 
> Please don't add likely/unlikely in drivers unless it brings a 
> measurable improvement.

Why? Anyway I think this is the case. The body of the then branch is executed at
most once, while the else branch each time but last. If you write/read 1002
bytes, it means 250:1. ...and it's invoked from interrupt too...

regards,
-- 
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University

  reply	other threads:[~2007-11-10 22:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 23:43 [RFC 1/13] Char: nozomi, remove unneded stuff Jiri Slaby
2007-11-09 23:44 ` [RFC 2/13] Char: nozomi, expand some functions Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:44 ` [RFC 3/13] Char: nozomi, fix fail paths Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:45 ` [RFC 4/13] Char: nozomi, tty index cleanup Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-10 15:50     ` Jiri Slaby
2007-11-09 23:46 ` [RFC 5/13] Char: nozomi, ioctls cleanup Jiri Slaby
2007-11-10 15:41   ` Frank Seidel
2007-11-09 23:46 ` [RFC 6/13] Char: nozomi, reorder and cleanup probe, remove Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-09 23:47 ` [RFC 7/13] Char: nozomi, remove struct irq Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-12 15:11   ` Frank Seidel
2007-11-09 23:48 ` [RFC 8/13] Char: nozomi, tty cleanup Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-12 18:43   ` Frank Seidel
2007-11-09 23:48 ` [RFC 9/13] Char: nozomi, lock cleanup Jiri Slaby
2007-11-10 15:42   ` Frank Seidel
2007-11-09 23:49 ` [RFC! 10/13] Char: nozomi, fix tty_flip_buffer_push Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:50 ` [RFC 11/13] Char: nozomi, remove unused includes Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:50 ` [RFC 12/13] Char: nozomi, remove void acc char2 char3 more mp mp.c mp.yy m1 nozomi2 proto rej slock1 casts Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-09 23:51 ` [RFC 13/13] Char: nozomi, cleanup read and write Jiri Slaby
2007-11-10 15:43   ` Frank Seidel
2007-11-10 16:15   ` Adrian Bunk
2007-11-10 22:04     ` Jiri Slaby [this message]
2007-11-11  2:37       ` Frank Seidel
2007-11-11 16:02         ` Frank Seidel
2007-11-12  7:54       ` Adrian Bunk
2007-11-12  9:43         ` Frank Seidel
2007-11-10 15:41 ` [RFC 1/13] Char: nozomi, remove unneded stuff Frank Seidel
2007-11-10 15:55   ` Jiri Slaby

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=47362AF9.5080009@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=bunk@kernel.org \
    --cc=fseidel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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