From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8655120605A; Wed, 16 Oct 2024 19:55:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729108522; cv=none; b=DeN6jUnNLySlW15CSRreqJ+4Ciiyttq2A8RimA2nJHwORUrX0oYJCpc5rwEn1WMnPX9fgPacSYFaL4iq2E4mNiDwGnuTbqZffl7tIgtG5T4TkjKlsLfUOemd9Xd5+3UjxjJFQIs5VPG29L0p//ApKTtbX0v1Y2fVK+WEM9ljREk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729108522; c=relaxed/simple; bh=ZiwDKcccpmSvuqWCu6YQOcI9Jl8IlIIZv33czqaIoj0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=BElqzmXKiF2UQDeA1REKUJGQY+dRDwR1CyaS5fpl6y7NzCtP9GxzDxsXPCGm4pBR5TM0lqlbhj4MkPurS14g8QyWntvMHelEef++N4dY6zPlhHPYn0UDZ4xQioSda2KDHSZqGBHyrZ+/Da2+3ve+38oJbOkbotpyX3sRQl6Yyso= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IWYIaCGq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IWYIaCGq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4815C4CEC5; Wed, 16 Oct 2024 19:55:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729108522; bh=ZiwDKcccpmSvuqWCu6YQOcI9Jl8IlIIZv33czqaIoj0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IWYIaCGqroH5yIR/0mJGOFtj4UZeicBHalefzbDbF/fjw+/nZwSLTl++SRgLuAL26 M/hNjRzEBHWoxQ5xP10w1WZHUpKOzkWRPU3Jt2zAgF4KQHYvn5uhGVLfPgbFrfUfsq FQeOjFE+meLgRkV032V3fVSjvNCQatn7k+dtujbuaPYJlxskCXiIPDlROwTKKNgB5B T1Nx8e1TkEqjXv7jJk5ynHskF/Siabc5kDerOGleVTfqE71m7mCqJDO5QKr3MbNK1o GSHEPFz/muUt+7WxV9jAotsFuBbSjUqieDjK9Lf5S3g1NuoLwNvuLWT4sysYdogTjV E1ZSyFO37ygOg== Date: Wed, 16 Oct 2024 14:55:20 -0500 From: Bjorn Helgaas To: Arnd Bergmann Cc: Bjorn Helgaas , Krzysztof Kozlowski , "Rob Herring (Arm)" , Arnd Bergmann , Dan Williams , Dave Jiang , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Manivannan Sadhasivam , Philipp Stanner , Johan Hovold , Reinette Chatre , Andy Shevchenko , Damien Le Moal , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Constify pci_register_io_range stub fwnode_handle Message-ID: <20241016195520.GA647036@bhelgaas> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241016062410.2581152-1-arnd@kernel.org> On Wed, Oct 16, 2024 at 06:24:04AM +0000, Arnd Bergmann wrote: > From: Arnd Bergmann > > The patch to change the argument types for pci_register_io_range() > only caught one of the two implementations, but missed the empty > version: > > drivers/of/address.c: In function 'of_pci_range_to_resource': > drivers/of/address.c:244:45: error: passing argument 1 of 'pci_register_io_range' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] > 244 | err = pci_register_io_range(&np->fwnode, range->cpu_addr, > | ^~~~~~~~~~~ > In file included from drivers/of/address.c:12: > include/linux/pci.h:1559:49: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *' > 1559 | int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr, > | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ > > Change this the same way. > > Fixes: 6ad99a07e6d2 ("PCI: Constify pci_register_io_range() fwnode_handle") I assume Rob took the original and will take care of this as well: https://lore.kernel.org/all/20241010220747.GA579765@bhelgaas/ Acked-by: Bjorn Helgaas > Signed-off-by: Arnd Bergmann > --- > If possible, please fold this fixup into the original patch > --- > include/linux/pci.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 11421ae5c558..733ff6570e2d 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -2019,7 +2019,7 @@ static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) > { return -EIO; } > static inline void pci_release_regions(struct pci_dev *dev) { } > > -static inline int pci_register_io_range(struct fwnode_handle *fwnode, > +static inline int pci_register_io_range(const struct fwnode_handle *fwnode, > phys_addr_t addr, resource_size_t size) > { return -EINVAL; } > > -- > 2.39.5 >