From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35A7BC2D0C6 for ; Fri, 27 Dec 2019 18:03:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09DCD206CB for ; Fri, 27 Dec 2019 18:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577469830; bh=sy2Calgp9CwR7ibuyNniX63iyl5RxqkfSkdj2DtD6cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Lg/wAyd4yyjxwsDOY6wOgMf3aVGTzKlORxfwP7qNKC1LOqvJUgkJmmNAr7hbbJwik D2O2/iRrAJtUrbCVl7y9koI4F/RGRVXKYirZwVX/q3XWDPKn4NpYhlD+yOZ2qZ9lCV mYNxEdZ87Y+mbeBK4u86Bdkw2iy3wMBysYjTRq5s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728691AbfL0SD3 (ORCPT ); Fri, 27 Dec 2019 13:03:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:60714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728686AbfL0SD1 (ORCPT ); Fri, 27 Dec 2019 13:03:27 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A43C2173E; Fri, 27 Dec 2019 18:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577469806; bh=sy2Calgp9CwR7ibuyNniX63iyl5RxqkfSkdj2DtD6cM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wtV4bh0S0i/t5I3QqXbndb1eHygbgjOX5YprWVvqn+EiNRX7Ny+4TzsxG29gXcnxy 2PZNqcDFkqL1Kr4d/XQE41yqmYY936eMplM/4UvM1vpo7LTrVAJgv5xR+F2rvaE+XL EH4Ch7k4I3fRJydxpUG5XmQn/657gvNz+EpoH9VE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Helge Deller , Sasha Levin , linux-parisc@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 53/57] parisc: Fix compiler warnings in debug_core.c Date: Fri, 27 Dec 2019 13:02:18 -0500 Message-Id: <20191227180222.7076-53-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191227180222.7076-1-sashal@kernel.org> References: <20191227180222.7076-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org From: Helge Deller [ Upstream commit 75cf9797006a3a9f29a3a25c1febd6842a4a9eb2 ] Fix this compiler warning: kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’: arch/parisc/include/asm/cmpxchg.h:48:3: warning: value computed is not used [-Wunused-value] 48 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) arch/parisc/include/asm/atomic.h:78:30: note: in expansion of macro ‘xchg’ 78 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ^~~~ kernel/debug/debug_core.c:596:4: note: in expansion of macro ‘atomic_xchg’ 596 | atomic_xchg(&kgdb_active, cpu); | ^~~~~~~~~~~ Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- arch/parisc/include/asm/cmpxchg.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/parisc/include/asm/cmpxchg.h b/arch/parisc/include/asm/cmpxchg.h index f627c37dad9c..ab5c215cf46c 100644 --- a/arch/parisc/include/asm/cmpxchg.h +++ b/arch/parisc/include/asm/cmpxchg.h @@ -44,8 +44,14 @@ __xchg(unsigned long x, __volatile__ void *ptr, int size) ** if (((unsigned long)p & 0xf) == 0) ** return __ldcw(p); */ -#define xchg(ptr, x) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) +#define xchg(ptr, x) \ +({ \ + __typeof__(*(ptr)) __ret; \ + __typeof__(*(ptr)) _x_ = (x); \ + __ret = (__typeof__(*(ptr))) \ + __xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \ + __ret; \ +}) /* bug catcher for when unsupported size is used - won't link */ extern void __cmpxchg_called_with_bad_pointer(void); -- 2.20.1