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=ham 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 49CE9C2D0C6 for ; Fri, 27 Dec 2019 18:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DD9220722 for ; Fri, 27 Dec 2019 18:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577470594; bh=GYAiOy07T+ykLeb+hCT6lXSIG+xqYiuRzQzeHMN3wWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SmbsNRlfnzdFrPEysA0s3B7KNTxjDPEfFekBxW8EC0xPs2eTiuKBMjdVnF5SORaS7 9JITcxfAzq3hpjgQ2fNpTvVAdCQXKIwKfMkQWP/rsjRigYDKCdEdOBgpRwez5zzJB/ +hRFcIzQdKIR8L3wKyNpluppzMCzxGstF7EPkq64= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbfL0SQc (ORCPT ); Fri, 27 Dec 2019 13:16:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:41456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727695AbfL0SQQ (ORCPT ); Fri, 27 Dec 2019 13:16:16 -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 E71DF21927; Fri, 27 Dec 2019 18:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577470575; bh=GYAiOy07T+ykLeb+hCT6lXSIG+xqYiuRzQzeHMN3wWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T184cwJhylxIKXZoF1kNn5oAzH27G67hH5/qvo+m/Z/h7HzmNCVDWZCCClY7zZMqZ kZik95fKzcj2DRN1C7L4SAjAOXVO11set+lPKUS6eGzqEH1+PXRFeAwNz7OKoUSlKW BfmpPbsmzAwxIY76hosfzLROqedGmOiYMcNv/bUo= 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.4 22/25] parisc: Fix compiler warnings in debug_core.c Date: Fri, 27 Dec 2019 13:15:46 -0500 Message-Id: <20191227181549.8040-22-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191227181549.8040-1-sashal@kernel.org> References: <20191227181549.8040-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 0a90b965cccb..9849bef2a766 100644 --- a/arch/parisc/include/asm/cmpxchg.h +++ b/arch/parisc/include/asm/cmpxchg.h @@ -43,8 +43,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