[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b5jlh7ngl64aqrm7b2hkpafvfk6rmuyhwshzogxqozpal3owmj@u26s6bpwbax7>
Date: Wed, 4 Jun 2025 19:58:19 -0600
From: Russ Weight <russ.weight@...ux.dev>
To: Marco Felsch <m.felsch@...gutronix.de>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Kamel Bouhara <kamel.bouhara@...tlin.com>,
Marco Felsch <kernel@...gutronix.de>, Henrik Rydberg <rydberg@...math.org>,
Danilo Krummrich <dakr@...hat.com>, linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-input@...r.kernel.org
Subject: Re: [PATCH v2 1/4] firmware_loader: expand firmware error codes with
skip error
On Thu, May 29, 2025 at 12:08:42AM +0200, Marco Felsch wrote:
> Add FW_UPLOAD_ERR_SKIP to allow drivers to inform the firmware_loader
> framework that the update is not required. This can be the case if the
> user provided firmware matches the current running firmware.
The changes below look fine, but the commit message is inconsistent
with the actual changes. The commit message should reference
FW_UPLOAD_ERR_DUPLICATE instead of FW_UPLOAD_ERR_SKIP.
- Russ
>
> Sync lib/test_firmware.c file accordingly.
>
> Signed-off-by: Marco Felsch <m.felsch@...gutronix.de>
> ---
> drivers/base/firmware_loader/sysfs_upload.c | 1 +
> include/linux/firmware.h | 2 ++
> lib/test_firmware.c | 1 +
> 3 files changed, 4 insertions(+)
>
> diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
> index 829270067d1632f92656859fb9143e3fa9635670..0a583a1b3f4fde563257566426d523fbf839b13f 100644
> --- a/drivers/base/firmware_loader/sysfs_upload.c
> +++ b/drivers/base/firmware_loader/sysfs_upload.c
> @@ -28,6 +28,7 @@ static const char * const fw_upload_err_str[] = {
> [FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
> [FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
> [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
> + [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
> };
>
> static const char *fw_upload_progress(struct device *dev,
> diff --git a/include/linux/firmware.h b/include/linux/firmware.h
> index aae1b85ffc10e20e9c3c9b6009d26b83efd8cb24..fe7797be4c08cd62cdad9617b8f70095d5e0af2f 100644
> --- a/include/linux/firmware.h
> +++ b/include/linux/firmware.h
> @@ -29,6 +29,7 @@ struct firmware {
> * @FW_UPLOAD_ERR_RW_ERROR: read or write to HW failed, see kernel log
> * @FW_UPLOAD_ERR_WEAROUT: FLASH device is approaching wear-out, wait & retry
> * @FW_UPLOAD_ERR_FW_INVALID: invalid firmware file
> + * @FW_UPLOAD_ERR_DUPLICATE: firmware is already up to date (duplicate)
> * @FW_UPLOAD_ERR_MAX: Maximum error code marker
> */
> enum fw_upload_err {
> @@ -41,6 +42,7 @@ enum fw_upload_err {
> FW_UPLOAD_ERR_RW_ERROR,
> FW_UPLOAD_ERR_WEAROUT,
> FW_UPLOAD_ERR_FW_INVALID,
> + FW_UPLOAD_ERR_DUPLICATE,
> FW_UPLOAD_ERR_MAX
> };
>
> diff --git a/lib/test_firmware.c b/lib/test_firmware.c
> index 211222e63328f970228920f5662ee80cc7f51215..603c3a4b385c849944a695849a1894693234b5eb 100644
> --- a/lib/test_firmware.c
> +++ b/lib/test_firmware.c
> @@ -1133,6 +1133,7 @@ static const char * const fw_upload_err_str[] = {
> [FW_UPLOAD_ERR_RW_ERROR] = "read-write-error",
> [FW_UPLOAD_ERR_WEAROUT] = "flash-wearout",
> [FW_UPLOAD_ERR_FW_INVALID] = "firmware-invalid",
> + [FW_UPLOAD_ERR_DUPLICATE] = "firmware-duplicate",
> };
>
> static void upload_err_inject_error(struct test_firmware_upload *tst,
>
> --
> 2.39.5
>
Powered by blists - more mailing lists