Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1728524pxx; Fri, 30 Oct 2020 18:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBBGqD9dLieIdiF3JGChipJO6DllW+pYyPnDF+72b72o49LAibcP74x8iEiadIPPzAsKVI X-Received: by 2002:a17:906:eca4:: with SMTP id qh4mr5222673ejb.76.1604107361956; Fri, 30 Oct 2020 18:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604107361; cv=none; d=google.com; s=arc-20160816; b=t/SDRidMusij2Hx0yrFP9h7gISzTwPcd24UOjCecM6y/G3HCtvv4ZcP11ud6vOgv7M 33Pj/D3WncQZULQc4yz4kTZws2SuvFDqa+tvWnEe1dKbAfhTX9N07tcO5xGi+Uc592oE 7kpHGD6ff+o/MO697gpRL1wJt3EVOI3fKpxIV883WV1gIGJSLDA2WXPB9LLNTem45LS+ 2LSRukiV7H2jRxu2GE60gCLy9fBx0WYQX3umtDf6beYKjpPPzB6gSz5vpC/JZyyP7wpr vLsRR5nKhlYoMNH0BJSplacxGfYWHvMiYFjSCkbH6bWpLP4NWJVFA4/XcOmDzh/mMZpU CsEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=s4+qkgQKXnsuQD3pj40+Rtf/9Glv9cSviA5PGTFlz5k=; b=o7IH0OlDqKD7LKfET7iuU719gVOikWn5nzw2xTck23Bfzf+pTuHJD8LDL3sbuttrYn HeUWrF+VY2yzkKOHrB6em7wcDKRo3Abau+fgICS/UKXODifcJbKnjz8m4+ArtJRTTAT2 OoB3E9WHb3OVM3uLiE55rDCpOiAPaaT1sLsR///cwa86gedxywUvvJNN9fnCPvtCzLi6 AuARv9d5h5y7gZOxwogkWSe1wo5geOQjwE+086f4eUqew4QejdiL6J458pYcX/cn/XRW Ynlk8AqXUpnF3+5k1Z6kQZZaUNjou/OqmAz0rHkbz0zQu6IcZStnIWjRit5BQ+ZOZLoz kiJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si6745118ejv.268.2020.10.30.18.22.20; Fri, 30 Oct 2020 18:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725937AbgJaBUQ (ORCPT + 99 others); Fri, 30 Oct 2020 21:20:16 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7118 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgJaBUQ (ORCPT ); Fri, 30 Oct 2020 21:20:16 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CNLvd6NdRzLrrN; Sat, 31 Oct 2020 09:20:13 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Sat, 31 Oct 2020 09:20:05 +0800 From: Zou Wei To: , CC: , , "Zou Wei" Subject: [PATCH -next v3] platform/x86/dell-wmi-sysman: Make some symbols static Date: Sat, 31 Oct 2020 09:32:02 +0800 Message-ID: <1604107922-14950-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following sparse warnings: ./passobj-attributes.c:38:23: warning: symbol 'po_is_pass_set' was not declared. Should it be static? ./passobj-attributes.c:70:23: warning: symbol 'po_current_password' was not declared. Should it be static? ./passobj-attributes.c:99:23: warning: symbol 'po_new_password' was not declared. Should it be static? ./passobj-attributes.c:103:23: warning: symbol 'po_min_pass_length' was not declared. Should it be static? ./passobj-attributes.c:107:23: warning: symbol 'po_max_pass_length' was not declared. Should it be static? ./passobj-attributes.c:116:23: warning: symbol 'po_mechanism' was not declared. Should it be static? ./passobj-attributes.c:129:23: warning: symbol 'po_role' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zou Wei --- v2: - put all of them in a way that each occupies only a single line v3: - shorten the warning paths - put the static codes a single line .../x86/dell-wmi-sysman/passobj-attributes.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c b/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c index e6199fb..3abcd95 100644 --- a/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c +++ b/drivers/platform/x86/dell-wmi-sysman/passobj-attributes.c @@ -35,8 +35,7 @@ static ssize_t is_enabled_show(struct kobject *kobj, struct kobj_attribute *attr return ret; } -struct kobj_attribute po_is_pass_set = - __ATTR_RO(is_enabled); +static struct kobj_attribute po_is_pass_set = __ATTR_RO(is_enabled); static ssize_t current_password_store(struct kobject *kobj, struct kobj_attribute *attr, @@ -67,8 +66,7 @@ static ssize_t current_password_store(struct kobject *kobj, return count; } -struct kobj_attribute po_current_password = - __ATTR_WO(current_password); +static struct kobj_attribute po_current_password = __ATTR_WO(current_password); static ssize_t new_password_store(struct kobject *kobj, struct kobj_attribute *attr, @@ -96,16 +94,13 @@ static ssize_t new_password_store(struct kobject *kobj, return ret ? ret : count; } -struct kobj_attribute po_new_password = - __ATTR_WO(new_password); +static struct kobj_attribute po_new_password = __ATTR_WO(new_password); attribute_n_property_show(min_password_length, po); -struct kobj_attribute po_min_pass_length = - __ATTR_RO(min_password_length); +static struct kobj_attribute po_min_pass_length = __ATTR_RO(min_password_length); attribute_n_property_show(max_password_length, po); -struct kobj_attribute po_max_pass_length = - __ATTR_RO(max_password_length); +static struct kobj_attribute po_max_pass_length = __ATTR_RO(max_password_length); static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) @@ -113,8 +108,7 @@ static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr, return sprintf(buf, "password\n"); } -struct kobj_attribute po_mechanism = - __ATTR_RO(mechanism); +static struct kobj_attribute po_mechanism = __ATTR_RO(mechanism); static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) @@ -126,8 +120,7 @@ static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr, return -EIO; } -struct kobj_attribute po_role = - __ATTR_RO(role); +static struct kobj_attribute po_role = __ATTR_RO(role); static struct attribute *po_attrs[] = { &po_is_pass_set.attr, -- 2.6.2