From: Herve Codina <herve.codina@bootlin.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@google.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Lizhi Hou <lizhi.hou@amd.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-pci@vger.kernel.org,
Allan Nielsen <allan.nielsen@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Steen Hegelund <steen.hegelund@microchip.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Herve Codina <herve.codina@bootlin.com>
Subject: [PATCH v3 4/6] PCI: of_property: Constify parameter in of_pci_get_addr_flags()
Date: Thu, 14 Nov 2024 17:54:40 +0100 [thread overview]
Message-ID: <20241114165446.611458-5-herve.codina@bootlin.com> (raw)
In-Reply-To: <20241114165446.611458-1-herve.codina@bootlin.com>
The res parameter has no reason to be a pointer to an un-const struct
resource. Indeed, struct resource is not supposed to be modified by the
function.
Constify the res parameter.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
drivers/pci/of_property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c
index 59cc5c851fc3..e56159cc48e8 100644
--- a/drivers/pci/of_property.c
+++ b/drivers/pci/of_property.c
@@ -69,7 +69,7 @@ static void of_pci_set_address(struct pci_dev *pdev, u32 *prop, u64 addr,
}
}
-static int of_pci_get_addr_flags(struct resource *res, u32 *flags)
+static int of_pci_get_addr_flags(const struct resource *res, u32 *flags)
{
u32 ss;
--
2.47.0
next prev parent reply other threads:[~2024-11-14 16:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 16:54 [PATCH v3 0/6] Add support for the PCI host bridge device-tree node creation Herve Codina
2024-11-14 16:54 ` [PATCH v3 1/6] driver core: Introduce device_{add,remove}_of_node() Herve Codina
2024-11-14 16:54 ` [PATCH v3 2/6] PCI: of: Use device_{add,remove}_of_node() to attach of_node to existing device Herve Codina
2024-11-14 16:54 ` [PATCH v3 3/6] PCI: of_property: Add support for NULL pdev in of_pci_set_address() Herve Codina
2024-11-14 16:54 ` Herve Codina [this message]
2024-11-14 16:54 ` [PATCH v3 5/6] of: Add #address-cells/#size-cells in the device-tree root empty node Herve Codina
2024-11-14 16:54 ` [PATCH v3 6/6] PCI: of: Create device-tree PCI host bridge node Herve Codina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241114165446.611458-5-herve.codina@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=steen.hegelund@microchip.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox