All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Joe Lawrence <joe.lawrence@stratus.com>
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Subject: Re: [PATCH 6/7] mptfusion: combine fw_event_work and its event_data
Date: Thu, 5 Jun 2014 02:34:29 -0700	[thread overview]
Message-ID: <20140605093429.GG727@infradead.org> (raw)
In-Reply-To: <1401900729-19855-1-git-send-email-joe.lawrence@stratus.com>

>  
> -	sz = offsetof(struct fw_event_work, event_data) +
> -	    sizeof(MpiEventDataSasDeviceStatusChange_t);
> +	sz = sizeof(*fw_event) +
> +		sizeof(MpiEventDataSasDeviceStatusChange_t);
>  	fw_event = kzalloc(sz, GFP_ATOMIC);

Seems like there is no point in keeping the sz variable here and at
the other occurances.  Not that it really matters, but if we make a pass
over this code we might as well fix that up, too.

> -	sz = offsetof(struct fw_event_work, event_data);
> +	sz = sizeof(*fw_event);

Eww, using offsetoff for an allocation size.  Good riddance that this
gets sorted out.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

  reply	other threads:[~2014-06-05  9:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 16:49 [PATCH 0/7] mptfusion static checker fixups Joe Lawrence
2014-06-04 16:49 ` [PATCH 1/7] mptfusion: mark file-private functions as static Joe Lawrence
2014-06-05  9:24   ` Christoph Hellwig
2014-06-04 16:49 ` [PATCH 2/7] mptfusion: remove redundant kfree checks Joe Lawrence
2014-06-05  9:24   ` Christoph Hellwig
2014-06-04 16:49 ` [PATCH 3/7] mptfusion: initChainBuffers should return errno Joe Lawrence
2014-06-05  9:27   ` Christoph Hellwig
2014-06-04 16:49 ` [PATCH 4/7] mptfusion: zero kernel-space source of copy_to_user Joe Lawrence
2014-06-04 16:58   ` Joe Lawrence
2014-06-05  9:29     ` Christoph Hellwig
2014-06-06  8:31   ` Dan Carpenter
2014-06-04 16:51 ` [PATCH 5/7] mptfusion: make adapter prod_name[] a pointer Joe Lawrence
2014-06-05  9:31   ` Christoph Hellwig
2014-06-04 16:52 ` [PATCH 6/7] mptfusion: combine fw_event_work and its event_data Joe Lawrence
2014-06-05  9:34   ` Christoph Hellwig [this message]
2014-06-06 21:56     ` Joe Lawrence
2014-06-04 16:52 ` [PATCH 7/7] mptfusion: tweak null pointer checks Joe Lawrence
2014-06-05  9:44   ` Christoph Hellwig
2014-06-25 11:01 ` [PATCH 0/7] mptfusion static checker fixups Christoph Hellwig
2014-06-25 14:18   ` Joe Lawrence
2014-06-25 14:18     ` Christoph Hellwig

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=20140605093429.GG727@infradead.org \
    --to=hch@infradead.org \
    --cc=Sreekanth.Reddy@lsi.com \
    --cc=dan.carpenter@oracle.com \
    --cc=joe.lawrence@stratus.com \
    --cc=linux-scsi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.