public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Juan Quintela <quintela@mandrakesoft.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] only use 48-bit lba when necessary
Date: Fri, 4 Apr 2003 17:54:57 +0200	[thread overview]
Message-ID: <20030404155457.GA16144@suse.de> (raw)
In-Reply-To: <86wuia1cxn.fsf@trasno.mitica>

On Fri, Apr 04 2003, Juan Quintela wrote:
> 
> Hi
> 
> jens> +	if (drive->addressing == 1 && block > 0xfffffff)
> jens> +		lba48 = 1;
> jens> +
> >> 
> >> lba48 = (drive->addressing == 1) && (block > 0xfffffff);
> >> 
> >> should do the trick.
> 
> jens> I'm not going to use such nonsense, sorry. The spelled out versions are
> jens> a lot more readable. The command ?: constructs used in ide-disk are a
> jens> joke, imo.
> 
> Read it again, please.  Told me wehre are the ?: command.

Oh, you are right. It was the one-liner style that threw me off.

> Reason is that:
> 
> if (expr)
>    var = true;
> else
>    var = false;
> 
> is always a bad construct.
>
> var = expr;
> 
> is a better construct to express that meaning.
> 
> And yes, your is a variation of the same theme:
> 
> var = false;
> if (expr)
>    var = true;

Yes, but mine is more readable. IMO of course, that's the way it is with
styles.

-- 
Jens Axboe


  reply	other threads:[~2003-04-04 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-04 12:29 [PATCH] only use 48-bit lba when necessary Jens Axboe
2003-04-04 13:19 ` Juan Quintela
2003-04-04 13:22   ` Jens Axboe
2003-04-04 15:48     ` Juan Quintela
2003-04-04 15:54       ` Jens Axboe [this message]
2003-04-04 17:06         ` John Bradford
2003-04-04 14:40 ` Andries Brouwer
2003-04-04 15:13   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2003-04-04 17:02 Chuck Ebbert
2003-04-17 14:20 ` Matt Mackall
2003-04-17 15:24   ` Timothy Miller
2003-04-17 16:05     ` Matt Mackall
2003-04-17 18:49       ` Timothy Miller
2003-04-18  1:34 Chuck Ebbert
2003-04-18  4:18 ` Matt Mackall
2003-04-18 14:34 ` Timothy Miller
2003-04-18  3:32 linux-kernel
2003-04-18  9:50 Chuck Ebbert

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=20030404155457.GA16144@suse.de \
    --to=axboe@suse.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quintela@mandrakesoft.com \
    /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