Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp544200lqg; Fri, 1 Mar 2024 13:01:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVy7/PXaWTxPcXtBdTO/nEyOS0zpd9TSP1pgmumJPyuHvUiUqlc473WxcZIgLizsOwTaIUwcsslYebormqRiy1WzrRmFlQZ/nFhzppwBw== X-Google-Smtp-Source: AGHT+IF2rnJ3yWuGh32ONoodXtBmiHrvanbXXzUNi/6Vk88vRhwjvyp84XgP/tTrB+EYOITUMARK X-Received: by 2002:a17:902:e843:b0:1db:9a7d:2e6 with SMTP id t3-20020a170902e84300b001db9a7d02e6mr3903645plg.48.1709326842780; Fri, 01 Mar 2024 13:00:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709326842; cv=pass; d=google.com; s=arc-20160816; b=gODnyXI+J/ry37HADr9dB0EjGMBEqIx/cu7ypUt2ewnEMHjiS5XbVfMmxEbp++qbtp 7lSXCOGLcnlaeWtK15k+1yeMg6MCRhl/Ziq6ew+voYIe2j9CV2Xq/SpqBhpnzCcAjlB2 uu0JdYXHaO59J3k0RykXWpEXDg61Pg6TMUM1dMcFG0YbDBMXeKZc++gGCG+Wl4fsXxYH LgF3EYKfoYMM0fCmgNKCt0/zeBsY2kRLcLumO4NEPq0QVLSWuEUHKre1RNULi9V5gq5o dB1u4i6boFhVZ30FrvIR5r3r4QbCiZj3dlPbGrVTEtQkEciNfHnjQpe8e87484TpoPs0 lUbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=N7TR6DFfD+oWM7t3Fjmx5gZehzFwtFqGj1i1aJSfR44=; fh=slfJbIyQnFGFkYu8LZYCdW7Iq4gPBuN4HsZujlfovWA=; b=zKMfJK74MEzc7cDt94ymHa352PGo60qrtMvDUuwWsJIa/AhXVvslY5qjAYD6cLs8XB yCmxz+B0EqKYNMsLgs2opkquLpGcLxWyRlF3BPOpvyBWzciitt9O/ZnzT3+UGJeSpWa7 kbPKGukPfVu5D+tg6uNjydjK615RbK8UXzXpR0004MHUTEYg7fxsW5z9BRILPpG8pcD7 kNfUGaTkcBcXHXQ33e+BcPkUgKF4yR8fV4UOHINUxy4wRaTunD0FO44Kw6DDrhXHAjzw 3rTF5VNCz2FV0saA1TrG/Hq+chyPCrzZ1iDF5tWDnuAPeZiR0ehBoQKn92emlu51w5C+ +2KQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-89105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89105-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c9-20020a170903234900b001dbc739f470si4338488plh.480.2024.03.01.13.00.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 13:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-89105-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89105-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9EBFFB2A3C1 for ; Fri, 1 Mar 2024 20:43:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E47E33D565; Fri, 1 Mar 2024 20:43:31 +0000 (UTC) Received: from albert.telenet-ops.be (albert.telenet-ops.be [195.130.137.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAC897E1 for ; Fri, 1 Mar 2024 20:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.137.90 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709325811; cv=none; b=nwp/ZMhzM60kLVP3GXUNFl3u+JzoRCa07nJH5XXHCNRWxYk14jEeMA070ZTmCDwxHuirra6YeLScMORQBKqzraa/zfCJ45wEYIeAZnPmnvb4xebIjqTc3mI2BMyv0cK0u73ECkjyX5Ld7MgF1DsKjtfXrx1aHR50Fovbgsp1ruQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709325811; c=relaxed/simple; bh=jBducU6AissFsRYWwrJSlsUVKj30198x189rdgDINZY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=nAjZK6YjkuAE8QTmXn4Ph8ki/4iHhmQbY30H6L+YAw4lDA5S6qheXTQ/nuSH4l+mfRpbnCTcvvQUrIJ5mcsAir1MPO+wjJlPX1oFuLXHMS4VrRYeph+BXa0ZcYU1R16pB5nYgS+1iy2sFYsaby4t78JA4XQUMczJI6oWb36PeuI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.137.90 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:db22:6af9:7d18:6ee8]) by albert.telenet-ops.be with bizsmtp id tYjM2B0021TWuYv06YjMa6; Fri, 01 Mar 2024 21:43:21 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rg9io-0024bO-2H; Fri, 01 Mar 2024 21:43:20 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rg9iy-00D2xT-Q1; Fri, 01 Mar 2024 21:43:20 +0100 From: Geert Uytterhoeven To: Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Arnd Bergmann Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC] locking/spinlocks: Make __raw_* lock ops static Date: Fri, 1 Mar 2024 21:43:19 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit sh/sdk7786_defconfig (CONFIG_GENERIC_LOCKBREAK=y and CONFIG_DEBUG_LOCK_ALLOC=n): kernel/locking/spinlock.c:68:17: warning: no previous prototype for '__raw_spin_lock' [-Wmissing-prototypes] kernel/locking/spinlock.c:80:26: warning: no previous prototype for '__raw_spin_lock_irqsave' [-Wmissing-prototypes] kernel/locking/spinlock.c:98:17: warning: no previous prototype for '__raw_spin_lock_irq' [-Wmissing-prototypes] kernel/locking/spinlock.c:103:17: warning: no previous prototype for '__raw_spin_lock_bh' [-Wmissing-prototypes] kernel/locking/spinlock.c:68:17: warning: no previous prototype for '__raw_read_lock' [-Wmissing-prototypes] kernel/locking/spinlock.c:80:26: warning: no previous prototype for '__raw_read_lock_irqsave' [-Wmissing-prototypes] kernel/locking/spinlock.c:98:17: warning: no previous prototype for '__raw_read_lock_irq' [-Wmissing-prototypes] kernel/locking/spinlock.c:103:17: warning: no previous prototype for '__raw_read_lock_bh' [-Wmissing-prototypes] kernel/locking/spinlock.c:68:17: warning: no previous prototype for '__raw_write_lock' [-Wmissing-prototypes] kernel/locking/spinlock.c:80:26: warning: no previous prototype for '__raw_write_lock_irqsave' [-Wmissing-prototypes] kernel/locking/spinlock.c:98:17: warning: no previous prototype for '__raw_write_lock_irq' [-Wmissing-prototypes] kernel/locking/spinlock.c:103:17: warning: no previous prototype for '__raw_write_lock_bh' [-Wmissing-prototypes] Fix this by making the __raw_* lock ops static. Signed-off-by: Geert Uytterhoeven --- Compile-tested only. Is SH really the only SMP platform where CONFIG_GENERIC_LOCKBREAK=y? --- kernel/locking/spinlock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c index 8475a0794f8c5ad2..7009b568e6255d64 100644 --- a/kernel/locking/spinlock.c +++ b/kernel/locking/spinlock.c @@ -65,7 +65,7 @@ EXPORT_PER_CPU_SYMBOL(__mmiowb_state); * towards that other CPU that it should break the lock ASAP. */ #define BUILD_LOCK_OPS(op, locktype) \ -void __lockfunc __raw_##op##_lock(locktype##_t *lock) \ +static void __lockfunc __raw_##op##_lock(locktype##_t *lock) \ { \ for (;;) { \ preempt_disable(); \ @@ -77,7 +77,7 @@ void __lockfunc __raw_##op##_lock(locktype##_t *lock) \ } \ } \ \ -unsigned long __lockfunc __raw_##op##_lock_irqsave(locktype##_t *lock) \ +static unsigned long __lockfunc __raw_##op##_lock_irqsave(locktype##_t *lock) \ { \ unsigned long flags; \ \ @@ -95,12 +95,12 @@ unsigned long __lockfunc __raw_##op##_lock_irqsave(locktype##_t *lock) \ return flags; \ } \ \ -void __lockfunc __raw_##op##_lock_irq(locktype##_t *lock) \ +static void __lockfunc __raw_##op##_lock_irq(locktype##_t *lock) \ { \ _raw_##op##_lock_irqsave(lock); \ } \ \ -void __lockfunc __raw_##op##_lock_bh(locktype##_t *lock) \ +static void __lockfunc __raw_##op##_lock_bh(locktype##_t *lock) \ { \ unsigned long flags; \ \ -- 2.34.1