Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13676381pxu; Mon, 4 Jan 2021 01:01:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNFl9qXQRBt6HcqH3jHw29jeZdjmiR0LFg3sD1CptAUGIZe7hETjYm+pQJ/PSPmDWPJi5Z X-Received: by 2002:a17:907:da7:: with SMTP id go39mr67988615ejc.58.1609750878725; Mon, 04 Jan 2021 01:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609750878; cv=none; d=google.com; s=arc-20160816; b=tQd4yTXGWWd98mcDc6cORKUNWCM1F7xT8Fq2g6Oy6kAdjkxPHdbjbOJtisWUU31PMQ GtGcKaYe/o54ilglxdQoRSEdHYt6sY80wS1mQWhQITpTe+udxf1npisyg1yqwaaFriui X3VbX3PtJzewcbtxhjOethHjfNFgAk+7myEGSU/WqXSBhrDZvw0UzUKhP/sEWI13wT1X 9dqS73W66UkkH/xhyr8Bam+bjQr+fqVoxAG7NWj5F+fMIYoKiDE5nZ0iHsrstdVWgdi7 1L4X3HW76Cat2yEhjQs0jHyCU4Zxp78TUUGHoZynBvsBYkQLdCvvpTiWmY+oACR2qI45 IIBw== 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:dkim-signature; bh=sQLWUfiDjLs2BZJNJKyljipZQUtK5rje+9ghULFCWn4=; b=kexe+NDZdliO27OPBdLfyxuNZIOUmL7RSkLaoZEq/Vsf31F6sioGXDcR0pfbgxaZfq nC2r6bC23rNfOic6Jq88sIph2rtfkykdEJaTCql9RWFAfL7g97Tu+Y832vSa5mDHMu28 t5o88qA6QZ5v2QZvtsN5gi5n/nPWfSNmU1yC8+KPQRpuKncpmS51Vz6kI14hFcKjnQBw JP4mKyymVJZZagxiK8N5d6LbYWtPFsnQQ+NDs0DL6UXXQL2bKPFuMxl5PFapOYYB/R52 oom1KfByhipsQ1PDJQgyNRcCDCwf/0n6v78sbYX0okQmB3gaItNnlXKprvWvUK8C1uoi CvZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rOnolACy; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si28672572ejz.458.2021.01.04.01.00.55; Mon, 04 Jan 2021 01:01:18 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=rOnolACy; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727040AbhADI6w (ORCPT + 99 others); Mon, 4 Jan 2021 03:58:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:39432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbhADI6v (ORCPT ); Mon, 4 Jan 2021 03:58:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EF3E207AE; Mon, 4 Jan 2021 08:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609750690; bh=V8PHXZ6MO5UWZbjzEqwye25+ofsH5oNZHJoowbG+BoI=; h=From:To:Cc:Subject:Date:From; b=rOnolACyk9lJQFhMEpY4NKKtR6xjjHhUxNalQGHRvqs59GyHqgg2OVRH3J4dqwIwq 5CfreMl8R3msAycB+miXtInUXlLNjHbHKP6n4A27kAFuAgy6qcRWT7wV/LhdxcOu+D WpOOPXjPi42bvQZTrp2ehdmttO1J7+DANe2kbg7xo6OFhvjHbrbw7GsykB6hpKPQ8z 69uAT+t6QETj3Oei9vpsZU9INPZugS7ijTC7BRhrquGFRzrUq8pU02Zw/r8nYHO8hw LMxiLfvYz7Mc4bgYKkh1DZgrN4ZgjWgNZilJP6A7IQy7Y0VEGIKutRa33ugafB3AwW PdSkqp0B+mhrw== From: Arnd Bergmann To: Tony Luck , Fenghua Yu Cc: Arnd Bergmann , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ia64: fix xchg() warning Date: Mon, 4 Jan 2021 09:58:02 +0100 Message-Id: <20210104085806.4176886-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann The definition if xchg() causes a harmless warning in some files, like: In file included from ../arch/ia64/include/uapi/asm/intrinsics.h:22, from ../arch/ia64/include/asm/intrinsics.h:11, from ../arch/ia64/include/asm/bitops.h:19, from ../include/linux/bitops.h:32, from ../include/linux/kernel.h:11, from ../fs/nfs/read.c:12: ../fs/nfs/read.c: In function 'nfs_read_completion': ../arch/ia64/include/uapi/asm/cmpxchg.h:57:2: warning: value computed is not used [-Wunused-value] 57 | ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../fs/nfs/read.c:196:5: note: in expansion of macro 'xchg' 196 | xchg(&nfs_req_openctx(req)->error, error); | ^~~~ Change it to a compound expression like the other architectures have to get a clean defconfig build. Signed-off-by: Arnd Bergmann --- arch/ia64/include/uapi/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/include/uapi/asm/cmpxchg.h b/arch/ia64/include/uapi/asm/cmpxchg.h index d69c979936d4..5d90307fd6e0 100644 --- a/arch/ia64/include/uapi/asm/cmpxchg.h +++ b/arch/ia64/include/uapi/asm/cmpxchg.h @@ -54,7 +54,7 @@ extern void ia64_xchg_called_with_bad_pointer(void); }) #define xchg(ptr, x) \ -((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)))) +({(__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr)));}) /* * Atomic compare and exchange. Compare OLD with MEM, if identical, -- 2.29.2