mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 16/16] sound: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
Date: Sun, 28 Oct 2012 09:59:05 +0100	[thread overview]
Message-ID: <s5hsj8zc6qu.wl%tiwai@suse.de> (raw)
In-Reply-To: <b3001ed99fc8f583ad8a5c6b53900489e43dfa69.1351411048.git.joe@perches.com>

At Sun, 28 Oct 2012 01:05:54 -0700,
Joe Perches wrote:
> 
> dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
> and reducing object size is good.
> Coalesce multiline formats for easier grep.
> Coalesce segmented single line formats too.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks, applied.


Takashi

> ---
>  sound/pci/asihpi/hpidspcd.c |   22 +++++++++-------------
>  sound/pci/asihpi/hpioctl.c  |   17 ++++++++---------
>  2 files changed, 17 insertions(+), 22 deletions(-)
> 
> diff --git a/sound/pci/asihpi/hpidspcd.c b/sound/pci/asihpi/hpidspcd.c
> index 456a758..ac91637 100644
> --- a/sound/pci/asihpi/hpidspcd.c
> +++ b/sound/pci/asihpi/hpidspcd.c
> @@ -49,14 +49,12 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
>  	err = request_firmware(&firmware, fw_name, &dev->dev);
>  
>  	if (err || !firmware) {
> -		dev_printk(KERN_ERR, &dev->dev,
> -			"%d, request_firmware failed for  %s\n", err,
> -			fw_name);
> +		dev_err(&dev->dev, "%d, request_firmware failed for %s\n",
> +			err, fw_name);
>  		goto error1;
>  	}
>  	if (firmware->size < sizeof(header)) {
> -		dev_printk(KERN_ERR, &dev->dev, "Header size too small %s\n",
> -			fw_name);
> +		dev_err(&dev->dev, "Header size too small %s\n", fw_name);
>  		goto error2;
>  	}
>  	memcpy(&header, firmware->data, sizeof(header));
> @@ -64,7 +62,7 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
>  	if ((header.type != 0x45444F43) ||	/* "CODE" */
>  		(header.adapter != adapter)
>  		|| (header.size != firmware->size)) {
> -		dev_printk(KERN_ERR, &dev->dev,
> +		dev_err(&dev->dev,
>  			"Invalid firmware header size %d != file %zd\n",
>  			header.size, firmware->size);
>  		goto error2;
> @@ -72,17 +70,15 @@ short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
>  
>  	if ((header.version >> 9) != (HPI_VER >> 9)) {
>  		/* Consider even and subsequent odd minor versions to be compatible */
> -		dev_printk(KERN_ERR, &dev->dev,
> -			"Incompatible firmware version "
> -			"DSP image %X != Driver %X\n", header.version,
> -			HPI_VER);
> +		dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n",
> +			header.version, HPI_VER);
>  		goto error2;
>  	}
>  
>  	if (header.version != HPI_VER) {
> -		dev_printk(KERN_INFO, &dev->dev,
> -			"Firmware: release version mismatch  DSP image %X != Driver %X\n",
> -			header.version, HPI_VER);
> +		dev_info(&dev->dev,
> +			 "Firmware: release version mismatch  DSP image %X != Driver %X\n",
> +			 header.version, HPI_VER);
>  	}
>  
>  	HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);
> diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
> index 6091562..8f96749 100644
> --- a/sound/pci/asihpi/hpioctl.c
> +++ b/sound/pci/asihpi/hpioctl.c
> @@ -326,7 +326,7 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
>  		pci_dev->subsystem_device, pci_dev->devfn);
>  
>  	if (pci_enable_device(pci_dev) < 0) {
> -		dev_printk(KERN_ERR, &pci_dev->dev,
> +		dev_err(&pci_dev->dev,
>  			"pci_enable_device failed, disabling device\n");
>  		return -EIO;
>  	}
> @@ -398,9 +398,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
>  	mutex_init(&adapters[adapter_index].mutex);
>  	pci_set_drvdata(pci_dev, &adapters[adapter_index]);
>  
> -	dev_printk(KERN_INFO, &pci_dev->dev,
> -		"probe succeeded for ASI%04X HPI index %d\n",
> -		adapter.adapter->type, adapter_index);
> +	dev_info(&pci_dev->dev, "probe succeeded for ASI%04X HPI index %d\n",
> +		 adapter.adapter->type, adapter_index);
>  
>  	return 0;
>  
> @@ -448,11 +447,11 @@ void __devexit asihpi_adapter_remove(struct pci_dev *pci_dev)
>  
>  	pci_set_drvdata(pci_dev, NULL);
>  	if (1)
> -		dev_printk(KERN_INFO, &pci_dev->dev,
> -			"remove %04x:%04x,%04x:%04x,%04x," " HPI index %d.\n",
> -			pci_dev->vendor, pci_dev->device,
> -			pci_dev->subsystem_vendor, pci_dev->subsystem_device,
> -			pci_dev->devfn, pa->adapter->index);
> +		dev_info(&pci_dev->dev,
> +			 "remove %04x:%04x,%04x:%04x,%04x, HPI index %d\n",
> +			 pci_dev->vendor, pci_dev->device,
> +			 pci_dev->subsystem_vendor, pci_dev->subsystem_device,
> +			 pci_dev->devfn, pa->adapter->index);
>  
>  	memset(pa, 0, sizeof(*pa));
>  }
> -- 
> 1.7.8.112.g3fd21
> 

  reply	other threads:[~2012-10-28  8:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28  8:05 [PATCH 00/16] treewide: " Joe Perches
2012-10-28  8:05 ` [PATCH 01/16] tile: " Joe Perches
2012-10-28 12:54   ` Chris Metcalf
2012-10-28  8:05 ` [PATCH 02/16] ata: " Joe Perches
2012-11-28 17:42   ` Jeff Garzik
2012-10-28  8:05 ` [PATCH 03/16] drivers: base: " Joe Perches
2012-10-28  8:05 ` [PATCH 04/16] block: " Joe Perches
2012-10-28  8:05 ` [PATCH 05/16] pcmcia: " Joe Perches
2012-10-28  8:05 ` [PATCH 06/16] dma: " Joe Perches
2012-10-29  5:54   ` Vinod Koul
2012-10-28  8:05 ` [PATCH 07/16] gpu: " Joe Perches
2012-10-28  8:05 ` [PATCH 08/16] i2c: " Joe Perches
2012-10-28 11:45   ` Jean Delvare
2012-10-28  8:05 ` [PATCH 09/16] wireless: " Joe Perches
2012-10-28  8:05 ` [PATCH 10/16] ethernet: " Joe Perches
2012-11-03  2:00   ` David Miller
2012-10-28  8:05 ` [PATCH 11/16] pci: " Joe Perches
2012-11-05 22:28   ` Bjorn Helgaas
2012-10-28  8:05 ` [PATCH 12/16] scsi: " Joe Perches
2012-10-28  8:05 ` [PATCH 13/16] usb: " Joe Perches
2012-10-28  8:05 ` [PATCH 14/16] virtio: " Joe Perches
2012-10-31 23:54   ` Rusty Russell
2012-10-28  8:05 ` [PATCH 15/16] watchdog: " Joe Perches
2012-10-28  8:05 ` [PATCH 16/16] sound: " Joe Perches
2012-10-28  8:59   ` Takashi Iwai [this message]
2012-10-28 10:54 ` [PATCH 00/16] treewide: " Sergei Shtylyov
2012-10-28 12:12   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hsj8zc6qu.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®