[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201103203655.17701-8-andriy.shevchenko@linux.intel.com>
Date: Tue, 3 Nov 2020 22:36:55 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: linux-acpi@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: [PATCH v5 7/7] ACPI: watchdog: Replace open coded variant of resource_union()
Since we have resource_union() helper, let's utilize it here.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/acpi/acpi_watchdog.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c
index 5c1e9ea43123..ca28183f4d13 100644
--- a/drivers/acpi/acpi_watchdog.c
+++ b/drivers/acpi/acpi_watchdog.c
@@ -151,11 +151,7 @@ void __init acpi_watchdog_init(void)
found = false;
resource_list_for_each_entry(rentry, &resource_list) {
if (rentry->res->flags == res.flags &&
- resource_overlaps(rentry->res, &res)) {
- if (res.start < rentry->res->start)
- rentry->res->start = res.start;
- if (res.end > rentry->res->end)
- rentry->res->end = res.end;
+ resource_union(rentry->res, &res, rentry->res)) {
found = true;
break;
}
--
2.28.0
Powered by blists - more mailing lists