From: Felipe Balbi <balbi@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Ashwini Pahuja <ashwini.linux@gmail.com>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH RESEND] usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete
Date: Mon, 30 Mar 2020 10:22:48 +0300 [thread overview]
Message-ID: <87pncu2to7.fsf@kernel.org> (raw)
In-Reply-To: <20200330060805.GA107017@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]
Hi,
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
>> >> > When building with Clang + -Wtautological-pointer-compare:
>> >> >
>> >> > drivers/usb/gadget/udc/bdc/bdc_ep.c:543:28: warning: comparison of
>> >> > address of 'req->queue' equal to a null pointer is always false
>> >> > [-Wtautological-pointer-compare]
>> >> > if (req == NULL || &req->queue == NULL || &req->usb_req == NULL)
>> >> > ~~~~~^~~~~ ~~~~
>> >> > drivers/usb/gadget/udc/bdc/bdc_ep.c:543:51: warning: comparison of
>> >> > address of 'req->usb_req' equal to a null pointer is always false
>> >> > [-Wtautological-pointer-compare]
>> >> > if (req == NULL || &req->queue == NULL || &req->usb_req == NULL)
>> >> > ~~~~~^~~~~~~ ~~~~
>> >> > 2 warnings generated.
>> >> >
>> >> > As it notes, these statements will always evaluate to false so remove
>> >> > them.
>> >> >
>> >> > Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
>> >> > Link: https://github.com/ClangBuiltLinux/linux/issues/749
>> >> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>> >>
>> >> It's now in my queue for v5.8. It doesn't really look like a bug fix, so
>> >> it's not going in during v5.7-rc
>> >>
>> >> --
>> >> balbi
>> >
>> > Thank you for picking it up. It would be nice to see it in 5.7 since
>> > we're enabling this warning and this is one of two outstanding
>> > instances in -next and the other one's patch has been picked up plus the
>> > patch itself is rather benign. Not to mention that I did send this patch
>> > back in October. However, when it is merged into Linus' tree is
>> > ultimately your call so I won't argue as long as it gets there
>> > eventually.
>>
>> If Greg's okay with this patch going in during v5.7-rc, I can send it as
>> a fix, no worries. Greg?
>
> Yes, clang build warnings fixes are valid fixes for the -rc period, and
> I take them into stable where needed as well.
Thanks for confirming, Greg. I'll move the commit to my testing/fixes
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2020-03-30 7:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 0:20 [PATCH] usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete Nathan Chancellor
2020-02-21 4:57 ` Nathan Chancellor
2020-02-24 21:42 ` Nick Desaulniers
2020-03-26 19:58 ` Nathan Chancellor
2020-03-28 8:35 ` Felipe Balbi
2020-03-29 1:12 ` [PATCH RESEND] " Nathan Chancellor
2020-03-29 7:43 ` Felipe Balbi
2020-03-29 14:47 ` Nathan Chancellor
2020-03-29 16:43 ` Felipe Balbi
2020-03-30 6:08 ` Greg Kroah-Hartman
2020-03-30 7:22 ` Felipe Balbi [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=87pncu2to7.fsf@kernel.org \
--to=balbi@kernel.org \
--cc=ashwini.linux@gmail.com \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.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;
as well as URLs for NNTP newsgroup(s).