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

Ilpo Järvinen <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-media
Message-ID <[email protected]>
On Thu, 20 Aug 2026, Sakari Ailus wrote:

> Fix the following Coccinelle warning:
> 
> ./tps68470.c:164:58-65: WARNING: Consider using %pe to print PTR_ERR()

It seems coccinelle scripts too employ scare tactics. :-/

The change is fine,

Reviewed-by: Ilpo Järvinen <[email protected]>

> by using %pe specifier for printing an error code.
> 
> Signed-off-by: Sakari Ailus <[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);
>  	}
>  
> 

-- 
 i.
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.