public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Alasdair Kergon <agk@redhat.com>,
	dm-devel@redhat.com, lvc-patches@linuxtesting.org,
	linux-kernel@vger.kernel.org
Subject: Re: md: dm-ioctl: drop always-false condition
Date: Mon, 6 Feb 2023 16:03:42 -0500	[thread overview]
Message-ID: <Y+FrLt8gt/Pff/zZ@redhat.com> (raw)
In-Reply-To: <b8269463-9f7e-4c28-2bfe-44663f3764c1@omp.ru>

On Mon, Feb 06 2023 at  3:58P -0500,
Sergey Shtylyov <s.shtylyov@omp.ru> wrote:

> On 1/18/23 2:59 PM, Mikulas Patocka wrote:
> 
> [...]
> 
> >> The expression 'indata[3] > ULONG_MAX' always evaluates to false since
> >> indata[] is declared as an array of *unsigned long* elements and #define
> >> ULONG_MAX represents the max value of that exact type...
> >>
> >> Note that gcc seems to be able to detect the dead code here and eliminate
> >> this check anyway...
> >>
> >> Found by Linux Verification Center (linuxtesting.org) with the SVACE static
> >> analysis tool.
> >>
> >> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
> > 
> > Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
> 
>    Thank you!
> 
> >> ---
> >> This patch is atop of the 'for-next' branch of the device-mapper repo...
> >>
> >>  drivers/md/dm-ioctl.c |    3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> Index: linux-dm/drivers/md/dm-ioctl.c
> >> ===================================================================
> >> --- linux-dm.orig/drivers/md/dm-ioctl.c
> >> +++ linux-dm/drivers/md/dm-ioctl.c
> >> @@ -1073,8 +1073,7 @@ static int dev_set_geometry(struct file
> 
>    Returning to this patch, I think I should've added the name of the function
> in question in both the subject and and commit msg... I'll recast...

Not a big deal, I've already staged it so please don't resend.

See:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.3&id=151d812251202aa0dce1fdeabd64794292d40b75

      reply	other threads:[~2023-02-06 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 20:59 [PATCH] md: dm-ioctl: drop always-false condition Sergey Shtylyov
2023-01-18 11:59 ` [dm-devel] " Mikulas Patocka
2023-02-06 20:58   ` Sergey Shtylyov
2023-02-06 21:03     ` Mike Snitzer [this message]

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=Y+FrLt8gt/Pff/zZ@redhat.com \
    --to=snitzer@kernel.org \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-patches@linuxtesting.org \
    --cc=mpatocka@redhat.com \
    --cc=s.shtylyov@omp.ru \
    /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