public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	James.Bottomley@HansenPartnership.com
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Abaci Robot <abaci@linux.alibaba.com>,
	Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH -next v2] scsi: sd: Fix unsigned expression compared with zero in sd_spinup_disk()
Date: Thu, 4 Jul 2024 10:43:47 -0700	[thread overview]
Message-ID: <6183a803-ced8-48f8-abb5-3fcfab055bfa@acm.org> (raw)
In-Reply-To: <20240704031437.33338-1-jiapeng.chong@linux.alibaba.com>

On 7/3/24 8:14 PM, Jiapeng Chong wrote:
> The return value from the call to scsi_execute_cmd() is int. However, the
> return value is being assigned to an unsigned int variable 'the_result',
> so making 'the_result' an int.
> 
> ./drivers/scsi/sd.c:2333:6-16: WARNING: Unsigned expression compared with zero: the_result > 0.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9463
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

The following is missing from this patch:
- An explanation of why this patch fixes a read of uninitialized data.
- Fixed: and Cc: stable tags.

Thanks,

Bart.

      reply	other threads:[~2024-07-04 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-04  3:14 [PATCH -next v2] scsi: sd: Fix unsigned expression compared with zero in sd_spinup_disk() Jiapeng Chong
2024-07-04 17:43 ` Bart Van Assche [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=6183a803-ced8-48f8-abb5-3fcfab055bfa@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=abaci@linux.alibaba.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.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