Message ID | 028298a8b70a67a70bc7b7eb0b07d9780fc1e5f3.1673181086.git.christophe.jaillet@wanadoo.fr |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1685723wrt; Sun, 8 Jan 2023 04:36:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXvEhJTvff+aD2PG31KLjSXuWNacAudYg5ZCg16b04cJxUk8wjfQcxJgEhL92IhW80UM9yVZ X-Received: by 2002:a17:90a:d0c6:b0:226:ff8e:8bcb with SMTP id y6-20020a17090ad0c600b00226ff8e8bcbmr3071663pjw.42.1673181393979; Sun, 08 Jan 2023 04:36:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673181393; cv=none; d=google.com; s=arc-20160816; b=UN63EXu+bFsQiQUQYg4M4sDzf++ivseVwTZEogFJBNLf4M9ehihnOhNCkqbp6mW/lw pQf5GT8bOXtZq397rMs7hZZtYklck53rbR25J4V3ErMlngd9+o6lrcB+WmUeIyBhdnFx aoGhDtFjeQ94n/xwEoEWcTPQPl9gqab4ydR9EgTtq6GvfzwkNEnoBJmrmaORVORgZ4It w9CUt2PahZsMN7gb0O3o8cyczeSthC9b12baY+b3k1K/QW/1oJMB37N1KRPQ4MPGLzh7 BGO4QNnvGqmPtVIY6Z9w4XEWZaM+yjYhZXedbWcBgoL+PDwrV7HwM6zTyRH3b95M1t0t fhUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=14GysCcBbzKcUy6onN95ZP6KsJjtzsLE0JWy5drvEBY=; b=PIeLdJRI3ajGFTF7ulmSRcUZ59T7rVxvLPknNGdgg3NPNUP/W5ffPb80DOmGh5graO BHy0p7u9haBgTEdgLpqg75x2kfptqhpNvYGEBxbpLMr0HslOsoLr9/cW24iHrwJQ/DAT odh1p+trpskYTesSndgQNE3gX+Jiz7ycbxHc2LMsYeEQR0coGE+JmkFf0WLdqmRs9t7v zcSwX4KYup3Y6HBXxfpjhAXM5ATqgY0us2joEf3133nKedCYh2m9dzyyDW2e+phpjdea AiJ9VE1ZFel5XbOXV/motDguoQMvr2lHMYbtxxlZQ/AxSliovjnE+mwYsbHWC8wuiUYf QfrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi16-20020a17090b1e5000b00213120e0c85si11894275pjb.156.2023.01.08.04.36.21; Sun, 08 Jan 2023 04:36:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233132AbjAHMdA (ORCPT <rfc822;old.home.clock.tower@gmail.com> + 99 others); Sun, 8 Jan 2023 07:33:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232624AbjAHMc7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 8 Jan 2023 07:32:59 -0500 Received: from smtp.smtpout.orange.fr (smtp-29.smtpout.orange.fr [80.12.242.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19057BF5D for <linux-kernel@vger.kernel.org>; Sun, 8 Jan 2023 04:32:56 -0800 (PST) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id EUr7pusmESTJGEUr7pUBmi; Sun, 08 Jan 2023 13:32:54 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 08 Jan 2023 13:32:54 +0100 X-ME-IP: 86.243.100.34 From: Christophe JAILLET <christophe.jaillet@wanadoo.fr> To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET <christophe.jaillet@wanadoo.fr> Subject: [PATCH] fs/dcache: Remove unneeded math.h and rculist.h includes Date: Sun, 8 Jan 2023 13:32:52 +0100 Message-Id: <028298a8b70a67a70bc7b7eb0b07d9780fc1e5f3.1673181086.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754457853739115236?= X-GMAIL-MSGID: =?utf-8?q?1754457853739115236?= |
Series |
fs/dcache: Remove unneeded math.h and rculist.h includes
|
|
Commit Message
Christophe JAILLET
Jan. 8, 2023, 12:32 p.m. UTC
<linux/math.h> and <linux/rculist.h> are not used by <linux/dcache.h>.
Remove them.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
I've built:
arch/mips (cross-built)
arch/powerpc (cross-built)
drivers/crypto/caam/
drivers/gpu/drm/msm/
drivers/infiniband/hw/hfi1/
drivers/net/ethernet/amd/xgbe/
drivers/net/ethernet/freescale/dpaa2/
drivers/net/wireless/marvell/libertas/debugfs.o
drivers/s390/cio/ccwgroup.o (cross-built)
drivers/usb/gadget/function/f_mass_storage.o
fs/
kernel/events/core.o
kernel/sysctl.o
lib/
net/unix/af_unix.o
security/
Let see if build-bots spot something I've missed.
---
include/linux/dcache.h | 2 --
1 file changed, 2 deletions(-)
Comments
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v6.2-rc2 next-20230106]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Christophe-JAILLET/fs-dcache-Remove-unneeded-math-h-and-rculist-h-includes/20230108-203341
patch link: https://lore.kernel.org/r/028298a8b70a67a70bc7b7eb0b07d9780fc1e5f3.1673181086.git.christophe.jaillet%40wanadoo.fr
patch subject: [PATCH] fs/dcache: Remove unneeded math.h and rculist.h includes
config: arc-buildonly-randconfig-r004-20230108
compiler: arc-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/91f2fb9c6cb473dcca5bec7ebe0c813252b97d7d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Christophe-JAILLET/fs-dcache-Remove-unneeded-math-h-and-rculist-h-includes/20230108-203341
git checkout 91f2fb9c6cb473dcca5bec7ebe0c813252b97d7d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/ecryptfs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/list_bl.h:6,
from include/linux/rculist_bl.h:8,
from include/linux/dcache.h:7,
from fs/ecryptfs/dentry.c:11:
include/linux/bit_spinlock.h: In function 'bit_spin_lock':
>> include/linux/bit_spinlock.h:30:25: error: implicit declaration of function 'cpu_relax' [-Werror=implicit-function-declaration]
30 | cpu_relax();
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/cpu_relax +30 include/linux/bit_spinlock.h
626d607435617c Nicholas Piggin 2011-01-07 9
fb1c8f93d869b3 Ingo Molnar 2005-09-10 10 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 11 * bit-based spin_lock()
fb1c8f93d869b3 Ingo Molnar 2005-09-10 12 *
fb1c8f93d869b3 Ingo Molnar 2005-09-10 13 * Don't use this unless you really need to: spin_lock() and spin_unlock()
fb1c8f93d869b3 Ingo Molnar 2005-09-10 14 * are significantly faster.
fb1c8f93d869b3 Ingo Molnar 2005-09-10 15 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 16 static inline void bit_spin_lock(int bitnum, unsigned long *addr)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 17 {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 18 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 19 * Assuming the lock is uncontended, this never enters
fb1c8f93d869b3 Ingo Molnar 2005-09-10 20 * the body of the outer loop. If it is contended, then
fb1c8f93d869b3 Ingo Molnar 2005-09-10 21 * within the inner loop a non-atomic test is used to
fb1c8f93d869b3 Ingo Molnar 2005-09-10 22 * busywait with less bus contention for a good time to
fb1c8f93d869b3 Ingo Molnar 2005-09-10 23 * attempt to acquire the lock bit.
fb1c8f93d869b3 Ingo Molnar 2005-09-10 24 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 25 preempt_disable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 26 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
b8dc93cbe91324 Nicholas Piggin 2007-10-18 27 while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 28 preempt_enable();
3dd2ee4824b668 Linus Torvalds 2011-04-25 29 do {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 @30 cpu_relax();
3dd2ee4824b668 Linus Torvalds 2011-04-25 31 } while (test_bit(bitnum, addr));
fb1c8f93d869b3 Ingo Molnar 2005-09-10 32 preempt_disable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 33 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 34 #endif
fb1c8f93d869b3 Ingo Molnar 2005-09-10 35 __acquire(bitlock);
fb1c8f93d869b3 Ingo Molnar 2005-09-10 36 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 37
Le 08/01/2023 à 15:01, kernel test robot a écrit : > Hi Christophe, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linus/master] > [also build test ERROR on v6.2-rc2 next-20230106] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Christophe-JAILLET/fs-dcache-Remove-unneeded-math-h-and-rculist-h-includes/20230108-203341 > patch link: https://lore.kernel.org/r/028298a8b70a67a70bc7b7eb0b07d9780fc1e5f3.1673181086.git.christophe.jaillet%40wanadoo.fr > patch subject: [PATCH] fs/dcache: Remove unneeded math.h and rculist.h includes > config: arc-buildonly-randconfig-r004-20230108 > compiler: arc-elf-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/91f2fb9c6cb473dcca5bec7ebe0c813252b97d7d > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Christophe-JAILLET/fs-dcache-Remove-unneeded-math-h-and-rculist-h-includes/20230108-203341 > git checkout 91f2fb9c6cb473dcca5bec7ebe0c813252b97d7d > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/ecryptfs/ > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@intel.com> > > All errors (new ones prefixed by >>): > > In file included from include/linux/list_bl.h:6, > from include/linux/rculist_bl.h:8, > from include/linux/dcache.h:7, > from fs/ecryptfs/dentry.c:11: > include/linux/bit_spinlock.h: In function 'bit_spin_lock': >>> include/linux/bit_spinlock.h:30:25: error: implicit declaration of function 'cpu_relax' [-Werror=implicit-function-declaration] > 30 | cpu_relax(); > | ^~~~~~~~~ > cc1: some warnings being treated as errors > > > vim +/cpu_relax +30 include/linux/bit_spinlock.h > > 626d607435617c Nicholas Piggin 2011-01-07 9 > fb1c8f93d869b3 Ingo Molnar 2005-09-10 10 /* > fb1c8f93d869b3 Ingo Molnar 2005-09-10 11 * bit-based spin_lock() > fb1c8f93d869b3 Ingo Molnar 2005-09-10 12 * > fb1c8f93d869b3 Ingo Molnar 2005-09-10 13 * Don't use this unless you really need to: spin_lock() and spin_unlock() > fb1c8f93d869b3 Ingo Molnar 2005-09-10 14 * are significantly faster. > fb1c8f93d869b3 Ingo Molnar 2005-09-10 15 */ > fb1c8f93d869b3 Ingo Molnar 2005-09-10 16 static inline void bit_spin_lock(int bitnum, unsigned long *addr) > fb1c8f93d869b3 Ingo Molnar 2005-09-10 17 { > fb1c8f93d869b3 Ingo Molnar 2005-09-10 18 /* > fb1c8f93d869b3 Ingo Molnar 2005-09-10 19 * Assuming the lock is uncontended, this never enters > fb1c8f93d869b3 Ingo Molnar 2005-09-10 20 * the body of the outer loop. If it is contended, then > fb1c8f93d869b3 Ingo Molnar 2005-09-10 21 * within the inner loop a non-atomic test is used to > fb1c8f93d869b3 Ingo Molnar 2005-09-10 22 * busywait with less bus contention for a good time to > fb1c8f93d869b3 Ingo Molnar 2005-09-10 23 * attempt to acquire the lock bit. > fb1c8f93d869b3 Ingo Molnar 2005-09-10 24 */ > fb1c8f93d869b3 Ingo Molnar 2005-09-10 25 preempt_disable(); > fb1c8f93d869b3 Ingo Molnar 2005-09-10 26 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) > b8dc93cbe91324 Nicholas Piggin 2007-10-18 27 while (unlikely(test_and_set_bit_lock(bitnum, addr))) { > fb1c8f93d869b3 Ingo Molnar 2005-09-10 28 preempt_enable(); > 3dd2ee4824b668 Linus Torvalds 2011-04-25 29 do { > fb1c8f93d869b3 Ingo Molnar 2005-09-10 @30 cpu_relax(); > 3dd2ee4824b668 Linus Torvalds 2011-04-25 31 } while (test_bit(bitnum, addr)); > fb1c8f93d869b3 Ingo Molnar 2005-09-10 32 preempt_disable(); > fb1c8f93d869b3 Ingo Molnar 2005-09-10 33 } > fb1c8f93d869b3 Ingo Molnar 2005-09-10 34 #endif > fb1c8f93d869b3 Ingo Molnar 2005-09-10 35 __acquire(bitlock); > fb1c8f93d869b3 Ingo Molnar 2005-09-10 36 } > fb1c8f93d869b3 Ingo Molnar 2005-09-10 37 > I've sent a fix in [1]. I'll re-test harder the patch against <inux/dcache.h> and repost it if/when [1] is merged. CJ [1]: https://lore.kernel.org/all/8b81101d59a31f4927016c17e49be96754a23380.1673204461.git.christophe.jaillet@wanadoo.fr/
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 6b351e009f59..c4db829d48cf 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -4,8 +4,6 @@ #include <linux/atomic.h> #include <linux/list.h> -#include <linux/math.h> -#include <linux/rculist.h> #include <linux/rculist_bl.h> #include <linux/spinlock.h> #include <linux/seqlock.h>