public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Linus Walleij <linusw@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-gpio@vger.kernel.org,  "Enrico Weigelt,
	metux IT consult" <info@metux.net>,
	Viresh Kumar <vireshk@kernel.org>,
	 Bartosz Golaszewski <brgl@kernel.org>,
	 "open list:VIRTIO GPIO DRIVER" <virtualization@lists.linux.dev>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2] gpio: virtio: remove one kcalloc
Date: Wed, 11 Mar 2026 10:03:14 +0100	[thread overview]
Message-ID: <CAD++jLmDbs7aAbVnS3Y=xzYZuazkELxoXN-XmeMeJWYFwNAwcQ@mail.gmail.com> (raw)
In-Reply-To: <20260311025541.53814-1-rosenp@gmail.com>

On Wed, Mar 11, 2026 at 3:56 AM Rosen Penev <rosenp@gmail.com> wrote:

> A flexible array member can be used to combine allocations.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

unsigned int num_lines;

> +
> +       struct virtio_gpio_line lines[];
>  };

struct virtio_gpio_line lines[] __counted_by(num_lines);

I'm starting to get a slight feeling of déja vu here, we
want to use __counted_by() for all
of these.

Yours,
Linus Walleij

      reply	other threads:[~2026-03-11  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11  2:55 [PATCHv2] gpio: virtio: remove one kcalloc Rosen Penev
2026-03-11  9:03 ` Linus Walleij [this message]

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='CAD++jLmDbs7aAbVnS3Y=xzYZuazkELxoXN-XmeMeJWYFwNAwcQ@mail.gmail.com' \
    --to=linusw@kernel.org \
    --cc=brgl@kernel.org \
    --cc=info@metux.net \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rosenp@gmail.com \
    --cc=vireshk@kernel.org \
    --cc=virtualization@lists.linux.dev \
    /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