From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753304AbdAZKTz (ORCPT ); Thu, 26 Jan 2017 05:19:55 -0500 Received: from mout.web.de ([217.72.192.78]:51769 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752958AbdAZKSc (ORCPT ); Thu, 26 Jan 2017 05:18:32 -0500 Subject: [PATCH 2/5] gtp: Improve another size determination in ipv4_pdp_add() To: netdev@vger.kernel.org, Alexey Dobriyan , "David S. Miller" , Harald Welte , Johannes Berg , Pablo Neira References: <698070a4-e08e-78e5-0214-df69783cce22@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: <91f31650-3052-507c-8006-96874107f981@users.sourceforge.net> Date: Thu, 26 Jan 2017 11:18:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <698070a4-e08e-78e5-0214-df69783cce22@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:l5MSQIwE5IRbAASGtNl7Ikjz7RjA78BZGuSpGUQFUdF7/mfXxzh R352F8OpTOskjB/fIk6KdpJwrz7xriB2SXvejNZIb8JXKBJwS7jOsnRvckUTm3oixJqSYvr JqBcLFKaxiZfS+YYw9cgioMNbN6gr+7oTwqGoiAHYmC76T19sPIotQTJQ195Si00EaYpONc 6tV5laK4IFMWIoFp9Y1qA== X-UI-Out-Filterresults: notjunk:1;V01:K0:AsvbiN9aT4k=:Zezp2/C9pOYdJqsI2WcPVd yfFFWuPzpTn/lLeQ1LgdkCYm94u37O3Eoxzp3OkpHNtj9VacNtZvcoAc7kcdopBz685uhp+xr 0oBq4gN9upX3DGkWbtmNv87qHsiJQVWUcEi6+s5Q2/4KS0mlZolLUO4RcYSwF+zU1n2JCX+5f U5X413DQLtsXirEVZzt5phzOizy5+Zm02su6VlFec7fuB/ccdiPAOnHxljowUcoiCgAY1PXHW sF17XcYLy0RNvKck9XwROP1gEsa0MRpOzihii3WaQXmYGt//oUdMo0f4i34IqzX/EuZWvC7sx Xseh8C+sgfSLOZobdaVU7IW0mZnw5XIGfyRHmp2UT4u+d2ngmELahzcfNAqOAmIItN4799oVI ykHepdK5qZ2EHGvY1gdfjid+jSa/VSq8A9aw2SOlXQXw0o4/WdinLs49ZYbYnLgCMqZESdKTQ E8xZoGIISD67lyyHlthIgaMrD06s7uXxi77jDm3172QaeX8n9B2nPisVXQQvkfD8rsW0DXV8C 17pWFLhz42iPR6MiiDpNB5PFJaOqiZM4R0xfCq6WgJiFxithHEyiSMuehz836HNiWkZ2YLdv8 0ms4QRchXXIsbIaK+mkOlNiuOYx2mCt1CkKBGevpzP2NrXPShQ4b3xwnJeDF4IDxAyXvWUoLH 1Y9hiTwFfovfUtd1LlYKZJVGEGF6c/T1pcs9bEsAeoGqk6ZO9cIhYcbOhcCSQlEOGt30JxBDB Z7W4ZCrKM4dS43op/xxFEyuxRiXErqV5v2iw1uR1YZtfB5UWFkRMCoQc8n5PVJyC+kb5ZW9RG uCKwg6j Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 25 Jan 2017 22:24:08 +0100 Replace the specification of a data type 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/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index 5d0d520ae40f..f0c123101aa9 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -956,7 +956,7 @@ static int ipv4_pdp_add(struct net_device *dev, struct genl_info *info) } - pctx = kmalloc(sizeof(struct pdp_ctx), GFP_KERNEL); + pctx = kmalloc(sizeof(*pctx), GFP_KERNEL); if (pctx == NULL) return -ENOMEM; -- 2.11.0