Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp371328pxj; Thu, 13 May 2021 06:57:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2yxWSoa9dLGQTTQVJ85ePdVhFYIpqLHpSurKZe4MHDakCxGyl3Nep7d+ODSI+N9RtWKC3 X-Received: by 2002:aa7:d04a:: with SMTP id n10mr4159854edo.33.1620914233839; Thu, 13 May 2021 06:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620914233; cv=none; d=google.com; s=arc-20160816; b=Y4Qnt1mAwObbm1fkjCffqDAWzF3LnSew5niJFlopOIdWSV57LoAYarkQZqYTRLH/uH Qljob1cBWWQiuE0YHg1v+UYZG/DZLPBPoEO08FDaLzqcdbocn6uHJDAlK5GRKeiKUYqg EtcNfi3M2Gyhw3qD7U3OsY9Y6NKKnfw5W7UIMTjoYkHfw7lNmQP+hwVasBfF6R8vPc1C HGBF9LvfItbwHM5L0gPUykwBr315tr03aMJhL8VvL8vmhbq7sWdrjNC2vouiB6G9cDnb yEVpahqZNMb7xay0RnJKaBb2IojfwVSGQczB5GyUia7wAK2n9hrP2NIv8iqbBMOw1zUj /gEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sW01dsRfZgSx1qPEB/LE7cCOq/dFN8HHoOWbpzbrh0k=; b=DoYkV4/1geeGQpT5TF0q4nkrg5VEpo1UA5PaVLNL59TQlugsAFNasjuxKWWCCQmlmV ct+8KjLESXuirDcic2vrVm0M7afStM3ReDH66op/lflkDbBv/HpN/ZJcjmkESbkst4W7 VfX7zPxqjjTx6NMMWvJy4YtdX9LnPUdqSiGjwhnnQwjpkQuVhNp4yeauL+BlxAOFTASk MDVOuGK8EnSJp6FlrUH1PMr1Niyg1R5n92DEBmWH5AcqSf81/xaPnDbWEaG1UaM2L+NF 17KtttwMTnocZ31z1i5DG1Uuq/sSuGwXYGsddD5RJHYbE0fQaRjO0507tf0EFPIxr0gj 3Zag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="WNfS/rZ0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si3100152edd.385.2021.05.13.06.56.47; Thu, 13 May 2021 06:57:13 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="WNfS/rZ0"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234254AbhEMNwK (ORCPT + 99 others); Thu, 13 May 2021 09:52:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:57406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234240AbhEMNv4 (ORCPT ); Thu, 13 May 2021 09:51:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2029613C8; Thu, 13 May 2021 13:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620913846; bh=CEA3FRQtgAztdkKO3KsZGDizTo3tS40qy8xIl9x5pbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WNfS/rZ0bk0a17LDgRG87v+2N5Xv39RBnKGdAR/l5SGXGb7YIaeE3XRGzi99Hg9vF 0B3Nk2edw5woKPNwOoKlxkqiw1nOiox50+gn8uwhr3Ei1CQ7YRlcYzYJievKukdPaV DfkZMUMLy8n30ckSK5jGDCujPQNrwn/gW9hlcC3A= Date: Thu, 13 May 2021 15:50:43 +0200 From: Greg Kroah-Hartman To: Gong Ruiqi Cc: Wang Weiyang , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH -next] drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO Message-ID: References: <20210513110716.25791-1-gongruiqi1@huawei.com> <017d9fae-328f-e93f-095e-bdfa0cc2f2ff@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <017d9fae-328f-e93f-095e-bdfa0cc2f2ff@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 13, 2021 at 09:22:44PM +0800, Gong Ruiqi wrote: > > > On 2021/05/13 19:26, Greg Kroah-Hartman wrote: > > On Thu, May 13, 2021 at 07:07:16PM +0800, Ruiqi Gong wrote: > > > The Sparse tool reports as follows: > > > > > > drivers/base/node.c:239:1: warning: > > > symbol 'dev_attr_line_size' was not declared. Should it be static? > > > drivers/base/node.c:240:1: warning: > > > symbol 'dev_attr_indexing' was not declared. Should it be static? > > > > > > These symbols (and several others) are defined by DEVICE_ATTR_RO(name) in > > > CACHE_ATTR(name, fmt), and all of them are not used outside of node.c. So let's > > > mark DEVICE_ATTR_RO(name) static to solve these complains from Sparse. > > > > Why not fix them all at once? Why only one here? > > Sorry for not making it clear enough. Actually the patch does fix them all. > Those symbols reported by Sparse are generated when two of the following > macros are expanded: > > CACHE_ATTR(size, "%llu") > CACHE_ATTR(line_size, "%u") > CACHE_ATTR(indexing, "%u") > CACHE_ATTR(write_policy, "%u") > > So one fix of the CACHE_ATTR's definition fixs them all. Ok, can you please rewrite the changelog text to make it more clear? thanks, greg k-h