diff mbox series

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

Message ID 20221004055201.26146-1-venkatesh.abbarapu@amd.com
State Changes Requested
Delegated to: Michal Simek
Headers show
Series soc: xilinx: zynqmp: Mark soc_xilinx_zynqmp_get_machine() as static | expand

Commit Message

Venkatesh Yadav Abbarapu Oct. 4, 2022, 5:52 a.m. UTC
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]

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
---

 drivers/soc/soc_xilinx_zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Simek Oct. 7, 2022, 9:35 a.m. UTC | #1
On 10/4/22 07:52, Venkatesh Yadav Abbarapu wrote:
> 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]
> 
> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
> ---
> 
>   drivers/soc/soc_xilinx_zynqmp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
> index c10fc7d444..a51bcdb478 100644
> --- a/drivers/soc/soc_xilinx_zynqmp.c
> +++ b/drivers/soc/soc_xilinx_zynqmp.c
> @@ -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
diff mbox series

Patch

diff --git a/drivers/soc/soc_xilinx_zynqmp.c b/drivers/soc/soc_xilinx_zynqmp.c
index c10fc7d444..a51bcdb478 100644
--- a/drivers/soc/soc_xilinx_zynqmp.c
+++ b/drivers/soc/soc_xilinx_zynqmp.c
@@ -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;