From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: [PATCH 14/21] ACPI-video: Improve a size determination in acpi_video_device_enumerate() Date: Mon, 5 Sep 2016 19:01:05 +0200 Message-ID: <1842e61c-93c6-ad85-6334-a30e967e3750@users.sourceforge.net> References: <566ABCD9.1060404@users.sourceforge.net> <897ebf36-2fe5-e109-adf6-b81b6e863d9a@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mout.web.de ([212.227.15.4]:49794 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965753AbcIERB1 (ORCPT ); Mon, 5 Sep 2016 13:01:27 -0400 In-Reply-To: <897ebf36-2fe5-e109-adf6-b81b6e863d9a@users.sourceforge.net> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-acpi@vger.kernel.org, Hans de Goede , Len Brown , "Rafael J. Wysocki" , Zhang Rui Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini From: Markus Elfring Date: Mon, 5 Sep 2016 16:45:41 +0200 Replace the specification of a data structure by a pointer dereference 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 --- 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 fe10d3f..df06390 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -1268,7 +1268,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) dod->package.count)); active_list = kcalloc(1 + dod->package.count, - sizeof(struct acpi_video_enumerated_device), + sizeof(*active_list), GFP_KERNEL); if (!active_list) { status = -ENOMEM; -- 2.10.0