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: 1774908 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=OzkmcOKu; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q7B7H1Jfvz23tl for ; Fri, 28 Apr 2023 22:02:35 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q7B7G2PCTz3fCp for ; Fri, 28 Apr 2023 22:02:34 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=OzkmcOKu; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.microsoft.com (client-ip=13.77.154.182; helo=linux.microsoft.com; envelope-from=skinsburskii@linux.microsoft.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.a=rsa-sha256 header.s=default header.b=OzkmcOKu; dkim-atps=neutral Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lists.ozlabs.org (Postfix) with ESMTP id 4Q6jkT6blrz3cRW for ; Fri, 28 Apr 2023 03:42:57 +1000 (AEST) 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 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-Mailman-Approved-At: Fri, 28 Apr 2023 22:01:27 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Stanislav Kinsburskii , Geert Uytterhoeven , Nicholas Piggin , Bjorn Helgaas , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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));