[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220831140327.79149-3-andriy.shevchenko@linux.intel.com>
Date: Wed, 31 Aug 2022 17:03:26 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
Subject: [PATCH v2 3/4] ACPI: platform: Use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type).
The type of the variable can change and one needs not change
the former (unlike the latter). No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
v2: no changes
drivers/acpi/acpi_platform.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
index 042f80588c18..0d812fe248d4 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -117,8 +117,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
if (count < 0)
return NULL;
if (count > 0) {
- resources = kcalloc(count, sizeof(struct resource),
- GFP_KERNEL);
+ resources = kcalloc(count, sizeof(*resources), GFP_KERNEL);
if (!resources) {
acpi_dev_free_resource_list(&resource_list);
return ERR_PTR(-ENOMEM);
--
2.35.1
Powered by blists - more mailing lists