public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Liao Yuanhong <liaoyuanhong@vivo.com>,
	Jens Axboe <axboe@kernel.dk>,
	"open list:BLOCK LAYER" <linux-block@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] elevator: avoid redundant conditions
Date: Thu, 4 Sep 2025 11:33:20 +0900	[thread overview]
Message-ID: <b0c67c9a-d364-4840-8e76-cdfc66889ac2@kernel.org> (raw)
In-Reply-To: <20250903121405.386483-1-liaoyuanhong@vivo.com>

On 9/3/25 9:14 PM, Liao Yuanhong wrote:
> While 'if (i < 0) ... else if (i >= 0) ...' is technically equivalent to
> 'if (i < 0) ... else ...', the latter is vastly easier to read because
> it avoids writing out a condition that is unnecessary. Let's drop such
> unnecessary conditions.
> 
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2025-09-04  2:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 12:14 [PATCH] elevator: avoid redundant conditions Liao Yuanhong
2025-09-04  2:33 ` Damien Le Moal [this message]
2025-09-04  6:05 ` Markus Elfring
2025-09-04  6:05   ` Damien Le Moal

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=b0c67c9a-d364-4840-8e76-cdfc66889ac2@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=liaoyuanhong@vivo.com \
    --cc=linux-block@vger.kernel.org \
    --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