Re: [PATCH] iio: pressure: bmp280: fix bmp580 buffer channel order

From: Joshua Crofts

Date: Fri Dec 04 2026 - 01:53:41 EST


On 04-Dec-26 4:45, Eric Westphal wrote:
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit

What's this doing here?

> bmp580_channels[] declares pressure at scan_index 0 and temperature at
> scan_index 1, matching enum bmp280_scan. The original triggered-buffer
> support filled data->sensor_data[] in that order: pressure at offset 0,
> then temperature.
> Commit 872c8014e05e replaced the array with a stack-local scan struct,
> but declared the fields as temperature then pressure. The memcpy
> targets stayed correct, so the pushed buffer has the samples swapped
> relative to scan_index. Userspace therefore sees temperature counts in
> the pressure slot and vice versa.
> On a BMP581 this was observed as buffered values of about 26,800 Pa and
> 98 °C while the sysfs in_*_input attributes correctly reported about
> 100,601 Pa and 26.2 °C.
> Reorder the struct fields to match the scan_index mapping, as the
> bmp280, bme280, bmp380, and bmp180 trigger handlers already do.
> Fixes: 872c8014e05e ("iio: pressure: bmp280: drop sensor_data array")
> Cc: stable@xxxxxxxxxxxxxxx
> # Replace the placeholder Signed-off-by before sending (do not use
> # Eric Westphal unless he is the submitter and agrees to the DCO):
> Signed-off-by: [Your Name] <your.email@xxxxxxxxxxx>

I don't mean to be harsh, but have you read the output from your LLM?
Please don't blindly copy patches. We can't accept patches without a
valid Signed-off-by tag.

> ---
> drivers/iio/pressure/bmp280-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/iio/pressure/bmp280-core.c
> b/drivers/iio/pressure/bmp280-core.c

I assume the LLM generated the entirety of this patch and git was not
used in the process, as the diff --git line is split into two, hence
the patch fails to apply. Or option 2 - you pasted this directly into
the compose window in Gmail, which malforms messages.

This patch is unacceptable. Please read
Documentation/process/submitting-patches.rst and go from there.

--
Kind regards,
Joshua Crofts