From patchwork Thu Jan 9 00:30:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 11324921 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 E99AC1398 for ; Thu, 9 Jan 2020 00:30:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6D5E20720 for ; Thu, 9 Jan 2020 00:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727670AbgAIAal (ORCPT ); Wed, 8 Jan 2020 19:30:41 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:35353 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726438AbgAIAal (ORCPT ); Wed, 8 Jan 2020 19:30:41 -0500 Date: 09 Jan 2020 09:30:40 +0900 X-IronPort-AV: E=Sophos;i="5.69,411,1571670000"; d="scan'208";a="36231173" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 09 Jan 2020 09:30:40 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id ECC4C412EA89; Thu, 9 Jan 2020 09:30:39 +0900 (JST) Message-ID: <87k161sc7k.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH][repost] SH: Convert iounmap() macros to inline functions User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 To: Yoshinori Sato , Rich Felker , Andrew Morton Cc: Linux-SH , Linux-Renesas In-Reply-To: <87o8vdsceg.wl-kuninori.morimoto.gx@renesas.com> References: <87o8vdsceg.wl-kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Kuninori Morimoto Macro iounmap() do nothing, but that results in unused variable warnings all over the place. This patch convert it to inline to avoid warning We will get this warning without this patch ${LINUX}/drivers/thermal/broadcom/ns-thermal.c:78:21: \ warning: unused variable 'ns_thermal' [-Wunused-variable] struct ns_thermal *ns_thermal = platform_get_drvdata(pdev); ^~~~~~~~~~ Fixes: 98c90e5ea34e9 ("sh: remove __iounmap") Signed-off-by: Kuninori Morimoto Acked-by: Sam Ravnborg --- arch/sh/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 1495489..351a0a9 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -328,7 +328,7 @@ __ioremap_mode(phys_addr_t offset, unsigned long size, pgprot_t prot) #else #define __ioremap(offset, size, prot) ((void __iomem *)(offset)) #define __ioremap_mode(offset, size, prot) ((void __iomem *)(offset)) -#define iounmap(addr) do { } while (0) +static inline void iounmap(void __iomem *addr) {} #endif /* CONFIG_MMU */ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)