From patchwork Mon Jan 20 01:22:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 11340865 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D4EB14B4 for ; Mon, 20 Jan 2020 01:22:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B69420684 for ; Mon, 20 Jan 2020 01:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728946AbgATBWW (ORCPT ); Sun, 19 Jan 2020 20:22:22 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:31186 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728909AbgATBWW (ORCPT ); Sun, 19 Jan 2020 20:22:22 -0500 Date: 20 Jan 2020 10:22:21 +0900 X-IronPort-AV: E=Sophos;i="5.70,340,1574089200"; d="scan'208";a="37085490" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 20 Jan 2020 10:22:21 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 95B594008546; Mon, 20 Jan 2020 10:22:21 +0900 (JST) Message-ID: <87k15myl9u.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH resend 3/3] sh: Convert ins[bwl]/outs[bwl] macros to inline functions User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 To: Andrew Morton Cc: Linux-SH , Linux-Renesas , Yoshinori Sato , Rich Felker In-Reply-To: <87o8uyylat.wl-kuninori.morimoto.gx@renesas.com> References: <87o8uyylat.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org From: Kuninori Morimoto Macro ins[bwl]/outs[bwl] are just calling BUG(), but that results in unused variable warnings all over the place. This patch convert macro to inline to avoid warning We will get this kind of warning without this patch ${LINUX}/drivers/iio/adc/ad7606_par.c:21:23: \ warning: unused variable 'st' [-Wunused-variable] struct ad7606_state *st = iio_priv(indio_dev); ^~ Signed-off-by: Kuninori Morimoto --- arch/sh/include/asm/io_noioport.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/arch/sh/include/asm/io_noioport.h b/arch/sh/include/asm/io_noioport.h index 90d6109..f7938fe 100644 --- a/arch/sh/include/asm/io_noioport.h +++ b/arch/sh/include/asm/io_noioport.h @@ -53,12 +53,34 @@ static inline void ioport_unmap(void __iomem *addr) #define outw_p(x, addr) outw((x), (addr)) #define outl_p(x, addr) outl((x), (addr)) -#define insb(a, b, c) BUG() -#define insw(a, b, c) BUG() -#define insl(a, b, c) BUG() +static inline void insb(unsigned long port, void *dst, unsigned long count) +{ + BUG(); +} + +static inline void insw(unsigned long port, void *dst, unsigned long count) +{ + BUG(); +} + +static inline void insl(unsigned long port, void *dst, unsigned long count) +{ + BUG(); +} -#define outsb(a, b, c) BUG() -#define outsw(a, b, c) BUG() -#define outsl(a, b, c) BUG() +static inline void outsb(unsigned long port, const void *src, unsigned long count) +{ + BUG(); +} + +static inline void outsw(unsigned long port, const void *src, unsigned long count) +{ + BUG(); +} + +static inline void outsl(unsigned long port, const void *src, unsigned long count) +{ + BUG(); +} #endif /* __ASM_SH_IO_NOIOPORT_H */