Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2399815rdb; Mon, 12 Feb 2024 03:51:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOBmSXXTMPneKnxiTQyd5jRNL2hymkMKkVQ8z6naVupKrljaOkZb6y8/p5YAd8iqg/zmxE X-Received: by 2002:a17:90b:28c:b0:295:c61c:1c07 with SMTP id az12-20020a17090b028c00b00295c61c1c07mr3282513pjb.21.1707738711818; Mon, 12 Feb 2024 03:51:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707738711; cv=pass; d=google.com; s=arc-20160816; b=pY5nQ5LXZlKP4gcYhD6+WG4XHEwxZ3HkdpZGQEQzbuT7H63oIBgkNsBcSTwdRRC3JS DjTCUbDs8nY9q08zThC984PQcM4uo1BbSO+OGCvEyeYem6rcIrQ+u60TmQ4REDNNjWTV lrRJ4jqTA9k3BvRFkZy5n3vregzkwtCwmfz8+va6I4IJhbmwSH9D8e/cPGd9xi8xatse 7OZ/yNxgGDvDxe4/465GG4GELghCdslmEbkNNHYSS9/aAosOi8Fi8X8viSiuAjNYBZWu h9uRjvH5NH9+/Owz3okj1Jv96RPXCUma/JcA45Bzxb8w9iVp6N4YCQPnxQY8ReSrTTOU Audg== 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:dkim-signature; bh=pYv2ZqzhnGNqxHImmQ0qxj2JzMohrxWjOtMkoPV71Sw=; fh=bumL0ySdB6PFDoHz8ACCjfItceXB4P8H6HwrSKoZICI=; b=ofs5qVIBBccoGGCWN01OZNMCWEZqO/D50un9sZNL2BXcjMMwaoeahy1VrNJcuHiZf0 s1VfSmsfTrRNJCBGgt0BShLYhOUD05i9CpACVYxpJx3+zuos/xc9hRJxBZmflSjGFpsx eROTp7E4B9LmoFQXept+/Ini5ncRKeuOJewINnqdSIGblf84u4mo/02qMVCrF8UzfwCN y+i6h9WJGTEhDJOc33xtSkD7GjnnXy4QmwCU32r+LHxaEpKTHZM94wL4LUYjZ96gzJkp TLxH0F8qxHnjqHIZ/XlzyVuQ/AZT9ki8Xcrv7ukHzuhjpUj21+RrWaRaI5yt2EAXhARC atBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUw6YATQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXW+7AIqPIqnirNmxry0a9GimlALdR0WVKI4AcGejpAkJAx+m2rPrkYII6DuKq0QgCuPLTNRIRGQNKkCj6BAtkGiKDUN8wencLtdLihKg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a2-20020a17090a740200b00294731fbed3si165980pjg.146.2024.02.12.03.51.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:51:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61425-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mUw6YATQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-61425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 B6720B2713E for ; Mon, 12 Feb 2024 11:26:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32B2039863; Mon, 12 Feb 2024 11:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mUw6YATQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60F5139843 for ; Mon, 12 Feb 2024 11:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707737186; cv=none; b=F9TMkPvJVqkfQIaToSnrNVMFNJnctojZyYjsEFV4LsUjjfxxcddOu5EGjxxoesO5SGOJD31Sik8NMx7NILxDZxjxBE4i+b8wwosNH0F3m3l4nrvh5KsavgEUD7dp5BCI8SOx3eBjfNBCHH7BgzRifKXxr21R4rLHncCp+2AYGqo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707737186; c=relaxed/simple; bh=kQ/S3yu+q6V9l0izkm6EyVa7NqjSw7TIbz/RHpeNZGQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ZejiGBuxt8E5VlRRuemjFBSQ/aLOoiGhjFVbd99ipi4L1gH7qcRWDmBjAs/uKKsRbFfufPL75xND6t+1j+HPDLtMbhUt9WeKXVdHjK9i0z8peIZyyoCyi+QO5I+AEhaK8rdkEjVE6B5t2B3Hot0CYAYfSz3GzwbRTiMqix976Ak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mUw6YATQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DC46C433F1; Mon, 12 Feb 2024 11:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707737186; bh=kQ/S3yu+q6V9l0izkm6EyVa7NqjSw7TIbz/RHpeNZGQ=; h=From:To:Cc:Subject:Date:From; b=mUw6YATQ8JVpYKdj2Lw3pu47bZv2hsO0fbcavt4UmDk8fbiUf2lPstw2uC2/g377D fYIZ5fPNWQdmxs7ZMxqgjgGawEPUpRUQPDXKvGl1lbu6MRRiyQ8EXLUFjMG2GySi1v gYlSSofEBkzYsHhsF6xbL4DwplxkVTpEb/8NHMgLUb0az88Ok064+CTWW/EUDhwNmv zOKHhn04toeNuWxoQgMFe9or1xx2Q/Nfw7y7Y/jKD5bN2YmHuvt0VyN5BfbWnE4uUm UJNFR1alaa0FkMGseyCWIJUHx3xwB932WbEdDfjil5+9Pcd5ut063YZr+HhNEBhRdk ZwSCc9nLlKJIQ== From: Arnd Bergmann To: NeilBrown , Christian Brauner , Jeff Layton Cc: Arnd Bergmann , Luca Vizzarro , Tom Talpey , linux-kernel@vger.kernel.org Subject: [PATCH] filelock: ignore 'lock' argument to for_each_file_lock() Date: Mon, 12 Feb 2024 12:26:11 +0100 Message-Id: <20240212112620.1272058-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann When CONFIG_FILE_LOCKING is disabled, ceph causes a warning about a variable that is only used insode of the for_each_file_lock() loop: fs/ceph/locks.c: In function 'ceph_count_locks': fs/ceph/locks.c:380:27: error: unused variable 'lock' [-Werror=unused-variable] 380 | struct file_lock *lock; Rather than working around this in ceph, change the macro definition to still contain a reference to the variable in order to shut up the warning. Fixes: 75cabec0111b ("filelock: add some new helper functions") Signed-off-by: Arnd Bergmann --- include/linux/filelock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/filelock.h b/include/linux/filelock.h index aabd4bdf7eba..69290173280a 100644 --- a/include/linux/filelock.h +++ b/include/linux/filelock.h @@ -283,7 +283,7 @@ static inline void locks_wake_up(struct file_lock *fl) { } -#define for_each_file_lock(_fl, _head) while(false) +#define for_each_file_lock(_fl, _head) while((void)_fl, false) static inline void locks_free_lock_context(struct inode *inode) -- 2.39.2