From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Cc: antoniu.miclaus@analog.com, lars@metafoo.de,
Michael.Hennerich@analog.com, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ti-ads7138: explicitly include <linux/slab.h>
Date: Fri, 24 Apr 2026 12:07:24 +0300 [thread overview]
Message-ID: <aesyzOMUl2Iyjgjz@ashevche-desk.local> (raw)
In-Reply-To: <20260424081809.61841-2-giorgitchankvetadze1997@gmail.com>
On Fri, Apr 24, 2026 at 12:18:10PM +0400, Giorgi Tchankvetadze wrote:
> ti-ads7138.c uses kmalloc() and kfree(), which are provided by
> linux/slab.h, but does not include that header directly.
> The driver currently gets these declarations through linux/i2c.h.
> Include linux/slab.h explicitly instead of relying on the transitive
> include.
If you want to make it real patch, please convert it to follow IWYU.
What you are saying is basically comes from kernel.h (yeah, i2c.h happens
earlier, but the kernel.h is PITA currently).
WRT to the kmalloc() use, wouldn't it be simply better to use
i2c_master_send_dmasafe() and kill that kmalloc() dance in the driver?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-04-24 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 8:18 Giorgi Tchankvetadze
2026-04-24 9:07 ` Andy Shevchenko [this message]
2026-04-24 10:36 ` Jonathan Cameron
2026-04-24 11:33 ` Andy Shevchenko
2026-04-24 16:57 ` Jonathan Cameron
2026-04-27 11:29 ` Giorgi Tchankvetadze
2026-04-28 18:14 ` Jonathan Cameron
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=aesyzOMUl2Iyjgjz@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=giorgitchankvetadze1997@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.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®