From patchwork Sat Apr 15 11:17:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433160vqo; Thu, 27 Apr 2023 10:46:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ76pj7fjhxQ9QFIzqwtEWp/B1X3Lv+/e99hJGzwK0iYWqqFE+hM41LV1PEUCqgUgPaCCabN X-Received: by 2002:a17:90a:fb53:b0:240:7f0d:9235 with SMTP id iq19-20020a17090afb5300b002407f0d9235mr2617860pjb.22.1682617563234; Thu, 27 Apr 2023 10:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617563; cv=none; d=google.com; s=arc-20160816; b=PJx4C3/dVVSpBMJa0TU5P0awegF4qrE8TMdX02L473FCSaq9D29b9OF9nzc3PVcj9I 8jDiDZJswnIpdCHxnBuR23x9dXJAq6upfuO+LlqU8JQ+sHJsLGGrfpyrwewji3OM7VAm eB4Wfn/f1Q0r8cNcN8rWV87WaBrkxu359X2pJVHAMFwLEoGau0arR/jZGZJJSioq27/G YTUP4ebmLwNy2jfxMlclwTEb26JdyDrQqLzRGcCCSELHIGpad+VuekVyVibDltzkCPJT 5YRAyinBPGVK+hdCQYB11onq+fQ4txdfeQI6LDki01HfxR7C0jstK9H/7Q2kDVQHblFv qIdQ== 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=XSS94wog701zQLpD7y0CmSI6sjOskvST2v9WTZpXSuw=; b=p7zzBJ8M66CIRHBfHe+qeLLOEXlCHe6tylz02imhZk+n1RQnBcda8N1TldM2vMuehp 8MTkuURMrnFZKJgyVLVp4JOck1ZNdEs+PGAKVOQKNrGtoGoOP8YY4/RMbatwEJ+I/9fp nS5Y4Js5jmsaRwi2V44VLoteQbs1BLayg+R1ZeuCDT2e/782YzcmgcsY6vxlfm1KVGA2 kmNfS1QmRj0Hj7zP1dqf0rOKUfHFKfR1dJRofKyILGRoda6cght/fzEE184dQLF+3NrH IC8UNwWmuWzR67FIkWj520mVLWbHadm+w6qQfqv6e9AyK1oAvPHQwn+dcvsvguwtsdgR vTXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=KC6Zwgtq; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y62-20020a638a41000000b005203991145csi19941253pgd.623.2023.04.27.10.45.48; Thu, 27 Apr 2023 10:46:03 -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=KC6Zwgtq; 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 S244472AbjD0RmV (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244389AbjD0RmL (ORCPT ); Thu, 27 Apr 2023 13:42:11 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D52F19F for ; Thu, 27 Apr 2023 10:41:59 -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 4F94A21C33E1; Thu, 27 Apr 2023 10:41:58 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4F94A21C33E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617318; bh=XSS94wog701zQLpD7y0CmSI6sjOskvST2v9WTZpXSuw=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=KC6ZwgtqC9euOjJ5w0tehDfyKXGSp1Mqj6NgboJFVNtYflzT8mCJPM/l4lIbnzDGk p7DdAzi8m//mycqsRrgF/e3gc9kFS0xufP0H+9XvT9HkhLJ7sT7OYTTkOt5qFxYMCw uvRl10ZdIMspxR6L3Q5lEKo4Pl6ssgQhmuAqRTq0= Subject: [PATCH 1/7] x86: asm/io.h: Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Geert Uytterhoeven , Arnd Bergmann , Chris Down , Helge Deller , Omar Sandoval , linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:25 -0700 Message-ID: <168155744546.13678.7653611641170146532.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352394302780548?= X-GMAIL-MSGID: =?utf-8?q?1764352394302780548?= 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: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: Dave Hansen CC: x86@kernel.org CC: "H. Peter Anvin" CC: Geert Uytterhoeven CC: Arnd Bergmann CC: Chris Down CC: Helge Deller CC: Omar Sandoval CC: linux-kernel@vger.kernel.org --- arch/x86/include/asm/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index e9025640f634..0e6f5b48f517 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -128,7 +128,7 @@ extern int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); * this function */ -static inline phys_addr_t virt_to_phys(volatile void *address) +static inline phys_addr_t virt_to_phys(const volatile void *address) { return __pa(address); } @@ -163,7 +163,7 @@ static inline void *phys_to_virt(phys_addr_t address) * However, we truncate the address to unsigned int to avoid undesirable * promotions in legacy drivers. */ -static inline unsigned int isa_virt_to_bus(volatile void *address) +static inline unsigned int isa_virt_to_bus(const volatile void *address) { return (unsigned int)virt_to_phys(address); } From patchwork Sat Apr 15 11:17:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433678vqo; Thu, 27 Apr 2023 10:47:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xx24O95FiGrukfRLadJeW/h47NZdI2DNcmkkUVb1kf4fqPHKpL8evBfkyAhQHAgsed+bS X-Received: by 2002:a17:902:c949:b0:1a6:9d1b:e18f with SMTP id i9-20020a170902c94900b001a69d1be18fmr2740593pla.45.1682617636520; Thu, 27 Apr 2023 10:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617636; cv=none; d=google.com; s=arc-20160816; b=uxtf6vha6x2/V7lTqy7LdyLglWnlRQ8D6Yd0ETwaEhJYgA36JHGmaQpQfr3jBio40T FQp+fmVnp8V+p1G09J7mb6QBKmKSdD8jnFXAU/NFecFEPmgmMWbkCJLZOWEnpP3EJCOC CQdxaDw4XIGi8VFddtCgfhckf4DlJkS4vLR3YcUwtTAbKiSruXq0xh97RZegFAro4PEG OwQyuniX9nNaBZVSX85xju4vwl33mNZogZkPUaaZSwaN4VJjuKYrTl78AvrWJpvvY81+ qj1MnlAAgvgbXMpi/K2UFnycKBbapVIkVO2fsvik3mo7GcYnI3EBlWXpPtWJeH4SI5Ag my+A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13-20020a170903024d00b001a50a33295esi21269639plh.278.2023.04.27.10.47.00; Thu, 27 Apr 2023 10:47:16 -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 S244504AbjD0Rm0 (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:26 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352470939965144?= X-GMAIL-MSGID: =?utf-8?q?1764352470939965144?= 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; From patchwork Sat Apr 15 11:17:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88340 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433893vqo; Thu, 27 Apr 2023 10:47:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ488Jh/ckwgSTfTuKvzkgvhV37LJ32gCQ04MOFmF3dW4uoJmCBePT9F6ZZ0DpfyH2ovL9H1 X-Received: by 2002:a05:6a20:12d3:b0:f5:2b11:5a0a with SMTP id v19-20020a056a2012d300b000f52b115a0amr3058148pzg.10.1682617664082; Thu, 27 Apr 2023 10:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617664; cv=none; d=google.com; s=arc-20160816; b=UCM7jrLv9d2XR2mWSXrjusS5a6YvT+2wBsipsaCz/VAobfpJ7L0nIDhr9pEtD3NwCP 4+rPbuD1BxXQadkY/hQwOAvDZYPR9F6OcSwmsDYvbXhiKKL82e2ocoQeNXSA0oy1Irm3 oyTAsHmstv/NqyTqmRAyZc3oUZ2JJ+rp3+6ussSo1rsvRnGKJvclACZNpiBhUtmK/hLW 2Y+jsI84712jASXjSgvSDgjeSeKvGRtfecpMPayDAsgJFXITf/siNrKOhUsJACmP0TAj z+X7I7YCvKG+3nN9fRxbU0pS+nEmq9xaYZVLob3M/VjVvvBC2tUPTpx/vKeokjg7jl8F PPuw== 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=s/kg+M27AkKVchwO9jCgPJL2Mpa/KAVUq2YWw+ZkhKA=; b=vdwPgx9anHAu4ibyYBC3S31PcFeb8lhDg6JT02Z+TPBZgVD+h6FEOGB9LG2ejfaCxQ SOb4UYC6Pwoq/h/3Gt8DpWjI8ftamnClHvNDwZM+4aqECDC4IEf4QXTJwW+qr2V48oDU n9uO7+4XATv9RXePK7vCNGnH1stz8+2AUXoOM3F5uFf5UqmCWA1JYlpbQnPVRW/vZ0iR NhZEcA4UFowgi8037pk4MwHzuWfGhvjASFP3dyJg12JIo1d/Ogt76rw6jueI2UyX+M+4 48ueUy23ADym5UfsCYyGRVIUpHjdCTJY0AeQIC4AHuFryTAihHtfz7qcZaj9fQWHbCm/ tO+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=HfdRi3nz; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p8-20020a17090b010800b00246f856d676si21708956pjz.53.2023.04.27.10.47.30; Thu, 27 Apr 2023 10:47:44 -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=HfdRi3nz; 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 S244167AbjD0Rmi (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:38 -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 S244443AbjD0RmX (ORCPT ); Thu, 27 Apr 2023 13:42:23 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B93F49EF; Thu, 27 Apr 2023 10:42:10 -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 E386621C33E3; Thu, 27 Apr 2023 10:42:09 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E386621C33E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617330; bh=s/kg+M27AkKVchwO9jCgPJL2Mpa/KAVUq2YWw+ZkhKA=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=HfdRi3nzr4I30thtNMUKY+2hg4LdPCEOftLVmSIa9WFvZT7qpe3uvR+IGqMSclfGz gQ6zKnodlgKFmd1DSYQWaUhwWFKPOvwgQUdF3CR0NtPrD7+LL+KUNDJZj1g9A09vOk Tc5eIwLJOdC7DmIOAZ/lAguWRahJQlVTyF76HQO4= Subject: [PATCH 3/7] mips: asm/io.h: Expect immutable pointer in isa_virt_to_bus prototype From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Thomas Bogendoerfer , Geert Uytterhoeven , Michael Ellerman , Florian Fainelli , Arnd Bergmann , Stanislav Kinsburskii , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:36 -0700 Message-ID: <168155745691.13678.14513434425435520788.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352499728370823?= X-GMAIL-MSGID: =?utf-8?q?1764352499728370823?= From: Stanislav Kinsburskii These helper function - isa_virt_to_bus - doesn'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 ‘isa_virt_to_bus’ discards ‘const’ qualifier from pointer target type Signed-off-by: Stanislav Kinsburskii CC: Thomas Bogendoerfer CC: Geert Uytterhoeven CC: Michael Ellerman CC: Florian Fainelli CC: Arnd Bergmann CC: Stanislav Kinsburskii CC: Jiaxun Yang CC: linux-mips@vger.kernel.org CC: linux-kernel@vger.kernel.org --- arch/mips/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index cc28d207a061..d78ca2e71f8c 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h @@ -137,7 +137,7 @@ static inline void * phys_to_virt(unsigned long address) /* * ISA I/O bus memory addresses are 1:1 with the physical address. */ -static inline unsigned long isa_virt_to_bus(volatile void *address) +static inline unsigned long isa_virt_to_bus(const volatile void *address) { return virt_to_phys(address); } From patchwork Sat Apr 15 11:17:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88335 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433676vqo; Thu, 27 Apr 2023 10:47:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7x7pqInGOcko2HDMM5fa3+uLlJ2uqv6pz5/uqYknvC2yr5mEEkEhAQlxpl6F0OCOVd9k2G X-Received: by 2002:a17:90b:4d04:b0:24b:2e6a:24ed with SMTP id mw4-20020a17090b4d0400b0024b2e6a24edmr2686554pjb.37.1682617636267; Thu, 27 Apr 2023 10:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617636; cv=none; d=google.com; s=arc-20160816; b=qW6/0LLtpvzuKKvhO9rDJs0+rKl5Ogd22wdpl8i8KWsFz+Bu3P6MkqBheQTwuZFWLJ URASLz4WFDiWlJ+Wt4mJeDl6LDKB2M+8k3jQtdSupPac4ks0e+4nfDntjT58NDHtImEU a9lkb3ZNX916V2uiOqz4eIaVoChrJ6CuM+AYVnCa8L8Rn9LlPADfAlrA9gT3E8Lm8Koj n2zrmxIrs0Nj3cEMlh9fJR4YkyvD8V0IE08uoNNHR/E0NnwEMA0nsxJ2O7IxhWlbZYnA cY5AMbC842hyVVHb+DtGrP/g48lbu15UZBwTIdMhZSlcecQJB9ov/mP1GooG4w8or5xI qWbw== 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=sj6LPYNvymIeZEc3MyNCG2Y2lTHGTHDS4BHT1bAwr3Y=; b=rXRekJRwwtphvPUo/zk8g5t9tu3M4C9OUyDDA0Okjska0Pn1HesQdbG+xYgdBwqHUW PTZ6r7vi3Rx5Xhj328lIrT7j97ulcJXnW1tC1iLz6SmLjefo9qorCOQk2p2SNRpSd0Ux TTwq/ji1NTckg3RRPG5Ov2p+QysgsuVKDRzwkhhGt8YP1Bo8dkIGwZIFzj42B+hZgi7f gRLhIA0oouuk6L4/V1xjLwJCw/YiL0kacG6pCRlN+UiRV6BSSjBxHzBbmJSfK4sZ8sau K9CWithIhm4ejMDV6xtOxLXWDHIep2UE5Mh5qxXBPP5aXhtbNA7wBIhO/VRe8cF9ip6W i19w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Z63G6khx; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y185-20020a638ac2000000b0051344dd6049si19674044pgd.27.2023.04.27.10.47.01; Thu, 27 Apr 2023 10:47:16 -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=Z63G6khx; 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 S244593AbjD0Rmq (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244519AbjD0Rmd (ORCPT ); Thu, 27 Apr 2023 13:42:33 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 252565599; Thu, 27 Apr 2023 10:42:16 -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 8806821C33E1; Thu, 27 Apr 2023 10:42:15 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8806821C33E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617335; bh=sj6LPYNvymIeZEc3MyNCG2Y2lTHGTHDS4BHT1bAwr3Y=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=Z63G6khxN1OPq0ZG7hjZeqCgnQ5dGb2R4fM1LshMq7Ib3jI0XzV9Hjp1g+/hL2TBe 1B3HjnIiQHcC967R9SnMk6mY1Jtmh8zcJ2gIhGAwmINGBN2VpJODCf0+HD1hue4DwR NMtoUFf36vlRNMFGNZ1dUod0jepQDsbhlr+RbQ2o= Subject: [PATCH 4/7] hexagon: asm/io.h: Expect immutable pointer in virt_to_phys prototype From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Brian Cain , Linus Walleij , Mark Brown , linux-hexagon@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:42 -0700 Message-ID: <168155746272.13678.16103862954212080276.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352470636568403?= X-GMAIL-MSGID: =?utf-8?q?1764352470636568403?= From: Stanislav Kinsburskii These helper function - virt_to_phys - doesn'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: Brian Cain CC: Linus Walleij CC: Mark Brown CC: linux-hexagon@vger.kernel.org CC: linux-kernel@vger.kernel.org --- arch/hexagon/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/hexagon/include/asm/io.h b/arch/hexagon/include/asm/io.h index 46a099de85b7..facbd7467dd3 100644 --- a/arch/hexagon/include/asm/io.h +++ b/arch/hexagon/include/asm/io.h @@ -46,7 +46,7 @@ extern void __raw_writesl(void __iomem *addr, const void *data, int wordlen); * virt_to_phys - map virtual address to physical * @address: address to map */ -static inline unsigned long virt_to_phys(volatile void *address) +static inline unsigned long virt_to_phys(const volatile void *address) { return __pa(address); } From patchwork Sat Apr 15 11:17:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88337 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433755vqo; Thu, 27 Apr 2023 10:47:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DatPydi/U6Y4sAeNyNv7sHwVw8JPBiogzF1B9IoBqvn+mAXc79IOqEyHOX6vGyL1ZgGTv X-Received: by 2002:a17:902:f70f:b0:1a8:1c9a:f68 with SMTP id h15-20020a170902f70f00b001a81c9a0f68mr2619231plo.36.1682617646235; Thu, 27 Apr 2023 10:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617646; cv=none; d=google.com; s=arc-20160816; b=wGagNpmjwqEfNdZZ01kyxEqkYfy4k8jBuoFw7KG/wgjrS85AajQveQXCAX27Qkie/w BNen3bQRRkujPe+kVjosg5MjnYMHOiq3exZhILcnV54ZGEpdyTwu9nj8WO6G4zTZsIqY cWkkVSaNTRkWfqguZUv3vRYGkp3VZ+n0SKo2xz+jv/gH/0100+/g1gxt28IDXFck3s9i cZrd4YuDR1Qtq7esaod7KeVC4f241CFWq+zmXn5HU5eVE3lHy7k0S17CgeBquG2+NGww KOy6Cn/VjDFRG+c0gJVcPHy+nYxEvewrrzHsAA++xnmZll4YmJB9TmLvCTgeww7NTrFO T0ug== 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=UW7ul1bnDEkuT8AVHX2Onz8R55uQ/uJg/sKB3VFIxA8=; b=Th7frgNhSyVWB5kRNfSnjaLoQRxYW1ceWiGmsuxb7rl06SbSmwjziIjxl/R5+Uz0eI ain4BAVp8CzpKmKHvZdSRsAL2L4ww3sB823oSk+SNP088zuq9ZDWQoRy6cLVFqRgUFdF fN1K/M7r4KiEvZDZbqEQG6YwD5VyWk5Trq5X12ysh9HDq2rUkfpCMZQ7fq6+YPO3/0Mc KrFR2DsCbJgkeijXNFqLQweDPwX42Yiw4+GYqPayQkQiYoEZjVZnT4dIZk2ZVQ8nWMug zr98+NNZj6UHZA7B+/fP7I/c8TMGfU+ZTpBm4PgqIigE+QaWLOYswf523y5Qlr2IpSAk vuQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=GliyQuKW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a170903019100b0019abec982c2si21192976plg.77.2023.04.27.10.47.13; Thu, 27 Apr 2023 10:47:26 -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=GliyQuKW; 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 S244486AbjD0Rmu (ORCPT + 99 others); Thu, 27 Apr 2023 13:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244536AbjD0Rmf (ORCPT ); Thu, 27 Apr 2023 13:42:35 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2A5955AD; Thu, 27 Apr 2023 10:42:21 -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 2486921C33E2; Thu, 27 Apr 2023 10:42:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2486921C33E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617341; bh=UW7ul1bnDEkuT8AVHX2Onz8R55uQ/uJg/sKB3VFIxA8=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=GliyQuKW8oGgjFC+cLdORseF/SjeucGpIWTeHmMqR/KK+I4hETWbTsw1knbYRh+ZR MAUHxIEfXAJKc+C+mHa5zeINLp0UrkYuhHWGUcDUmjK65ZhaWGnbgn4HjG5NdbtxYG zPBjIck4JhL804V8kj1f5FBRY43HMXKgC5GxUAzs= Subject: [PATCH 5/7] ia64: asm/io.h: Expect immutable pointer in virt_to_phys prototype From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Geert Uytterhoeven , Helge Deller , Arnd Bergmann , Andrew Morton , Bjorn Helgaas , Stanislav Kinsburskii , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:48 -0700 Message-ID: <168155746830.13678.8071954787135972276.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352480982768502?= X-GMAIL-MSGID: =?utf-8?q?1764352480982768502?= From: Stanislav Kinsburskii These helper function - virt_to_phys - doesn'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: Geert Uytterhoeven CC: Helge Deller CC: Arnd Bergmann CC: Andrew Morton CC: Bjorn Helgaas CC: Stanislav Kinsburskii CC: linux-ia64@vger.kernel.org CC: linux-kernel@vger.kernel.org --- arch/ia64/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h index 83a492c8d298..c56ad21ba1e9 100644 --- a/arch/ia64/include/asm/io.h +++ b/arch/ia64/include/asm/io.h @@ -74,7 +74,7 @@ extern unsigned int num_io_spaces; * Change virtual addresses to physical addresses and vv. */ static inline unsigned long -virt_to_phys (volatile void *address) +virt_to_phys (const volatile void *address) { return (unsigned long) address - PAGE_OFFSET; } From patchwork Sat Apr 15 11:17:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88338 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433785vqo; Thu, 27 Apr 2023 10:47:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74gPLEahzzFw5ExNYbrJvq/CsEtXvCsyrafsWcFcpyTwIrpmdg1WdwPxtP8FQqzfldbRSo X-Received: by 2002:a05:6a00:1791:b0:63a:ece0:48d0 with SMTP id s17-20020a056a00179100b0063aece048d0mr3205710pfg.28.1682617649910; Thu, 27 Apr 2023 10:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617649; cv=none; d=google.com; s=arc-20160816; b=hw9fiAMJR7onrAgK2lz81bndCoJmcSovC4q2GHAkW6eNTSED+SZbaKoIRA7csSORtt UIioai7uWp/hqZU2yKk7dE/kQb671uUfK8+o5sWk39SZtgEBbw2ZySF4IpTo8tURPpvx o8CyU/bsMHB57Hmx6c2jfxlO/zOghgtVjJ/O1HEHD8hvMGKetzBXiAWWFacRmL/wfri/ 8OB6+FdfJzSzPn1CNJRjuLojhBdTLHmUEK6ITbKm84ufaoX/xDwNN1rPqmyV/Y4PH03q wlhlERPYyYZsnEy9v7el/r1UWd8zO4QuCqSq533sN8TMM1rnmA04WkexgbjbC6jiW3Fs FjvA== 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=lbHi5s+Eft8kCcVZxoCtTZ7X0binDj0JHmqe0h+9dEs=; b=cTXfY7eXLdc2Vgrwnnn7rBwvlSZRPKVdd0QcHqmVzwkAnHZLd9IRV8GBD5vAGWovrm tK/fBFlv4dS/7BiRV0wHgHLBPkQG2m8hnt4p5Ga398PGrQAX232EIyZw6JM1NLoRue+i 6XeEGY1OCJZLFGws2Mw20FsnCBew1uegw44laxnykgNNitRGyp8YFtXfS87GqnYfU3Rb yZsOpU/5pb4P5xXMP3fa+vtsbDPIoAePtbXqzKTCQCPxIVkdTJh0dSBY7vKa6DwPuuqV uutDCJhbZfqqvL2HN8HLgOpVv/PaOplk6HTL9AlWpjadWWZgxOI+TViTZ622U9ULM2AY jj3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=OzkmcOKu; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k185-20020a6384c2000000b005030a59a818si19564634pgd.402.2023.04.27.10.47.16; Thu, 27 Apr 2023 10:47:29 -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=OzkmcOKu; 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 S244449AbjD0RnF (ORCPT + 99 others); Thu, 27 Apr 2023 13:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244575AbjD0Rmh (ORCPT ); Thu, 27 Apr 2023 13:42:37 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 64E76449A for ; Thu, 27 Apr 2023 10:42:27 -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 BE5D621C33DF; Thu, 27 Apr 2023 10:42:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BE5D621C33DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617346; bh=lbHi5s+Eft8kCcVZxoCtTZ7X0binDj0JHmqe0h+9dEs=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=OzkmcOKuax2YnA3bhoej74/6EDZuvfZ0Inv7NG/hTtmTtzHerkqwO1WE2jzjkssq6 RFiLLepRAcL1SMfIEGdWinCDvpJfwr2hWfpxojZMTXR6mzZ7ogYovV8C8OeeB1lfQu HyWtbtNrXC+BzfVMUO9Yj8zBeTY/z9GWcsc0nnJI= Subject: [PATCH 6/7] powerpc: asm/io.h: Expect immutable pointer in virt_to_phys prototype From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geert Uytterhoeven , Bjorn Helgaas , Stanislav Kinsburskii , Arnd Bergmann , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:53 -0700 Message-ID: <168155747391.13678.10634415747614468991.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352484855973208?= X-GMAIL-MSGID: =?utf-8?q?1764352484855973208?= From: Stanislav Kinsburskii These helper function - virt_to_phys - doesn'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: Michael Ellerman CC: Nicholas Piggin CC: Christophe Leroy CC: Geert Uytterhoeven CC: Bjorn Helgaas CC: Stanislav Kinsburskii CC: Arnd Bergmann CC: linuxppc-dev@lists.ozlabs.org CC: linux-kernel@vger.kernel.org --- arch/powerpc/include/asm/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h index f1e657c9bbe8..c287eeb9536f 100644 --- a/arch/powerpc/include/asm/io.h +++ b/arch/powerpc/include/asm/io.h @@ -959,7 +959,7 @@ extern void __iomem *__ioremap_caller(phys_addr_t, unsigned long size, * almost all conceivable cases a device driver should not be using * this function */ -static inline unsigned long virt_to_phys(volatile void * address) +static inline unsigned long virt_to_phys(const volatile void * address) { WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && !virt_addr_valid(address)); From patchwork Sat Apr 15 11:17:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stanislav Kinsburskii X-Patchwork-Id: 88341 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp433955vqo; Thu, 27 Apr 2023 10:47:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Mw6w1xdMnlmnm++jcnvuUnGlgdOaLHIe0fGIS7MVNjlF5SPW6k6yvp0ET3U3lFgWYHaQO X-Received: by 2002:a17:903:22c3:b0:1a6:4541:73c with SMTP id y3-20020a17090322c300b001a64541073cmr2875499plg.33.1682617672831; Thu, 27 Apr 2023 10:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682617672; cv=none; d=google.com; s=arc-20160816; b=PsUBzJyAw+fKcciDWMFN4p0nDOAisZHSmkutnBShksJ+5uX2t4cpGgtax6rql11Lti ytpehxDFb9CbjBOB/32yUaOpFWzjUmL3EhrPvScJoU7AX0glkCQfJA/S7e9WXuIC9w5O 4iCCsOE3UUdHIiSAshHx+ME0VSRE98J4jzYNj9MxcclqkJpmSkFZ/riPgmtrQ+fhZwa8 6Yuw1TY2aXz19mW+n/wl1eQ8pDo7QMIr4AWHbCbsHYVtNZaqt15aDsbbz8iRVW2OoD3V Ri1wFeeEOs5Kkf9YuuM19qE8ysHO8T0o/KDuuDSZbaH+uYASVbfX/3PdwsBrCTLwyR9V U4NQ== 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=JzW52Omm51Pbk9wjpjdqd20u4BkUZE5fIgVHo4czr6g=; b=trjJlavieCND1y24K3BzS3q991laTgamIuMtkpCCMRe0A5yAZoitNyMyQ3e04Pn2RC 5ssLkIKauCXuMqizGCNuJkjqyyzwZ+/eoeF3VDVfNe0AvO+FPUe5NKXXhmTNPNKgWZ40 gow+z0DhPKy2AsJ4Tz/9jClaiPo7IYJglYaTnUg497bH442WDwn7deDrZmU6KuwuPtzw VAXslyMNTb/27g25GPOIWsloh0lv4jQ0DJ7YQcFHFFQFRNi9zqiKj6RrK0PlkmX2v7Jf I0G6hzUrC4z5rj2NjWwhmHjlBeU4XFvtsqnKvNtjln17A6kHrlgQWwA6ksBVROY2ViVV DC5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Ndu3v4Nv; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a170902650200b0019ea8e6213esi18528068plk.102.2023.04.27.10.47.39; Thu, 27 Apr 2023 10:47:52 -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=Ndu3v4Nv; 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 S244599AbjD0RnJ (ORCPT + 99 others); Thu, 27 Apr 2023 13:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244608AbjD0Rmq (ORCPT ); Thu, 27 Apr 2023 13:42:46 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46D515FE5; Thu, 27 Apr 2023 10:42:33 -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 590A721C33E1; Thu, 27 Apr 2023 10:42:32 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 590A721C33E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682617352; bh=JzW52Omm51Pbk9wjpjdqd20u4BkUZE5fIgVHo4czr6g=; h=Subject:From:Cc:Date:In-Reply-To:References:From; b=Ndu3v4Nv6DdxwdMWwYXsIdVK+/OKKnSlFxnwYRe5+4vYuhKkWuJa3H3ajz/keSZhL D9a//NBRM2gcEk/I1HTmQkqamXjCSkcS5/SjaAspvmoXWzVWrxPI/s1rau7sJ/cw7J VsYOBppFTptB2s2cZoejMUuCHM/XbqmID3JzPnl8= Subject: [PATCH 7/7] asm-generic/io.h: Expect immutable pointer in virt_to_phys From: Stanislav Kinsburskii Cc: Stanislav Kinsburskii , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 15 Apr 2023 04:17:59 -0700 Message-ID: <168155747955.13678.5648956145924030241.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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764352509141267073?= X-GMAIL-MSGID: =?utf-8?q?1764352509141267073?= From: Stanislav Kinsburskii These helper function - virt_to_phys - doesn'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: Arnd Bergmann CC: linux-arch@vger.kernel.org CC: linux-kernel@vger.kernel.org --- include/asm-generic/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 587e7e9b9a37..ee9d9584e05b 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -1000,7 +1000,7 @@ static inline void iowrite64_rep(volatile void __iomem *addr, */ #ifndef virt_to_phys #define virt_to_phys virt_to_phys -static inline unsigned long virt_to_phys(volatile void *address) +static inline unsigned long virt_to_phys(const volatile void *address) { return __pa((unsigned long)address); }