diff mbox series

[-next,v2] usb: Mark sync_all_pins() with static keyword

Message ID 1604108889-15205-1-git-send-email-zou_wei@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next,v2] usb: Mark sync_all_pins() with static keyword | expand

Commit Message

Zou Wei Oct. 31, 2020, 1:48 a.m. UTC
Fix the following sparse warning:

./brcmstb-usb-pinmap.c:219:6: warning: symbol 'sync_all_pins' was not declared. Should it be static?

The sync_all_pins has only call site within brcmstb-usb-pinmap.c
Mark it static as suggested.

Fixes: 517c4c44b323 ("usb: Add driver to allow any GPIO to be used for 7211 USB signals")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
v2:
- Make title more precise.
- Shorten the warning path.
- Add period.
 drivers/usb/misc/brcmstb-usb-pinmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Florian Fainelli Oct. 31, 2020, 1:54 a.m. UTC | #1
On 10/30/2020 6:48 PM, Zou Wei wrote:
> Fix the following sparse warning:
> 
> ./brcmstb-usb-pinmap.c:219:6: warning: symbol 'sync_all_pins' was not declared. Should it be static?
> 
> The sync_all_pins has only call site within brcmstb-usb-pinmap.c
> Mark it static as suggested.
> 
> Fixes: 517c4c44b323 ("usb: Add driver to allow any GPIO to be used for 7211 USB signals")

Not sure if the Fixes: tag is entirely appropriate here, but sure, why not.

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/drivers/usb/misc/brcmstb-usb-pinmap.c b/drivers/usb/misc/brcmstb-usb-pinmap.c
index 02144c3..cc9618d 100644
--- a/drivers/usb/misc/brcmstb-usb-pinmap.c
+++ b/drivers/usb/misc/brcmstb-usb-pinmap.c
@@ -216,7 +216,7 @@  static int parse_pins(struct device *dev, struct device_node *dn,
 	return 0;
 }
 
-void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
+static void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
 {
 	struct out_pin *pout;
 	struct in_pin *pin;