[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567E69DA.5020409@users.sourceforge.net>
Date: Sat, 26 Dec 2015 11:20:10 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-ide@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 3/3] IDE-ACPI: Move an assignment for one variable in
ide_get_dev_handle()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 26 Dec 2015 10:50:33 +0100
Move the assignment for the variable "addr" to the statement
where its value is used after previous function calls succeeded.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/ide/ide-acpi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index b6b2111..c2de9f9 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -132,9 +132,6 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
bus = pdev->bus->number;
devnum = PCI_SLOT(pdev->devfn);
func = PCI_FUNC(pdev->devfn);
- /* ACPI _ADR encoding for PCI bus: */
- addr = (u64)(devnum << 16 | func);
-
DEBPRINT("ENTER: pci %02x:%02x.%01x\n", bus, devnum, func);
dev_handle = ACPI_HANDLE(dev);
@@ -148,6 +145,8 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle,
DEBPRINT("get_object_info for device failed\n");
return -ENODEV;
}
+ /* ACPI _ADR encoding for PCI bus: */
+ addr = (u64)(devnum << 16 | func);
if ((dinfo->valid & ACPI_VALID_ADR) &&
dinfo->address == addr) {
*pcidevfn = addr;
--
2.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists