Skip to contentSkip to conversation

usb: renesas_usbhs: make usbhs_write32() static

PATCH New Ben Dooks 4 participants 4 messages Jun 21, 2016 – Jun 24, 2016

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 usb: renesas_usbhs: make usbhs_write32() static

The usbhs_write32 function is not used outside of the rcar3.c file, so fix the following sparse warning by making it static:

drivers/usb/renesas_usbhs/rcar3.c:26:6: warning: symbol 'usbhs_write32' was not declared. Should it be static?

---
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-usb at vger.kernel.org
Cc: linux-renesas-soc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org

---
 drivers/usb/renesas_usbhs/rcar3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/renesas_usbhs/rcar3.c +1 -1
index 38b01f2..1d70add 100644
@@ -23,7 +23,7 @@
 #define UGCTRL2_RESERVED_3	0x00000001	/* bit[3:0] should be B'0001 */
 #define UGCTRL2_USB0SEL_OTG	0x00000030
 
-void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
+static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
 {
 	iowrite32(data, priv->base + reg);
 }
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/1 usb: renesas_usbhs: make usbhs_write32() static

Quoted 30 lines · Ben Dooks

The usbhs_write32 function is not used outside of the rcar3.c file, so fix the following sparse warning by making it static:

drivers/usb/renesas_usbhs/rcar3.c:26:6: warning: symbol 'usbhs_write32' was not declared. Should it be static?

---
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-usb at vger.kernel.org
Cc: linux-renesas-soc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org

---
 drivers/usb/renesas_usbhs/rcar3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/renesas_usbhs/rcar3.c +1 -2
index 38b01f2..1d70add 100644
@@ -23,7 +23,7 @@
 #define UGCTRL2_RESERVED_3     0x00000001      /* bit[3:0] should be B'0001 */
 #define UGCTRL2_USB0SEL_OTG    0x00000030
 
-void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
+static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
 {
        iowrite32(data, priv->base + reg);
 }
--
Quoted 1 line

2.8.1

static inline ?

#2 lore raw

PATCH 1/1 usb: renesas_usbhs: make usbhs_write32() static

Hi,

Quoted 25 lines · Mathieu Malaterre
Quoted 24 lines · Ben Dooks

The usbhs_write32 function is not used outside of the rcar3.c file, so fix the following sparse warning by making it static:

drivers/usb/renesas_usbhs/rcar3.c:26:6: warning: symbol 'usbhs_write32' was not declared. Should it be static?

---
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-usb at vger.kernel.org
Cc: linux-renesas-soc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org

---
 drivers/usb/renesas_usbhs/rcar3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/renesas_usbhs/rcar3.c +0 -0
index 38b01f2..1d70add 100644
@@ -23,7 +23,7 @@
 #define UGCTRL2_RESERVED_3     0x00000001      /* bit[3:0] should be B'0001 */
 #define UGCTRL2_USB0SEL_OTG    0x00000030
 
Quoted 9 lines
Quoted 7 lines
drivers/usb/renesas_usbhs/rcar3.c +1 -2
-void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
+static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
 {
        iowrite32(data, priv->base + reg);
 }
--

2.8.1

static inline ?

why? compiler can make that choice

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160622/f3a7f447/attachment.sig>
#3 lore raw

PATCH 1/1 usb: renesas_usbhs: make usbhs_write32() static

In reply to Ben Dooks

Hi,

Quoted 9 lines

From: Ben Dooks
Sent: Wednesday, June 22, 2016 2:53 AM

The usbhs_write32 function is not used outside of the rcar3.c file, so fix the following sparse warning by making it static:

drivers/usb/renesas_usbhs/rcar3.c:26:6: warning: symbol 'usbhs_write32' was not declared. Should it be static?

Thank you for the patch.

Best regards,
Yoshihiro Shimoda

Quoted 25 lines

---
Cc: Yoshihiro Shimoda <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: linux-usb at vger.kernel.org
Cc: linux-renesas-soc at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org

---
 drivers/usb/renesas_usbhs/rcar3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/renesas_usbhs/rcar3.c +1 -2
index 38b01f2..1d70add 100644
@@ -23,7 +23,7 @@
 #define UGCTRL2_RESERVED_3	0x00000001	/* bit[3:0] should be B'0001 */
 #define UGCTRL2_USB0SEL_OTG	0x00000030
 
-void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
+static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
 {
 	iowrite32(data, priv->base + reg);
 }
--

2.8.1