Re: [PATCH v2 6/7] mt7621-mmc: printk() should include KERN_<LEVEL> facility level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 19, 2018 at 05:07:06PM +0100, Jona Crasselt wrote:
> Issue reported by checkpatch.pl.
> Replace printk() with pr_debug() to include facility level.
> 
> Signed-off-by: Jona Crasselt <jona.crasselt@xxxxxx>
> Signed-off-by: Felix Windsheimer <felix.windsheimer@xxxxxx>
> ---
>  drivers/staging/mt7621-mmc/sd.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
> index 357418999b1f..149ea9ecfe32 100644
> --- a/drivers/staging/mt7621-mmc/sd.c
> +++ b/drivers/staging/mt7621-mmc/sd.c
> @@ -1238,10 +1238,10 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>  		"LEGACY", "MMC_HS", "SD_HS"
>  	};
>  
> -	printk("SET_IOS: CLK(%dkHz), BUS(%s), BW(%u), PWR(%s), VDD(%s), TIMING(%s)",
> -		ios->clock / 1000, bus_mode[ios->bus_mode],
> -		(ios->bus_width == MMC_BUS_WIDTH_4) ? 4 : 1,
> -		power_mode[ios->power_mode], vdd[ios->vdd], timing[ios->timing]);
> +	pr_debug("SET_IOS: CLK(%dkHz), BUS(%s), BW(%u), PWR(%s), VDD(%s), TIMING(%s)",
> +		 ios->clock / 1000, bus_mode[ios->bus_mode],
> +		 (ios->bus_width == MMC_BUS_WIDTH_4) ? 4 : 1,
> +		 power_mode[ios->power_mode], vdd[ios->vdd], timing[ios->timing]);

How do you know this is a "debug" message?

And as you have a struct device somewhere around here, please use
dev_dbg() instead of pr_debug(), it provides more information to the
developer.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux