Re: [PATCH v3 1/3] platform/x86: int3472: Address Coccinelle warning on an error print

Ricardo Ribalda Delgado <[email protected]>
Newsgroups org.kernel.vger.linux-acpi,org.kernel.vger.linux-media,org.kernel.vger.platform-driver-x86
Message-ID <CAPybu_3JSL5qAUTpL27GotvQfSzMtcJGGC68eRsCiZ0YwNBNaA@mail.gmail.com>
On Tue, Aug 25, 2026 at 10:36 PM Sakari Ailus
<[email protected]> wrote:
>
> Fix the following Coccinelle warning:
>
> ./tps68470.c:164:58-65: WARNING: Consider using %pe to print PTR_ERR()
>
> by using %pe specifier for printing an error code.
>
> Signed-off-by: Sakari Ailus <[email protected]>
> Reviewed-by: Ilpo Järvinen <[email protected]>
Reviewed-by: Ricardo Ribalda <[email protected]>
> ---
>  drivers/platform/x86/intel/int3472/tps68470.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/int3472/tps68470.c b/drivers/platform/x86/intel/int3472/tps68470.c
> index a77ed32abe55..dc777dbac61f 100644
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@ -161,7 +161,7 @@ static int skl_int3472_tps68470_probe(struct i2c_client *client)
>
>         regmap = devm_regmap_init_i2c(client, &tps68470_regmap_config);
>         if (IS_ERR(regmap)) {
> -               dev_err(&client->dev, "Failed to create regmap: %ld\n", PTR_ERR(regmap));
> +               dev_err(&client->dev, "Failed to create regmap: %pe\n", regmap);
>                 return PTR_ERR(regmap);
>         }
>
> --
> 2.47.3
>
>


-- 
Ricardo Ribalda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.