[PATCH 2/8] mtd: mtdraw: use dev_* for printing

Sam Ravnborg sam at ravnborg.org
Fri Sep 21 07:33:19 PDT 2018


Hi Sascha.

My OCD triggered here...

On Fri, Sep 21, 2018 at 01:18:14PM +0200, Sascha Hauer wrote:
> We have a struct device_d *, so use dev_* for printing instead of
> printf.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
>  drivers/mtd/mtdraw.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c
> index d0dde0dee2..3ad9de80a2 100644
> --- a/drivers/mtd/mtdraw.c
> +++ b/drivers/mtd/mtdraw.c
> @@ -252,7 +252,8 @@ static int mtdraw_erase(struct cdev *cdev, loff_t count, loff_t offset)
>  	erase.len = mtd->erasesize;
>  
>  	while (count > 0) {
> -		debug("erase 0x%08llx len: 0x%08llx\n", erase.addr, erase.len);
> +		dev_dbg(&mtd->class_dev, "erase 0x%08llx len: 0x%08llx\n",
> +			erase.addr, erase.len);
"erase" with lower case "e"

>  
>  		if (!mtd->allow_erasebad)
>  			ret = mtd_block_isbad(mtd, erase.addr);
> @@ -260,7 +261,8 @@ static int mtdraw_erase(struct cdev *cdev, loff_t count, loff_t offset)
>  			ret = 0;
>  
>  		if (ret > 0) {
> -			printf("Skipping bad block at 0x%08llx\n", erase.addr);
> +			dev_info(&mtd->class_dev, "Skipping bad block at 0x%08llx\n",
> +				 erase.addr);
Skipping with upper case "S".

Feel free to ignore.

	Sam



More information about the barebox mailing list