[firefly] [PATCH] net: ipv4: ipconfig fix sparse non static symbol warnings

Daniel Baluta daniel.baluta at gmail.com
Tue Apr 15 08:02:53 EEST 2014


On Mon, Apr 14, 2014 at 11:18 PM, Matei Oprea <eu at opreamatei.ro> wrote:
> Fix sparse "should be static" warnings. Those structures
> are only referenced in file scope. They can be marked as static.
>
> Signed-off-by: Matei Oprea <eu at opreamatei.ro>
> Cc: ROSEdu Kernel Community <firefly at lists.rosedu.org>
> ---
>  net/ipv4/ipconfig.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index b3e86ea..85782a1 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -136,14 +136,14 @@ __be32 ic_myaddr = NONE;          /* My IP address */
>  static __be32 ic_netmask = NONE;       /* Netmask for local subnet */
>  __be32 ic_gateway = NONE;      /* Gateway IP address */
>
> -__be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
> +static __be32 ic_addrservaddr = NONE;  /* IP Address of the IP addresses'server */
>
>  __be32 ic_servaddr = NONE;     /* Boot server IP address */
>
>  __be32 root_server_addr = NONE;        /* Address of NFS server */
>  u8 root_server_path[256] = { 0, };     /* Path to mount as root */

What about these? ic_servaddr, root_server_addr and root_server_path?

>
> -__be32 ic_dev_xid;             /* Device under configuration */
> +static __be32 ic_dev_xid;              /* Device under configuration */
>
>  /* vendor class identifier */
>  static char vendor_class_identifier[253] __initdata;

Make sure you run checkpatch.pl on your patch.

thanks,
Daniel.


More information about the firefly mailing list