[PATCH v2 04/12] pinctrl: single: fix debug messages formatting

Pratyush Yadav p.yadav at ti.com
Fri Jan 29 17:53:49 CET 2021


On 28/01/21 11:24PM, Dario Binacchi wrote:
> The dev_dbg(dev, "  reg/val 0x%pa/0x%08x\n", &reg, val); prints the 'reg'
> address preceded by the prefix 0x0x instead of 0x. This because the
> printf '%pa' format specifier already appends the prefix '0x' to the

s/appends/prepends/

Other than that,

Reviewed-by: Pratyush Yadav <p.yadav at ti.com>

> address displayed.
> 
> Signed-off-by: Dario Binacchi <dariobin at libero.it>
> 
> ---
> 
> Changes in v2:
> - Updated commit message
> - Split in 2 commits
> 
>  drivers/pinctrl/pinctrl-single.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index 935b5e920d..cec00e289c 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -101,7 +101,7 @@ static int single_configure_pins(struct udevice *dev,
>  				 pdata->width);
>  			continue;
>  		}
> -		dev_dbg(dev, "  reg/val 0x%pa/0x%08x\n", &reg, val);
> +		dev_dbg(dev, "  reg/val %pa/0x%08x\n", &reg, val);
>  	}
>  	return 0;
>  }
> @@ -140,7 +140,7 @@ static int single_configure_bits(struct udevice *dev,
>  				 pdata->width);
>  			continue;
>  		}
> -		dev_dbg(dev, "  reg/val 0x%pa/0x%08x\n", &reg, val);
> +		dev_dbg(dev, "  reg/val %pa/0x%08x\n", &reg, val);
>  	}
>  	return 0;
>  }
> -- 
> 2.17.1
> 

-- 
Regards,
Pratyush Yadav
Texas Instruments India


More information about the U-Boot mailing list