From: Greg KH <gregkh@linuxfoundation.org>
To: Li Jun <jun.li@nxp.com>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, aisheng.dong@nxp.com
Subject: Re: [PATCH] usb: host: xhci: fix coverity checker CONSTANT_EXPRESSION_RESULT warning
Date: Wed, 5 Jul 2023 17:28:29 +0100 [thread overview]
Message-ID: <2023070525-underpass-brought-11be@gregkh> (raw)
In-Reply-To: <20230705105743.553052-1-jun.li@nxp.com>
On Wed, Jul 05, 2023 at 06:57:43PM +0800, Li Jun wrote:
> CID 28889612: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
> result_independent_of_operands: urb->transfer_dma >> 16 >> 16 is 0
> regardless of the values of its operands. This occurs as an argument
> to a function call.
What does "CID BIGNUMBER" mean?
> So convert the dma address to be u64 when extract its upper 32 bits.
>
> Signed-off-by: Li Jun <jun.li@nxp.com>
What commit id does this fix?
> ---
> drivers/usb/host/xhci-ring.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 646ff125def5..847a1eadd17a 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -747,7 +747,7 @@ static int xhci_move_dequeue_past_td(struct xhci_hcd *xhci,
> trb_sct = SCT_FOR_TRB(SCT_PRI_TR);
> ret = queue_command(xhci, cmd,
> lower_32_bits(addr) | trb_sct | new_cycle,
> - upper_32_bits(addr),
> + upper_32_bits((u64) addr),
Is this really actually changing anything?
thanks,
greg k-h
prev parent reply other threads:[~2023-07-05 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 10:57 [PATCH] usb: host: xhci: fix coverity checker CONSTANT_EXPRESSION_RESULT warning Li Jun
2023-07-05 16:28 ` Greg KH [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=2023070525-underpass-brought-11be@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=aisheng.dong@nxp.com \
--cc=jun.li@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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).