linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Peter Rosin <peda@axentia.se>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: mux: demux-pinctrl: use struct_size() in devm_kzalloc()
Date: Fri, 4 Jan 2019 19:06:12 +0100	[thread overview]
Message-ID: <20190104180612.GE3009@kunai> (raw)
In-Reply-To: <20190104174327.GA30932@embeddedor>

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]


> Instead of leaving these open-coded and prone to type mistakes, we can
> now use the new struct_size() helper:

I am okay with this patch in general. However, I think the name of the
helper 'struct_size' is a bit unfortunate. I really wondered on the
first read why it needs 3 arguments to find out a struct size. I only
understood on the second read. I think 'trailing_array_struct_size'
would be way more clearer what it does.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-01-04 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 17:43 [PATCH] i2c: mux: demux-pinctrl: use struct_size() in devm_kzalloc() Gustavo A. R. Silva
2019-01-04 18:06 ` Wolfram Sang [this message]
2019-04-21 18:15   ` Peter Rosin
2019-04-22  7:20     ` Wolfram Sang

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=20190104180612.GE3009@kunai \
    --to=wsa@the-dreams.de \
    --cc=gustavo@embeddedor.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peda@axentia.se \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).