[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878fe5ae-be5c-79a9-c44b-e6c25ac5220b@users.sourceforge.net>
Date: Mon, 5 Sep 2016 19:07:24 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-acpi@...r.kernel.org, Hans de Goede <hdegoede@...hat.com>,
Len Brown <lenb@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Zhang Rui <rui.zhang@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH 20/21] ACPI-video: Improve a size determination in
acpi_video_dev_register_backlight()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 5 Sep 2016 17:45:40 +0200
Replace the specification of a data structure by a reference for
a local variable as the parameter for the operator "sizeof" to make
the corresponding size determination a bit safer according to
the Linux coding style convention.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/acpi/acpi_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 231fab3..9685725 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1685,7 +1685,7 @@ static void acpi_video_dev_register_backlight(struct acpi_video_device *device)
pci_dev_put(pdev);
}
- memset(&props, 0, sizeof(struct backlight_properties));
+ memset(&props, 0, sizeof(props));
props.type = BACKLIGHT_FIRMWARE;
props.max_brightness = device->brightness->count - 3;
device->backlight = backlight_device_register(name,
--
2.10.0
Powered by blists - more mailing lists