mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Hannes Reinecke <hare@suse.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: advansys: Replace zero-length array with flexible-array member
Date: Wed, 12 Feb 2020 17:14:06 -0800	[thread overview]
Message-ID: <20200213011406.GI7778@bombadil.infradead.org> (raw)
In-Reply-To: <20200213000211.GA23171@embeddedor.com>

On Wed, Feb 12, 2020 at 06:02:11PM -0600, Gustavo A. R. Silva wrote:
> Also, notice that, dynamic memory allocations won't be affected by
> this change:

Shouldn't you also convert this:
                asc_sg_head = kzalloc(sizeof(asc_scsi_q->sg_head) +
                        use_sg * sizeof(struct asc_sg_list), GFP_ATOMIC);
to use struct_size()?


  reply	other threads:[~2020-02-13  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  0:02 Gustavo A. R. Silva
2020-02-13  1:14 ` Matthew Wilcox [this message]
2020-02-13  6:04   ` Gustavo A. R. Silva
2020-02-13 16:52 ` Hannes Reinecke
2020-02-18  5:28 ` Martin K. Petersen

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=20200213011406.GI7778@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=gustavo@embeddedor.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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

all inboxes | Powered by JetHome®