From: Joshua Crofts <joshua.crofts1@gmail.com>
To: "Kaustabh Chakraborty" <kauschluss@disroot.org>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: proximity: add driver for Sharp GP2AP070S proximity sensor
Date: Thu, 30 Jul 2026 09:19:21 +0200 [thread overview]
Message-ID: <20260730091921.00002d45@gmail.com> (raw)
In-Reply-To: <DKB8WW9AK4KQ.2A9KVJWD5ORFT@disroot.org>
On Wed, 29 Jul 2026 23:23:45 +0530
"Kaustabh Chakraborty" <kauschluss@disroot.org> wrote:
...
> > Please add iio/* includes after the generic linux/* headers. Ensure
> > that there is a blank line between the two groups.
> >
> > Additionally, you're also missing <asm/byteorder.h>, array_size.h, err.h,
> > types.h and delay.h.
>
> By the way, is there any tooling to satisfactorily point out the
> shortfalls with includes? Or is it just intuition and experience?
"Fully satisfactorily" no, but there is a tool called iwyu_tool (IWYU
meaning include-what-you-use). It requires Clang/LLVM on your machine
but it can serve as a pretty good starting point when cleaning up
includes. There is an unofficial mapping file for IIO that makes the
output of the tool less noisy, however it will probably still need
tweaking. Here's the link to that thread:
https://lore.kernel.org/linux-iio/20260512073505.1310-1-joshua.crofts1@gmail.com/
Setting it up may be a bit tedious, but I found Gemini to be pretty
good at this.
>
> >> + ret = devm_request_threaded_irq(dev, client->irq, NULL,
> >> + gp2ap070s_irq_handler, IRQF_ONESHOT,
> >> + "gp2ap070s-irq", indio_dev);
> >> + if (ret)
> >> + return dev_err_probe(dev, ret, "Failed to request IRQ");
> >
> > Just return ret instead, dev_err_probe() is called automatically on failure.
>
> Are you sure about that? I happen to call dev_err_probe() on all other
> places and other drivers (as of late) as well (other than -ENOMEM).
See the comment at the devm_request_threaded_irq definition here:
https://elixir.bootlin.com/linux/v7.2-rc4/source/kernel/irq/devres.c#L94
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-07-30 7:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 17:28 [PATCH 0/3] Add Sharp GP2AP070S Proximity Driver and enable it in Galaxy J6 (j6lte) Kaustabh Chakraborty
2026-07-23 17:28 ` [PATCH 1/3] dt-bindings: iio: proximity: add Sharp GP2AP070S proximity sensor Kaustabh Chakraborty
2026-07-23 21:47 ` Joshua Crofts
2026-07-29 17:26 ` Kaustabh Chakraborty
2026-07-23 17:28 ` [PATCH 2/3] iio: proximity: add driver for " Kaustabh Chakraborty
2026-07-23 17:40 ` sashiko-bot
2026-07-23 21:44 ` Joshua Crofts
2026-07-29 17:53 ` Kaustabh Chakraborty
2026-07-30 7:19 ` Joshua Crofts [this message]
2026-07-26 19:00 ` Jonathan Cameron
2026-07-23 17:28 ` [PATCH 3/3] arm64: dts: exynos7870-j6lte: add " Kaustabh Chakraborty
2026-07-23 17:42 ` sashiko-bot
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=20260730091921.00002d45@gmail.com \
--to=joshua.crofts1@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kauschluss@disroot.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=peter.griffin@linaro.org \
--cc=robh@kernel.org \
/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