Skip to contentSkip to conversation

soc: xilinx: zynqmp: Mark soc_xilinx_zynqmp_get_machine() as static

PATCH Applied Venkatesh Yadav Abbarapu 2 participants 2 messages Oct 4, 2022 – Oct 7, 2022 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc: xilinx: zynqmp: Mark soc_xilinx_zynqmp_get_machine() as static

Fix the following sparse and compile time warning triggered with W=1:

drivers/soc/soc_xilinx_zynqmp.c:288:5:
warning: no previous prototype for 'soc_xilinx_zynqmp_get_machine' [-Wmissing-prototypes]

---

 drivers/soc/soc_xilinx_zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/soc_xilinx_zynqmp.c +1 -1
index c10fc7d444..a51bcdb478 100644
@@ -285,7 +285,7 @@ static int soc_xilinx_zynqmp_get_family(struct udevice *dev, char *buf, int size
 	return snprintf(buf, size, "%s", priv->family);
 }
 
-int soc_xilinx_zynqmp_get_machine(struct udevice *dev, char *buf, int size)
+static int soc_xilinx_zynqmp_get_machine(struct udevice *dev, char *buf, int size)
 {
 	struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
 	const char *machine = priv->machine;
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 17 lines · Venkatesh Yadav Abbarapu

Fix the following sparse and compile time warning triggered with W=1:

drivers/soc/soc_xilinx_zynqmp.c:288:5:
warning: no previous prototype for 'soc_xilinx_zynqmp_get_machine' [-Wmissing-prototypes]

---

  drivers/soc/soc_xilinx_zynqmp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/soc_xilinx_zynqmp.c +0 -0
index c10fc7d444..a51bcdb478 100644

drivers/soc/soc_xilinx_zynqmp.c static int soc_xilinx_zynqmp_get_family(struct udevice *dev, char *buf, int size · line 291

Quoted 8 lines
drivers/soc/soc_xilinx_zynqmp.c +1 -1
@@ -285,7 +285,7 @@ static int soc_xilinx_zynqmp_get_family(struct udevice *dev, char *buf, int size
  	return snprintf(buf, size, "%s", priv->family);
  }
 
-int soc_xilinx_zynqmp_get_machine(struct udevice *dev, char *buf, int size)
+static int soc_xilinx_zynqmp_get_machine(struct udevice *dev, char *buf, int size)
  {
  	struct soc_xilinx_zynqmp_priv *priv = dev_get_priv(dev);
  	const char *machine = priv->machine;

Applied.
M