From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Felipe Balbi <balbi@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1 1/6] usb: gadget: pch_udc: Drop unneeded cpu_to_le32() call
Date: Tue, 23 Mar 2021 12:58:44 +0100 [thread overview]
Message-ID: <YFnX9H+JeK1SVKuY@kroah.com> (raw)
In-Reply-To: <20210322211149.6658-1-andriy.shevchenko@linux.intel.com>
On Mon, Mar 22, 2021 at 11:11:44PM +0200, Andy Shevchenko wrote:
> Either way ~0 will be in the correct byte order,
> hence drop unneeded cpu_to_le32() call. Moreover,
> it makes sparse happy, otherwise it complains:
>
> pch_udc.c:1813:27: warning: incorrect type in assignment (different base types)
> pch_udc.c:1813:27: expected unsigned int [usertype] dataptr
> pch_udc.c:1813:27: got restricted __le32 [usertype]
>
> Fixes: f646cf94520e ("USB device driver of Topcliff PCH")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/usb/gadget/udc/pch_udc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c
> index a3c1fc924268..2e2dca391007 100644
> --- a/drivers/usb/gadget/udc/pch_udc.c
> +++ b/drivers/usb/gadget/udc/pch_udc.c
> @@ -1756,7 +1756,7 @@ static struct usb_request *pch_udc_alloc_request(struct usb_ep *usbep,
> }
> /* prevent from using desc. - set HOST BUSY */
> dma_desc->status |= PCH_UDC_BS_HST_BSY;
> - dma_desc->dataptr = cpu_to_le32(DMA_ADDR_INVALID);
> + dma_desc->dataptr = DMA_ADDR_INVALID;
> req->td_data = dma_desc;
> req->td_data_last = dma_desc;
> req->chain_len = 1;
With this series applied, I get the following build warning:
drivers/usb/gadget/udc/pch_udc.c: In function ‘pch_udc_alloc_request’:
drivers/usb/gadget/udc/pch_udc.c:208:26: warning: conversion from ‘long long unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from ‘18446744073709551615’ to ‘4294967295’ [-Woverflow]
208 | #define DMA_ADDR_INVALID (~(dma_addr_t)0)
| ^
drivers/usb/gadget/udc/pch_udc.c:1813:22: note: in expansion of macro ‘DMA_ADDR_INVALID’
1813 | dma_desc->dataptr = DMA_ADDR_INVALID;
| ^~~~~~~~~~~~~~~~
Please fix up and resend a new version of this series.
thanks,
greg k-h
next prev parent reply other threads:[~2021-03-23 11:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 21:11 Andy Shevchenko
2021-03-22 21:11 ` [PATCH v1 2/6] usb: gardet: pch_udc: Check if driver is present before calling ->setup() Andy Shevchenko
2021-03-22 21:11 ` [PATCH v1 3/6] usb: gadget: pch_udc: Revert d3cb25a12138 completely Andy Shevchenko
2021-03-22 21:11 ` [PATCH v1 4/6] usb: gadget: pch_udc: Move pch_udc_init() to satisfy kernel doc Andy Shevchenko
2021-03-23 9:45 ` Sergei Shtylyov
2021-03-23 10:35 ` Andy Shevchenko
2021-03-22 21:11 ` [PATCH v1 5/6] usb: gadget: pch_udc: Initialize device pointer before use Andy Shevchenko
2021-03-22 21:11 ` [PATCH v1 6/6] usb: gadget: pch_udc: Provide a GPIO line used on Intel Minnowboard (v1) Andy Shevchenko
2021-03-25 8:17 ` Linus Walleij
2021-03-23 11:58 ` Greg Kroah-Hartman [this message]
2021-03-23 12:24 ` [PATCH v1 1/6] usb: gadget: pch_udc: Drop unneeded cpu_to_le32() call Andy Shevchenko
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=YFnX9H+JeK1SVKuY@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=balbi@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®