Re: [PATCH -next v2] platform/x86/dell-wmi-sysman: Make some symbols static

From: Andy Shevchenko
Date: Fri Oct 30 2020 - 07:14:21 EST


On Fri, Oct 30, 2020 at 4:38 AM Zou Wei <zou_wei@xxxxxxxxxx> wrote:
>
> Fix the following sparse warnings:
>
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:38:23: warning: symbol 'po_is_pass_set' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:70:23: warning: symbol 'po_current_password' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:99:23: warning: symbol 'po_new_password' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:103:23: warning: symbol 'po_min_pass_length' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:107:23: warning: symbol 'po_max_pass_length' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:116:23: warning: symbol 'po_mechanism' was not declared. Should it be static?
> drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c:129:23: warning: symbol 'po_role' was not declared. Should it be static?

Above can be shrinked by removing the path.

> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: Zou Wei <zou_wei@xxxxxxxxxx>
> ---
> v2:
> - put all of them in a way that each occupies only a single line

I meant the code, like

> -struct kobj_attribute po_is_pass_set =
> +static struct kobj_attribute po_is_pass_set =
> __ATTR_RO(is_enabled);

==>

static struct kobj_attribute po_is_pass_set = __ATTR_RO(is_enabled);

--
With Best Regards,
Andy Shevchenko