public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-i2c@vger.kernel.org,
	 Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	 Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Kees Cook <kees@kernel.org>,
	 "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	 "open list:KERNEL HARDENING (not covered by other
	areas):Keyword:b__counted_by(_le|_be)?b"
	<linux-hardening@vger.kernel.org>
Subject: Re: [PATCH] i2c: atr: use kzalloc_flex
Date: Fri, 10 Apr 2026 01:22:31 +0200	[thread overview]
Message-ID: <adg0kP1OZDbnUaQZ@zenone.zhora.eu> (raw)
In-Reply-To: <CAKxU2N9tkjDeE6Zz6diMEMT4uNzYg4D36gow0BTbaC=AyAeT3A@mail.gmail.com>

Hi Rosen,

> > > -     alias_pool = kzalloc_obj(*alias_pool);
> > > +     alias_pool = kzalloc_flex(*alias_pool, aliases, num_aliases);
> > >       if (!alias_pool)
> > >               return ERR_PTR(-ENOMEM);
> > >
> > >       alias_pool->size = num_aliases;
> >
> > this line is not needed anymore because kzalloc_flex will resolve
> > to alias_pool size and will set it tu num_aliases.
> I believe that only works with GCC15 and above.

Yes, you're right, it works with clang.

Merged to i2c/i2c-host.

Thanks,
Andi

  reply	other threads:[~2026-04-09 23:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27  3:03 [PATCH] i2c: atr: use kzalloc_flex Rosen Penev
2026-03-27  8:12 ` Luca Ceresoli
2026-03-27 18:35   ` Rosen Penev
2026-04-09 16:29 ` Andi Shyti
2026-04-09 16:37   ` Rosen Penev
2026-04-09 23:22     ` Andi Shyti [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-13  0:23 Rosen Penev
2026-03-13  8:17 ` Luca Ceresoli
2026-03-13 21:48   ` Rosen Penev
2026-03-30  8:50 ` Romain Gantois

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=adg0kP1OZDbnUaQZ@zenone.zhora.eu \
    --to=andi.shyti@kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=rosenp@gmail.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --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