Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp990832rwr; Thu, 27 Apr 2023 10:42:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WoqgUjbxHUBxYAqwZJcpa+Zr7yA2T9ruQdLvjV6GfvDBt8fGWbur0ObRpP6ECYyaiuAuv X-Received: by 2002:a05:6a00:1a4b:b0:627:fe88:a2e with SMTP id h11-20020a056a001a4b00b00627fe880a2emr3225385pfv.0.1682617373832; Thu, 27 Apr 2023 10:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617373; cv=none; d=google.com; s=arc-20160816; b=Dq6UAKHhkT9hpKB7589ZeRii6ljhxuenoRQydybGBGewBvsBL3h8Ais55tPJ3E8iCa 8sTF4L/2B4pRid8586XBltqXOnCARHB2c0DcT4z3Cp0kSXwJmpcicLUoOYHxufvwsdxX VZn736fk3WRFxEhQNS2VSYuJrPqR85AAGy9muhIYKpDAnoc2RaFrCyRAprrJymxzwLlA 9hu4CVDBZ3DYVNP3JM7VU5HAj0kRoCMaQ4sDkP7zCG1iTrACBdQ1Ty98S1yEBP0ZfmOG YTDCNMnReEBiTkz4oLrR3eOjEYkl4sh3In+x9TuuBJavIEjgSTDDOuw4js+1bR2dgTeK qwkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:from:subject :dkim-signature:dkim-filter; bh=y5FKETkcR5bJeA05EuMUf08/uW3fzemI0xL6hftJZ0w=; b=GMJNNJfGd4Lt7gLHjzcGE5w54fEOPMH2NKv2c45XuRIws8t76aAD/+r3SAyZcGVChC CQM/5vC3lIluGwgaDSibFlhjUoX3pu+XZqW8z1qZRnjcbnExJ11hMenVSnt5eU/GItkV oLMMMHymhuMN5M7bAhnrSQ9aY/3WJB5lr9Cpb/KoI4b4v2igRAc5nv6LLOSowYeLfUyJ fcOyY0t9Cnpbi3bvWMs99P8upCc/fyrf5YvzqL/pDdE8kIAgnac2rrog+Tq0kUxESeFv Gv/C5YXHGZ+LYoHeY0UMgQwe41m1PPA3SHk/h2qAEkrGTSYgqBJxyfaR2EhNmMGQf9/K 8kgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=I81ONq4f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x24-20020aa78f18000000b0062a450c329dsi19435157pfr.93.2023.04.27.10.42.40; Thu, 27 Apr 2023 10:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=I81ONq4f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244455AbjD0RmZ (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244449AbjD0RmS (ORCPT ); Thu, 27 Apr 2023 13:42:18 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B40EA3584; Thu, 27 Apr 2023 10:42:04 -0700 (PDT) Received: from skinsburskii.localdomain (c-67-170-100-148.hsd1.wa.comcast.net [67.170.100.148]) by linux.microsoft.com (Postfix) with ESMTPSA id 1256821C33E2; Thu, 27 Apr 2023 10:42:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1256821C33E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617324; bh=y5FKETkcR5bJeA05EuMUf08/uW3fzemI0xL6hftJZ0w=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=I81ONq4flDFybAHDmcdEBwB18AgoI8OINU6R4Az6WvVIVzocvmY/pieHzLajTdhKo HA0Dp+jT2ScUGmry+Oi6xup26Stlv/BVUUj8EZqzcf+c26o+ieBPHo+PXorzzsW/Y4 ltVQ+ERLydTb/l5zHlX3TcVCAlUq35bKUAjZ5cSk= Subject: [PATCH 2/7] alpha: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Richard Henderson , Ivan Kokshaysky , Matt Turner , Arnd Bergmann , Geert Uytterhoeven , Linus Walleij , Stanislav Kinsburskii , Michael Ellerman , Bjorn Helgaas , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:31 -0700 Message-ID: <168155745118.13678.3878958755096151716.stgit@skinsburskii.localdomain> In-Reply-To: <168155718437.13678.714141668943813263.stgit@skinsburskii.localdomain> References: <168155718437.13678.714141668943813263.stgit@skinsburskii.localdomain> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-15.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_96_XX, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH, MISSING_HEADERS,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislav Kinsburskii These two helper functions - virt_to_phys and isa_virt_to_bus - don't need the address pointer to be mutable. In the same time expecting it to be mutable leads to the following build warning for constant pointers: warning: passing argument 1 of ‘virt_to_phys’ discards ‘const’ qualifier from pointer target type Signed-off-by: Stanislav Kinsburskii CC: Richard Henderson CC: Ivan Kokshaysky CC: Matt Turner CC: Arnd Bergmann CC: Geert Uytterhoeven CC: Linus Walleij CC: Stanislav Kinsburskii CC: Michael Ellerman CC: Bjorn Helgaas CC: linux-alpha@vger.kernel.org CC: linux-kernel@vger.kernel.org --- arch/alpha/include/asm/io.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index 7aeaf7c30a6f..0e2016537bd3 100644 --- a/arch/alpha/include/asm/io.h +++ b/arch/alpha/include/asm/io.h @@ -56,7 +56,7 @@ extern inline void set_hae(unsigned long new_hae) * Change virtual addresses to physical addresses and vv. */ #ifdef USE_48_BIT_KSEG -static inline unsigned long virt_to_phys(volatile void *address) +static inline unsigned long virt_to_phys(const volatile void *address) { return (unsigned long)address - IDENT_ADDR; } @@ -66,7 +66,7 @@ static inline void * phys_to_virt(unsigned long address) return (void *) (address + IDENT_ADDR); } #else -static inline unsigned long virt_to_phys(volatile void *address) +static inline unsigned long virt_to_phys(const volatile void *address) { unsigned long phys = (unsigned long)address; @@ -104,7 +104,7 @@ static inline void * phys_to_virt(unsigned long address) extern unsigned long __direct_map_base; extern unsigned long __direct_map_size; -static inline unsigned long __deprecated isa_virt_to_bus(volatile void *address) +static inline unsigned long __deprecated isa_virt_to_bus(const volatile void *address) { unsigned long phys = virt_to_phys(address); unsigned long bus = phys + __direct_map_base;