[PATCH 2/3] usb: typec: tipd: add error log to provide firmware name and size

Javier Carrasco posted 3 patches 1 year, 8 months ago
[PATCH 2/3] usb: typec: tipd: add error log to provide firmware name and size
Posted by Javier Carrasco 1 year, 8 months ago
The current error logs do not show the firmware name and size for the
tps6598x. On the other hand, this information is provided for the
tps25750. Both implementations have access to that information, and the
existing message for the tps25750 can be used for the tps6598x without
extra modifications.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
---
 drivers/usb/typec/tipd/core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 851b0d02727a..58f6eeffd070 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -1195,6 +1195,10 @@ static int tps6598x_apply_patch(struct tps6598x *tps)
 
 release_fw:
 	release_firmware(fw);
+	if (ret) {
+		dev_err(tps->dev, "Failed to write patch %s of %zu bytes\n",
+			firmware_name, fw->size);
+	}
 
 	return ret;
 };

-- 
2.40.1
Re: [PATCH 2/3] usb: typec: tipd: add error log to provide firmware name and size
Posted by Heikki Krogerus 1 year, 8 months ago
On Thu, Jun 06, 2024 at 11:03:56AM +0200, Javier Carrasco wrote:
> The current error logs do not show the firmware name and size for the
> tps6598x. On the other hand, this information is provided for the
> tps25750. Both implementations have access to that information, and the
> existing message for the tps25750 can be used for the tps6598x without
> extra modifications.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tipd/core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 851b0d02727a..58f6eeffd070 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -1195,6 +1195,10 @@ static int tps6598x_apply_patch(struct tps6598x *tps)
>  
>  release_fw:
>  	release_firmware(fw);
> +	if (ret) {
> +		dev_err(tps->dev, "Failed to write patch %s of %zu bytes\n",
> +			firmware_name, fw->size);
> +	}
>  
>  	return ret;
>  };
> 
> -- 
> 2.40.1

-- 
heikki