All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
	Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Colin Ian King <colin.king@canonical.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Douglas Gilbert <dgilbert@interlog.com>
Subject: Re: [PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer
Date: Mon, 17 Jul 2017 23:04:14 -0400	[thread overview]
Message-ID: <yq1fudufntd.fsf@oracle.com> (raw)
In-Reply-To: <20170717131142.14069-1-jthumshirn@suse.de> (Johannes Thumshirn's message of "Mon, 17 Jul 2017 15:11:42 +0200")


Johannes,

> dxfer_len is an unsigned int and we always assign a value > 0 to it,
> so it doesn't make any sense to check if it is < 0. We can't really
> check dxferp as well as we have both NULL and not NULL cases in the
> possible call paths.
>
> So just return true for SG_DXFER_FROM_DEV transfer in
> sg_is_valid_dxfer().

Applied to 4.13/scsi-fixes. Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2017-07-18  3:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 13:11 [PATCH] scsi: sg: fix static checker warning in sg_is_valid_dxfer Johannes Thumshirn
2017-07-18  3:04 ` Martin K. Petersen [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=yq1fudufntd.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dgilbert@interlog.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.