Re: [PATCH 6/7] spi: lm70llp: remove printk

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

 



On Thu, Dec 03, 2015 at 06:29:58PM +0530, Sudip Mukherjee wrote:
> Using pr_* macros are more prefferable than using printk. Start using
> pr_* family of macros and define pr_fmt to be used with it.
> While at it remove DRVNAME from an existing pr_info() as the name is now
> being printed by pr_fmt.

> @@ -246,9 +245,7 @@ static void spi_lm70llp_attach(struct parport *p)
>  	 */
>  	status = spi_bitbang_start(&pp->bitbang);
>  	if (status < 0) {
> -		printk(KERN_WARNING
> -			"%s: spi_bitbang_start failed with status %d\n",
> -			DRVNAME, status);
> +		pr_warn("spi_bitbang_start failed with status %d\n", status);
>  		goto out_off_and_release;
>  	}
>  

When we have a struct device available it's even better to use
dev_warn() and so on.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux