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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 645DBC282DD for ; Fri, 10 Jan 2020 00:13:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 378422077C for ; Fri, 10 Jan 2020 00:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730042AbgAJANz (ORCPT ); Thu, 9 Jan 2020 19:13:55 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:32546 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730001AbgAJANy (ORCPT ); Thu, 9 Jan 2020 19:13:54 -0500 Date: 10 Jan 2020 09:13:53 +0900 X-IronPort-AV: E=Sophos;i="5.69,414,1571670000"; d="scan'208";a="36109116" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 10 Jan 2020 09:13:53 +0900 Received: from morimoto-PC.renesas.com (unknown [10.166.18.140]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 58238400D0EF; Fri, 10 Jan 2020 09:13:53 +0900 (JST) Message-ID: <87d0bstbge.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Geert Uytterhoeven Cc: Yoshinori Sato , Rich Felker , Andrew Morton , Linux-SH , Linux-Renesas Subject: Re: [PATCH][repost] sh: clkfwk: remove r8/r16/r32 In-Reply-To: References: <87o8vdsceg.wl-kuninori.morimoto.gx@renesas.com> <87lfqhscac.wl-kuninori.morimoto.gx@renesas.com> User-Agent: Wanderlust/2.15.9 Emacs/24.5 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi Geert > > From: Kuninori Morimoto > > > > SH will get below warning > > > > ${LINUX}/drivers/sh/clk/cpg.c: In function 'r8': > > ${LINUX}/drivers/sh/clk/cpg.c:41:17: warning: passing argument 1 of 'ioread8' > > discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] > > return ioread8(addr); > > ^~~~ > > In file included from ${LINUX}/arch/sh/include/asm/io.h:21, > > from ${LINUX}/include/linux/io.h:13, > > from ${LINUX}/drivers/sh/clk/cpg.c:14: > > ${LINUX}/include/asm-generic/iomap.h:29:29: note: expected 'void *' but > > argument is of type 'const void *' > > extern unsigned int ioread8(void __iomem *); > > ^~~~~~~~~~~~~~ > > > > We don't need "const" for r8/r16/r32. > > And we don't need r8/r16/r32 themselvs. > > This patch cleanup these. > > > > Signed-off-by: Kuninori Morimoto > > Reviewed-by: Geert Uytterhoeven Thanks > > static int sh_clk_mstp_enable(struct clk *clk) > > { > > sh_clk_write(sh_clk_read(clk) & ~(1 << clk->enable_bit), clk); > > if (clk->status_reg) { > > - unsigned int (*read)(const void __iomem *addr); > > + unsigned int (*read)(void __iomem *addr); > > While it is good to get rid of the wrappers, the change above will conflict with > [PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic > implementation) > (https://lore.kernel.org/lkml/20200108200528.4614-2-krzk@kernel.org/), > which will add const to ioread*(). Oh, I see. Will consider about it, and post v2 Thank you for your help !! Best regards --- Kuninori Morimoto