Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965611AbcJFJlm (ORCPT ); Thu, 6 Oct 2016 05:41:42 -0400 Received: from mout.web.de ([217.72.192.78]:52542 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964849AbcJFJlk (ORCPT ); Thu, 6 Oct 2016 05:41:40 -0400 Subject: [PATCH 41/54] md/raid10: Improve another size determination in setup_conf() To: linux-raid@vger.kernel.org, Christoph Hellwig , Guoqing Jiang , Jens Axboe , Mike Christie , Neil Brown , Shaohua Li , Tomasz Majchrzak References: <566ABCD9.1060404@users.sourceforge.net> <786843ef-4b6f-eb04-7326-2f6f5b408826@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Thu, 6 Oct 2016 11:41:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <786843ef-4b6f-eb04-7326-2f6f5b408826@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:HXO7Mqc6u3yhrAqdoua7uI4Pi13Ts1CZs5olcuQ+nqwrTQE0/2y yiiMio52j92Q0zrIcBfdyB8yemyj1QwIOgNi0m61JvCrCdUyHrtEuzPYP1RZPFEo5I5peHp YpgnfIvEob9Jxi0dySNs/hv145XSppBrIlqtbm6luSCjKww8ZqcFklcFmLXNR5iF2KU9Nfd Nvz21LFqy2Ol06DAOWjOw== X-UI-Out-Filterresults: notjunk:1;V01:K0:FHd5YOULLR8=:FNmWy/wCRrYpXmnnhiW00+ sEO5Gr39s1tCPZIiyy0iohLV1K8NQV/88oqRQnCeDS7iiOsmAvU7twfvaF+TErIrmNbk1o4NM yL1OaIRgiZjLl/3/hkgo4kQJgoX1CW48gakiEmMLnXACRSB3y5vCEJz2sOkT8lKMsyqsWRvNm 86AUv0mrEIgoZ9ncifXw1u72Sj5lPwfgYHnHCRq+piENdyyqVzS8vy8tJTHZEuU9EvRfrr6+8 Dmi/Bwvo9cypUVNoLjUUOICl04zq78ipG1Cr/E4VjKtRUU27NI4C7qb0iQ5dIX1++e7nLujeW 86mVU/KZjJQilOfHq5Vtnjs4P8ijaszAnZKZkxfSvj7f/oyso/fHDRawdxd4+XLxyx9RgR1sk CoRyRgj+sKuJpNJtjXbrB9cQCT3KgGSjbEmusdaiAIhKr+HbHaXRzRBV1yEX1P6jH/wxOU3Vo PReWObtGCoZ1r2wTmWc2G15xjV2yp3zN4HK3ifoBnQXSeySoovC3iSJnqVov+MjGKQ5F/1msJ NZrwzM/1op6c1FsCWLBp+sGYKwPSyLUJBSp1qkFoQB8kj2IFmkgTWlj8YWIp7cg6Q0PaWs58P D79DXkz7iPtUwm88vT1TTQXQUejb7xGDB7v7aGYrzoj6pGn2+1VX9FryPHf0eh346DpX5Rax9 Oa0mcBx9CcRu8BzCfp9WtuVg9iF6FlvltekH471X6+IEPx7iz32hUZtRTyj2daQiqNrnRB9AL aYudncR/4O/Rr5bX5PUlsBdw3XJx1nfalURiOECFRtJ41Yths3f8jqEi+fyLxgQpcfJZhitTG QnpF9DU Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 781 Lines: 27 From: Markus Elfring Date: Wed, 5 Oct 2016 16:51:52 +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. Signed-off-by: Markus Elfring --- drivers/md/raid10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 17352a9..04e8f78 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -3499,7 +3499,7 @@ static struct r10conf *setup_conf(struct mddev *mddev) } err = -ENOMEM; - conf = kzalloc(sizeof(struct r10conf), GFP_KERNEL); + conf = kzalloc(sizeof(*conf), GFP_KERNEL); if (!conf) goto out; -- 2.10.1