From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932973AbdEKRsF (ORCPT ); Thu, 11 May 2017 13:48:05 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56323 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754910AbdEKRsE (ORCPT ); Thu, 11 May 2017 13:48:04 -0400 X-ME-Sender: X-Sasl-enc: HXJqi8e327P93dGpq6NZhI9Y64vZnMzkm2/EmPimVyxi 1494524883 Date: Thu, 11 May 2017 19:47:54 +0200 From: Greg KH To: Stephen Hemminger Cc: SF Markus Elfring , Stephen Hemminger , Haiyang Zhang , kernel-janitors@vger.kernel.org, LKML , devel@linuxdriverproject.org Subject: Re: [PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create() Message-ID: <20170511174754.GA23371@kroah.com> References: <22c8886f-a38c-23ab-9277-ccccf86b1801@users.sourceforge.net> <20170511093056.036d93b6@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170511093056.036d93b6@xeon-e3> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11, 2017 at 09:30:56AM -0700, Stephen Hemminger wrote: > On Thu, 11 May 2017 18:15:46 +0200 > SF Markus Elfring wrote: > > > From: Markus Elfring > > Date: Thu, 11 May 2017 17:30:10 +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/hv/vmbus_drv.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > > index 0087b49095eb..6802d74f162c 100644 > > --- a/drivers/hv/vmbus_drv.c > > +++ b/drivers/hv/vmbus_drv.c > > @@ -1145,5 +1145,5 @@ struct hv_device *vmbus_device_create(const uuid_le *type, > > { > > struct hv_device *child_device_obj; > > > > - child_device_obj = kzalloc(sizeof(struct hv_device), GFP_KERNEL); > > + child_device_obj = kzalloc(sizeof(*child_device_obj), GFP_KERNEL); > > if (!child_device_obj) { > > This looks fine. > > Acked-by: Stephen Hemminger Note, I have a blacklist filter for this person for a reason, I, and many other maintainers, just ignore them for good reason... greg k-h