Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751712AbcJAOw1 (ORCPT ); Sat, 1 Oct 2016 10:52:27 -0400 Received: from mout.web.de ([212.227.17.11]:55176 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbcJAOwR (ORCPT ); Sat, 1 Oct 2016 10:52:17 -0400 Subject: [PATCH 07/15] md-cluster: Improve another size determination in process_suspend_info() To: linux-raid@vger.kernel.org, Guoqing Jiang , Shaohua Li References: <566ABCD9.1060404@users.sourceforge.net> <3a03df66-92ce-20fb-17f3-fb79b9d43c8e@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <92dc2027-6169-dd50-e9a2-cab763da94dd@users.sourceforge.net> Date: Sat, 1 Oct 2016 16:52:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <3a03df66-92ce-20fb-17f3-fb79b9d43c8e@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:kpblZpGbo7ESWYzr1kSMxY5ZexIQN6rIcNekAlT26go+kNAPDz8 2f79n7EbZL9wtwfZhBEJqh59Wr3gMqJssmGKX5aXDgfsI38tGFMh/eNFPJZWPyZ7mGLqSuQ 58mToHtVIuQzsi15lt2HxI6zUsF1eEnUA6A2lnCttcq3liVY9QFf0ciLCEI2vkIQ9Je8Imj UdzvM/jDne6Ammf525i8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:3T6cFcHUBfk=:avvdYzV4k54q2SBn3enuDP oYoBOqV3SM9bnuuBURrh1c/hqAx+XLR5EmC5GUofenUO+m8kUng8mTIoifQGSsJ2FN+6gDfjX /diZF85qMnGXTpdSXc7EurhNQoFikIq2oPrfOglRJvkD0OkF7sW+Y1Fvei9Aa6Ylgua0KeIUZ 6wm69E4M98LBMV/Z0BHl5LB8LJnQ4rTIRcs748dUsYO56L/9tqJXQl0SY6XJ3FFcfLaKoQdCH ga4OF06vJ+ogmVN7Sy4GOwdVJZPiYkgvfhGz51NahnE7Vpy5zkAffHM18jiJtn1Ov/jjgHNu5 77QkWg9uxGaL4aNHt6CL4BRM61ycJrACCnYdxL4hT13Uxe27YIDP+6Ij9vxfZX81tXxtPLLkn KwvhygFBBVk/Ev7nFB1lal2XLdPtPOOYqcnGsi1/WtkVdR0/YMd+99eI52/Ed82/fnqTQ2EBe m9xhX0md3+WheS2mZlGp6Pd7LQkx4vcIpyDJWwX1bIivYwCsmLqz3Ezp4VKEvRFeNDJA6QDE/ 8CNvpOZgcDlEWuejJMtVWxZtbvYW2pWw14kcN/EE+Uo10yxvrMKn7e3kBK/JrFw85kVwj+PBu +MxFFfK348W//EP+No8ONRSFUcb7rO2nnsJIGbUqK3strIdLkkrgArNdyvSKk3nviuIJu/eEW //iYPhfU0pscemyv1V60tm3gOYqzP/HvYoiiJTqorvV551/LhTArMGAVPqVYqtHREs4pdzhct zeYFB0Bx7NY/qJFtluDbNSycEE3v1k0HnLJYHoxl4Yyl0JO8cgJ+76BJ9d6c9FMkxju7ITFgy 6sDB1VA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 895 Lines: 28 From: Markus Elfring Date: Sat, 1 Oct 2016 12:42:50 +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/md/md-cluster.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 94835b5..e965e78 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -482,8 +482,7 @@ static void process_suspend_info(struct mddev *mddev, lo, hi); cinfo->sync_low = lo; cinfo->sync_hi = hi; - - s = kzalloc(sizeof(struct suspend_info), GFP_KERNEL); + s = kzalloc(sizeof(*s), GFP_KERNEL); if (!s) return; s->slot = slot; -- 2.10.0