Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp954790pxj; Wed, 2 Jun 2021 16:16:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIvMBRFXAiVbwAPE8+wS7tJpGl+wtu+MY+ii8lJVXneeV4TYDVf1g3vEqTnRDAkYWIvuOV X-Received: by 2002:a17:906:5391:: with SMTP id g17mr23878906ejo.461.1622675818025; Wed, 02 Jun 2021 16:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622675818; cv=none; d=google.com; s=arc-20160816; b=fRJjNNmUQ7KxeZII0YRMULgJfFVuvwbCksZ9rd0F0CxzgRWzCYSqBZJ89VCNr5oRLR gDYrj72Al42TYAcnPfu6Wjsv04ou/wM0U4bcPi7GxIRl1wBprX1JaLWEppUpTHbp4Zw/ sXB7ixGhj2H6pRLU6j+c1Mj+dRUIxmMtCGx3TOswluHJvpw6qPxC/m3nu/hVg+XBjB6W KjRaeJKrAY9bcLh2Li4apO11mVh3IJx/wqLPgYnnTgE1mgk9HS9SsAsy2FwIqSGhP54T tnpJdolklShljb92yG2X1F5ujpyb7uwFZwBylHebn069Y9ePCTXMPz9u9d8HaUhd7XyM tCWw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OWeI8yG+U4QiJiOTGgtyXdt04jv4M8JxUTJKKLhJHis=; b=hciRn4fC3bMnZSXo98CwXr4adg5KL4N87ialfINl9Gu0NjUjFIW62gfcLmpjOENA2O JrvX+9q7wH9Cb1P1X8ATTdGfUja6YmorETO875NiA37Ud/1Gb3OSauQ2fkxffilx7rol +tQkInD5/JXZa6noBQc3f6dlYl2jrg/D+Y8cqM0VGleaWLd74mQCXZoIqUDbCRvlBk8N jru9vfsdjECwX8ZHThs7XQBqzPNZKoarsnHzys9ZCXdKWiswbhNjmu6KNUQmWOejfoBY jSxGqFjZLXIoWH2AnzQ2rEITTycRmta+HRSt3SsaOSvjByDynJQKSQMdumn/MPMCWUGt 618Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=K3dDtRTD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si878114ejx.156.2021.06.02.16.16.35; Wed, 02 Jun 2021 16:16:58 -0700 (PDT) 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=@infradead.org header.s=bombadil.20210309 header.b=K3dDtRTD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229878AbhFBXQf (ORCPT + 99 others); Wed, 2 Jun 2021 19:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbhFBXQb (ORCPT ); Wed, 2 Jun 2021 19:16:31 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054A0C06174A; Wed, 2 Jun 2021 16:14:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=OWeI8yG+U4QiJiOTGgtyXdt04jv4M8JxUTJKKLhJHis=; b=K3dDtRTDLWuarsG6HH4dUCTDhK ayzVzx79W9wDddoVbJs6MnB7pyXNJwdQTucHJ8IU0JqwIUhtqVfjvdTxO+9EwXZluWB0KQtKEn86/ s8I3Yej3DUSuC0wdqB9fTToYth2gWn+oneGoE4n6SEC5w2yLEXXrSN3WXA83F8IpqS0guuSh9/XIG 55QB9OGkI8rTCKxvKnxaBn8Z6oflvopqxarkkagQOH7r1P2CqmYUWmGMj2zz9t4I5gXrYheeU1aU1 /YR6dzHw3UswFU+0MVqkT889ZWkrdXmvJTQhhSyzygrgt2sUYoY7Qju75xHonzqEKnsGJFDetKENr fy/nnfyQ==; Received: from [2601:1c0:6280:3f0::ce7d] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1loa4U-006Rln-Fh; Wed, 02 Jun 2021 23:14:46 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Takashi YOSHII Subject: [PATCH 4/4] sh: fix READ/WRITE redefinition warnings Date: Wed, 2 Jun 2021 16:14:43 -0700 Message-Id: <20210602231443.4670-4-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210602231443.4670-1-rdunlap@infradead.org> References: <20210602231443.4670-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kernel.h defines READ and WRITE, so rename the SH math-emu macros to MREAD and MWRITE. Fixes these warnings: ../arch/sh/math-emu/math.c:54: warning: "WRITE" redefined 54 | #define WRITE(d,a) ({if(put_user(d, (typeof (d) __user *)a)) return -EFAULT;}) In file included from ../arch/sh/math-emu/math.c:10: ../include/linux/kernel.h:37: note: this is the location of the previous definition 37 | #define WRITE 1 ../arch/sh/math-emu/math.c:55: warning: "READ" redefined 55 | #define READ(d,a) ({if(get_user(d, (typeof (d) __user *)a)) return -EFAULT;}) In file included from ../arch/sh/math-emu/math.c:10: ../include/linux/kernel.h:36: note: this is the location of the previous definition 36 | #define READ 0 Fixes: 4b565680d163 ("sh: math-emu support") Signed-off-by: Randy Dunlap Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Cc: Takashi YOSHII --- arch/sh/math-emu/math.c | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) --- linux-next-20210528.orig/arch/sh/math-emu/math.c +++ linux-next-20210528/arch/sh/math-emu/math.c @@ -51,8 +51,8 @@ #define Rn (regs->regs[n]) #define Rm (regs->regs[m]) -#define WRITE(d,a) ({if(put_user(d, (typeof (d) __user *)a)) return -EFAULT;}) -#define READ(d,a) ({if(get_user(d, (typeof (d) __user *)a)) return -EFAULT;}) +#define MWRITE(d,a) ({if(put_user(d, (typeof (d) __user *)a)) return -EFAULT;}) +#define MREAD(d,a) ({if(get_user(d, (typeof (d) __user *)a)) return -EFAULT;}) #define PACK_S(r,f) FP_PACK_SP(&r,f) #define UNPACK_S(f,r) FP_UNPACK_SP(f,&r) @@ -157,11 +157,11 @@ fmov_idx_reg(struct sh_fpu_soft_struct * { if (FPSCR_SZ) { FMOV_EXT(n); - READ(FRn, Rm + R0 + 4); + MREAD(FRn, Rm + R0 + 4); n++; - READ(FRn, Rm + R0); + MREAD(FRn, Rm + R0); } else { - READ(FRn, Rm + R0); + MREAD(FRn, Rm + R0); } return 0; @@ -173,11 +173,11 @@ fmov_mem_reg(struct sh_fpu_soft_struct * { if (FPSCR_SZ) { FMOV_EXT(n); - READ(FRn, Rm + 4); + MREAD(FRn, Rm + 4); n++; - READ(FRn, Rm); + MREAD(FRn, Rm); } else { - READ(FRn, Rm); + MREAD(FRn, Rm); } return 0; @@ -189,12 +189,12 @@ fmov_inc_reg(struct sh_fpu_soft_struct * { if (FPSCR_SZ) { FMOV_EXT(n); - READ(FRn, Rm + 4); + MREAD(FRn, Rm + 4); n++; - READ(FRn, Rm); + MREAD(FRn, Rm); Rm += 8; } else { - READ(FRn, Rm); + MREAD(FRn, Rm); Rm += 4; } @@ -207,11 +207,11 @@ fmov_reg_idx(struct sh_fpu_soft_struct * { if (FPSCR_SZ) { FMOV_EXT(m); - WRITE(FRm, Rn + R0 + 4); + MWRITE(FRm, Rn + R0 + 4); m++; - WRITE(FRm, Rn + R0); + MWRITE(FRm, Rn + R0); } else { - WRITE(FRm, Rn + R0); + MWRITE(FRm, Rn + R0); } return 0; @@ -223,11 +223,11 @@ fmov_reg_mem(struct sh_fpu_soft_struct * { if (FPSCR_SZ) { FMOV_EXT(m); - WRITE(FRm, Rn + 4); + MWRITE(FRm, Rn + 4); m++; - WRITE(FRm, Rn); + MWRITE(FRm, Rn); } else { - WRITE(FRm, Rn); + MWRITE(FRm, Rn); } return 0; @@ -240,12 +240,12 @@ fmov_reg_dec(struct sh_fpu_soft_struct * if (FPSCR_SZ) { FMOV_EXT(m); Rn -= 8; - WRITE(FRm, Rn + 4); + MWRITE(FRm, Rn + 4); m++; - WRITE(FRm, Rn); + MWRITE(FRm, Rn); } else { Rn -= 4; - WRITE(FRm, Rn); + MWRITE(FRm, Rn); } return 0; @@ -445,11 +445,11 @@ id_sys(struct sh_fpu_soft_struct *fregs, case 0x4052: case 0x4062: Rn -= 4; - WRITE(*reg, Rn); + MWRITE(*reg, Rn); break; case 0x4056: case 0x4066: - READ(*reg, Rn); + MREAD(*reg, Rn); Rn += 4; break; default: