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));