Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: cdns3: gadget: make a bunch of functions static

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>
Link: https://lore.kernel.org/r/20200402123837.5850-1-yanaijie@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jason Yan and committed by
Greg Kroah-Hartman
e9010320 6e24826d

+10 -10
+10 -10
drivers/usb/cdns3/gadget.c
··· 82 82 * @ptr: address of device controller register to be read and changed 83 83 * @mask: bits requested to clar 84 84 */ 85 - void cdns3_clear_register_bit(void __iomem *ptr, u32 mask) 85 + static void cdns3_clear_register_bit(void __iomem *ptr, u32 mask) 86 86 { 87 87 mask = readl(ptr) & ~mask; 88 88 writel(mask, ptr); ··· 137 137 * 138 138 * Returns buffer or NULL if no buffers in list 139 139 */ 140 - struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list) 140 + static struct cdns3_aligned_buf *cdns3_next_align_buf(struct list_head *list) 141 141 { 142 142 return list_first_entry_or_null(list, struct cdns3_aligned_buf, list); 143 143 } ··· 148 148 * 149 149 * Returns request or NULL if no requests in list 150 150 */ 151 - struct cdns3_request *cdns3_next_priv_request(struct list_head *list) 151 + static struct cdns3_request *cdns3_next_priv_request(struct list_head *list) 152 152 { 153 153 return list_first_entry_or_null(list, struct cdns3_request, list); 154 154 } ··· 190 190 return priv_ep->trb_pool_dma + offset; 191 191 } 192 192 193 - int cdns3_ring_size(struct cdns3_endpoint *priv_ep) 193 + static int cdns3_ring_size(struct cdns3_endpoint *priv_ep) 194 194 { 195 195 switch (priv_ep->type) { 196 196 case USB_ENDPOINT_XFER_ISOC: ··· 345 345 cdns3_ep_inc_trb(&priv_ep->dequeue, &priv_ep->ccs, priv_ep->num_trbs); 346 346 } 347 347 348 - void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req) 348 + static void cdns3_move_deq_to_next_trb(struct cdns3_request *priv_req) 349 349 { 350 350 struct cdns3_endpoint *priv_ep = priv_req->priv_ep; 351 351 int current_trb = priv_req->start_trb; ··· 511 511 } 512 512 } 513 513 514 - struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev, 514 + static struct usb_request *cdns3_wa2_gadget_giveback(struct cdns3_device *priv_dev, 515 515 struct cdns3_endpoint *priv_ep, 516 516 struct cdns3_request *priv_req) 517 517 { ··· 551 551 return &priv_req->request; 552 552 } 553 553 554 - int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev, 554 + static int cdns3_wa2_gadget_ep_queue(struct cdns3_device *priv_dev, 555 555 struct cdns3_endpoint *priv_ep, 556 556 struct cdns3_request *priv_req) 557 557 { ··· 836 836 cdns3_gadget_ep_free_request(&priv_ep->endpoint, request); 837 837 } 838 838 839 - void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep) 839 + static void cdns3_wa1_restore_cycle_bit(struct cdns3_endpoint *priv_ep) 840 840 { 841 841 /* Work around for stale data address in TRB*/ 842 842 if (priv_ep->wa1_set) { ··· 1904 1904 return 0; 1905 1905 } 1906 1906 1907 - void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev, 1907 + static void cdns3_stream_ep_reconfig(struct cdns3_device *priv_dev, 1908 1908 struct cdns3_endpoint *priv_ep) 1909 1909 { 1910 1910 if (!priv_ep->use_streams || priv_dev->gadget.speed < USB_SPEED_SUPER) ··· 1925 1925 EP_CFG_TDL_CHK | EP_CFG_SID_CHK); 1926 1926 } 1927 1927 1928 - void cdns3_configure_dmult(struct cdns3_device *priv_dev, 1928 + static void cdns3_configure_dmult(struct cdns3_device *priv_dev, 1929 1929 struct cdns3_endpoint *priv_ep) 1930 1930 { 1931 1931 struct cdns3_usb_regs __iomem *regs = priv_dev->regs;