public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	kernel-janitors@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	devel@linuxdriverproject.org
Subject: Re: [PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create()
Date: Thu, 11 May 2017 19:47:54 +0200	[thread overview]
Message-ID: <20170511174754.GA23371@kroah.com> (raw)
In-Reply-To: <20170511093056.036d93b6@xeon-e3>

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 <elfring@users.sourceforge.net> wrote:
> 
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > 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 <elfring@users.sourceforge.net>
> > ---
> >  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 <stephen@networkplumber.org>

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

  reply	other threads:[~2017-05-11 17:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 16:14 [PATCH 0/4] VMBus: Adjustments for some function implementations SF Markus Elfring
2017-05-11 16:15 ` [PATCH 1/4] vmbus: Improve a size determination in vmbus_device_create() SF Markus Elfring
2017-05-11 16:30   ` Stephen Hemminger
2017-05-11 17:47     ` Greg KH [this message]
2017-05-11 16:17 ` [PATCH 2/4] vmbus: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-05-11 16:30   ` Stephen Hemminger
2017-05-11 16:36     ` SF Markus Elfring
2017-05-11 16:42       ` Stephen Hemminger
2017-05-12  7:09     ` [PATCH 2/4] " Dan Carpenter
2017-05-12  7:32       ` SF Markus Elfring
2017-05-12  7:52         ` Joe Perches
2017-05-12  8:23           ` Clarification for general change acceptance SF Markus Elfring
2017-05-12  8:37             ` Julia Lawall
2017-05-12  8:45               ` SF Markus Elfring
2017-05-11 16:18 ` [PATCH 3/4] vmbus: Fix a typo in a comment line SF Markus Elfring
2017-05-11 16:33   ` Stephen Hemminger
2017-05-11 16:19 ` [PATCH 4/4] vmbus: Adjust five checks for null pointers SF Markus Elfring
2017-05-11 16:34   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170511174754.GA23371@kroah.com \
    --to=greg@kroah.com \
    --cc=devel@linuxdriverproject.org \
    --cc=elfring@users.sourceforge.net \
    --cc=haiyangz@microsoft.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox