From: sashiko-bot@kernel.org
To: "Tabrez Ahmed" <tabreztalks@gmail.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v4 1/3] hwmon: (ads7871) Fix endianness bug in 16-bit register reads
Date: Fri, 01 May 2026 01:46:37 +0000 [thread overview]
Message-ID: <20260501014637.F3155C2BCB3@smtp.kernel.org> (raw)
In-Reply-To: <20260501013044.22756-2-tabreztalks@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch includes the architecture-specific `<asm/unaligned.h>` instead of the generic `<linux/unaligned.h>`.
--
commit f2dcf018978363b0b13a49ceee94284796f154fb
Author: Tabrez Ahmed <tabreztalks@gmail.com>
hwmon: (ads7871) Fix endianness bug in 16-bit register reads
This commit replaces spi_w8r16() with a manual spi_write_then_read() into a
byte array to address an endianness bug. The 16-bit value is then safely
reconstructed using get_unaligned_le16().
Closes: https://sashiko.dev/#/patchset/20260418034601.90226-1-tabreztalks@gmail.com
> diff --git a/drivers/hwmon/ads7871.c b/drivers/hwmon/ads7871.c
> index 9bfdf9e6bcd77..15104d9b2b733 100644
> --- a/drivers/hwmon/ads7871.c
> +++ b/drivers/hwmon/ads7871.c
> @@ -59,6 +59,7 @@
> #include <linux/hwmon-sysfs.h>
> #include <linux/err.h>
> #include <linux/delay.h>
> +#include <asm/unaligned.h>
Should this use <linux/unaligned.h> instead of the architecture-specific
<asm/unaligned.h> header?
Directly including <asm/unaligned.h> can cause build failures on platforms
that no longer expose this header directly to drivers.
I notice this is addressed later in the patch series in the commit
"hwmon: (ads7871) Use DMA-safe buffer for SPI writes". Does this temporary
inclusion break the expectation that every patch in a series must
independently compile?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260501013044.22756-1-tabreztalks@gmail.com?part=1
next prev parent reply other threads:[~2026-05-01 1:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 1:30 [PATCH v4 0/3] hwmon: (ads7871) Fix endianness and modernize driver Tabrez Ahmed
2026-05-01 1:30 ` [PATCH v4 1/3] hwmon: (ads7871) Fix endianness bug in 16-bit register reads Tabrez Ahmed
2026-05-01 1:46 ` sashiko-bot [this message]
2026-05-01 1:30 ` [PATCH v4 2/3] hwmon: (ads7871) Convert to hwmon_device_register_with_info Tabrez Ahmed
2026-05-01 1:30 ` [PATCH v4 3/3] hwmon: (ads7871) Use DMA-safe buffer for SPI writes Tabrez Ahmed
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=20260501014637.F3155C2BCB3@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=sashiko@lists.linux.dev \
--cc=tabreztalks@gmail.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