Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751275AbdFCUKR (ORCPT ); Sat, 3 Jun 2017 16:10:17 -0400 Received: from mout.web.de ([212.227.15.14]:57328 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCUKP (ORCPT ); Sat, 3 Jun 2017 16:10:15 -0400 Subject: [PATCH 2/3] ARM: pxa: Improve a size determination in pxa3xx_u2d_probe() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <2e51f414-c0aa-a6c2-dbce-11ef128b1f12@users.sourceforge.net> Date: Sat, 3 Jun 2017 22:09:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ZuUM6KWGDpxkVRNICpjVFIg4xb6zPCUKLw9KAo9yg2E9R0QLM46 P7h524ykEC6cnqDRB7Xyxf3XYqS176Q8fQxEFsJp0Tqr2xq7o7Uq+hT9d9ivBEBR8+zWRE6 vtqY0KpQ98/l7NSJ9e0R9O8GYQBn7U1YadVCSXxyx7j3h0je8R+mOxxlDYsBG8p331VLb4P GHQ93D/5ayQ2s/JG/DU1Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:3PlCYem0aOc=:2z6Xr/cJGQZRX/SMhohYXA p/IJg9xoT/s9rm6lWB30ZHSmQfGzkJk2VL8tc12TKoDGu8NrEn0EKtT/ICXNQf+tCeWacO+k4 I/GgCLeSXT25FRjMtkjmQ2RGa2qCDFGPIZrrGv1leZA0VGM2RS/JFVUr5932TEUHDxsfrJiLH /5JSlQ5te67aet8VOMr7XzciqoDddSrCC1BcGMfXEDvFS5YHbN4X0rfF1lG3VIqz1Xt7QNe+N iXzfcuaq/FRW1m4TwOIgpjsSIH0XnbeRsc9hA8a9oyOiNYQKMhZZpHjtdrd8hDNkwOeIBOzT0 sbgz07IM+iRcFtJYx+HN3obXqBz+J/Cz1MzmZbrl3+l7EBHF1IlSMgYhsznX+LRy5OkgW40ng yHXlKq4gxkn6uaeEea/2KoZLnMBxHUHzRaG113IOxLO1bp7IBgzxQwz6ICobciZYNWU9RiP2c f82go8pIQp6Bk1oDv0RIcSoUmp4JtERDhG4F9cYvOcfDJPL1YJxN1LrNwGpsAOEJm6qhrcJ5k 0AgW5JsaYiG8rhJ7Zr8T0lzouvEdkSyRGm8aXqcadwbHR7mDvkTlYnj6kq1azuZOrpcp7nY/v nqA2Ec68JQnCHoUTjRukjDCOTVmC3ZcDFN3GH42ZUrBJFq8K0O8Lim45ztTP3MihAQfvw/+9C KJy6+y6eFGOq8NH27u8A4K6i1I2F9bxkkWfDkrhuQMAfZIn3maIOcnfmTtm10v8C6IqrZC6pp UUr2A7CNOmm016D5d02Xudn1kbpUMRB5vpRi0E4irD1W5GqW7j9nQRVBOM7Wa+3jpOa9d7/Ko BiOSZxX Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 902 Lines: 25 From: Markus Elfring Date: Sat, 3 Jun 2017 21:43:11 +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 --- arch/arm/mach-pxa/pxa3xx-ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-pxa/pxa3xx-ulpi.c b/arch/arm/mach-pxa/pxa3xx-ulpi.c index eba595fac8ca..13f9909ac8bf 100644 --- a/arch/arm/mach-pxa/pxa3xx-ulpi.c +++ b/arch/arm/mach-pxa/pxa3xx-ulpi.c @@ -286,5 +286,5 @@ static int pxa3xx_u2d_probe(struct platform_device *pdev) struct resource *r; int err; - u2d = kzalloc(sizeof(struct pxa3xx_u2d_ulpi), GFP_KERNEL); + u2d = kzalloc(sizeof(*u2d), GFP_KERNEL); if (!u2d) { -- 2.13.0