Linux USB
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Jason Yan <yanaijie@huawei.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"pawell@cadence.com" <pawell@cadence.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: cdns3: gadget: make a bunch of functions static
Date: Fri, 3 Apr 2020 02:09:03 +0000	[thread overview]
Message-ID: <20200403020926.GB17219@b29397-desktop> (raw)
In-Reply-To: <20200402123837.5850-1-yanaijie@huawei.com>

On 20-04-02 20:38:37, Jason Yan wrote:
> Fix the following sparse warning:
> 
> drivers/usb/cdns3/gadget.c:85:6: warning: symbol
> 'cdns3_clear_register_bit' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:140:26: warning: symbol
> 'cdns3_next_align_buf' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:151:22: warning: symbol
> 'cdns3_next_priv_request' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:193:5: warning: symbol 'cdns3_ring_size' was
> not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:348:6: warning: symbol
> 'cdns3_move_deq_to_next_trb' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:514:20: warning: symbol
> 'cdns3_wa2_gadget_giveback' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:554:5: warning: symbol
> 'cdns3_wa2_gadget_ep_queue' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:839:6: warning: symbol
> 'cdns3_wa1_restore_cycle_bit' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:1907:6: warning: symbol
> 'cdns3_stream_ep_reconfig' was not declared. Should it be static?
> drivers/usb/cdns3/gadget.c:1928:6: warning: symbol
> 'cdns3_configure_dmult' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Reviewed-by: Peter Chen <peter.chen@nxp.com>

> ---
>  drivers/usb/cdns3/gadget.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index 372460ea4df9..62f585c55846 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -82,7 +82,7 @@ static int cdns3_ep_run_stream_transfer(struct cdns3_endpoint *priv_ep,
>   * @ptr: address of device controller register to be read and changed
>   * @mask: bits requested to clar
>   */
> -void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
> +static void cdns3_clear_register_bit(void __iomem *ptr, u32 mask)
>  {
>  	mask = readl(ptr) & ~mask;
>  	writel(mask, ptr);
> @@ -137,7 +137,7 @@ struct usb_request *cdns3_next_request(struct list_head *list)
>   *
>   * Returns buffer or NULL if no buffers in list
>   */
> -struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
> +static struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
>  {
>  	return list_first_entry_or_null(list, struct cdns3_aligned_buf, list);
>  }
> @@ -148,7 +148,7 @@ struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list)
>   *
>   * Returns request or NULL if no requests in list
>   */
> -struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
> +static struct cdns3_request *cdns3_next_priv_request(struct list_head *list)
>  {
>  	return list_first_entry_or_null(list, struct cdns3_request, list);
>  }
> @@ -190,7 +190,7 @@ dma_addr_t cdns3_trb_virt_to_dma(struct cdns3_endpoint *priv_ep,
>  	return priv_ep->trb_pool_dma + offset;
>  }
>  
> -int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
> +static int cdns3_ring_size(struct cdns3_endpoint *priv_ep)
>  {
>  	switch (priv_ep->type) {
>  	case USB_ENDPOINT_XFER_ISOC:
> @@ -345,7 +345,7 @@ static void cdns3_ep_inc_deq(struct cdns3_endpoint *priv_ep)
>  	cdns3_ep_inc_trb(&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs);
>  }
>  
> -void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
> +static void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req)
>  {
>  	struct cdns3_endpoint *priv_ep = priv_req->priv_ep;
>  	int current_trb = priv_req->start_trb;
> @@ -511,7 +511,7 @@ static void cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep,
>  	}
>  }
>  
> -struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
> +static struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
>  					      struct cdns3_endpoint *priv_ep,
>  					      struct cdns3_request *priv_req)
>  {
> @@ -551,7 +551,7 @@ struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev,
>  	return &priv_req->request;
>  }
>  
> -int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
> +static int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev,
>  			      struct cdns3_endpoint *priv_ep,
>  			      struct cdns3_request *priv_req)
>  {
> @@ -836,7 +836,7 @@ void cdns3_gadget_giveback(struct cdns3_endpoint *priv_ep,
>  		cdns3_gadget_ep_free_request(&priv_ep->endpoint, request);
>  }
>  
> -void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
> +static void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep)
>  {
>  	/* Work around for stale data address in TRB*/
>  	if (priv_ep->wa1_set) {
> @@ -1904,7 +1904,7 @@ static int cdns3_ep_onchip_buffer_reserve(struct cdns3_device *priv_dev,
>  	return 0;
>  }
>  
> -void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
> +static void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
>  			      struct cdns3_endpoint *priv_ep)
>  {
>  	if (!priv_ep->use_streams || priv_dev->gadget.speed < USB_SPEED_SUPER)
> @@ -1925,7 +1925,7 @@ void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev,
>  			       EP_CFG_TDL_CHK | EP_CFG_SID_CHK);
>  }
>  
> -void cdns3_configure_dmult(struct cdns3_device *priv_dev,
> +static void cdns3_configure_dmult(struct cdns3_device *priv_dev,
>  			   struct cdns3_endpoint *priv_ep)
>  {
>  	struct cdns3_usb_regs __iomem *regs = priv_dev->regs;
> -- 
> 2.17.2
> 



-- 

Thanks,
Peter Chen

      reply	other threads:[~2020-04-03  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 12:38 [PATCH] usb: cdns3: gadget: make a bunch of functions static Jason Yan
2020-04-03  2:09 ` Peter Chen [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=20200403020926.GB17219@b29397-desktop \
    --to=peter.chen@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=yanaijie@huawei.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