From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Date: Fri, 17 Mar 2017 21:38:19 +0000 Subject: Re: dm crypt: remove an impossible condition Message-Id: <20170317213819.GC6475@redhat.com> List-Id: References: <20170317204655.GA28261@mwanda> In-Reply-To: <20170317204655.GA28261@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Dan Carpenter Cc: kernel-janitors@vger.kernel.org, linux-raid@vger.kernel.org, dm-devel@redhat.com, Shaohua Li , Milan Broz , Alasdair Kergon On Fri, Mar 17 2017 at 4:46pm -0400, Dan Carpenter wrote: > Static checkers complain that it doesn't make sense to check if "sval" > is NULL. The intention was to check if strchr() returned NULL, but in > that situation "sval" would be "NULL + 1" so the check doesn't work. We > know from the sscanf() that there is a ':' character in the string so > the check is unnecessary and can be removed. >=20 > Now that the check doesn't depend on "sval" it can be moved earlier > for readability. >=20 > Signed-off-by: Dan Carpenter Thanks Dan, I've folded this fix into the original commit, see: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/= commit/?h=3Ddm-4.12&id=CF22cd5f3afe7335afee5659f7450000e8fa2a15 I didn't add your Signed-off-by though, I can backfill that if you like.. it is just I didn't want to taint you with all the extensive changes in that commit. Mike -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html