2012-11-05 11:34:50

by YAMANE Toshiaki

[permalink] [raw]
Subject: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <[email protected]>
---
drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/media/go7007/s2250-loader.c b/drivers/staging/media/go7007/s2250-loader.c
index f1bd159..f57eb3b 100644
--- a/drivers/staging/media/go7007/s2250-loader.c
+++ b/drivers/staging/media/go7007/s2250-loader.c
@@ -55,16 +55,16 @@ static int s2250loader_probe(struct usb_interface *interface,

usbdev = usb_get_dev(interface_to_usbdev(interface));
if (!usbdev) {
- printk(KERN_ERR "Enter s2250loader_probe failed\n");
+ dev_err(&interface->dev, "Enter s2250loader_probe failed\n");
return -1;
}
- printk(KERN_INFO "Enter s2250loader_probe 2.6 kernel\n");
- printk(KERN_INFO "vendor id 0x%x, device id 0x%x devnum:%d\n",
- usbdev->descriptor.idVendor, usbdev->descriptor.idProduct,
- usbdev->devnum);
+ dev_info(&interface->dev, "Enter s2250loader_probe 2.6 kernel\n");
+ dev_info(&interface->dev, "vendor id 0x%x, device id 0x%x devnum:%d\n",
+ usbdev->descriptor.idVendor, usbdev->descriptor.idProduct,
+ usbdev->devnum);

if (usbdev->descriptor.bNumConfigurations != 1) {
- printk(KERN_ERR "can't handle multiple config\n");
+ dev_err(&interface->dev, "can't handle multiple config\n");
return -1;
}
mutex_lock(&s2250_dev_table_mutex);
@@ -75,31 +75,32 @@ static int s2250loader_probe(struct usb_interface *interface,
}

if (minor < 0 || minor >= MAX_DEVICES) {
- printk(KERN_ERR "Invalid minor: %d\n", minor);
+ dev_err(&interface->dev, "Invalid minor: %d\n", minor);
goto failed;
}

/* Allocate dev data structure */
s = kmalloc(sizeof(device_extension_t), GFP_KERNEL);
if (s == NULL) {
- printk(KERN_ERR "Out of memory\n");
+ dev_err(&interface->dev, "Out of memory\n");
goto failed;
}
s2250_dev_table[minor] = s;

- printk(KERN_INFO "s2250loader_probe: Device %d on Bus %d Minor %d\n",
- usbdev->devnum, usbdev->bus->busnum, minor);
+ dev_info(&interface->dev,
+ "s2250loader_probe: Device %d on Bus %d Minor %d\n",
+ usbdev->devnum, usbdev->bus->busnum, minor);

memset(s, 0, sizeof(device_extension_t));
s->usbdev = usbdev;
- printk(KERN_INFO "loading 2250 loader\n");
+ dev_info(&interface->dev, "loading 2250 loader\n");

kref_init(&(s->kref));

mutex_unlock(&s2250_dev_table_mutex);

if (request_firmware(&fw, S2250_LOADER_FIRMWARE, &usbdev->dev)) {
- printk(KERN_ERR
+ dev_err(&interface->dev,
"s2250: unable to load firmware from file \"%s\"\n",
S2250_LOADER_FIRMWARE);
goto failed2;
@@ -107,12 +108,12 @@ static int s2250loader_probe(struct usb_interface *interface,
ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
release_firmware(fw);
if (0 != ret) {
- printk(KERN_ERR "loader download failed\n");
+ dev_err(&interface->dev, "loader download failed\n");
goto failed2;
}

if (request_firmware(&fw, S2250_FIRMWARE, &usbdev->dev)) {
- printk(KERN_ERR
+ dev_err(&interface->dev,
"s2250: unable to load firmware from file \"%s\"\n",
S2250_FIRMWARE);
goto failed2;
@@ -120,7 +121,7 @@ static int s2250loader_probe(struct usb_interface *interface,
ret = usb_cypress_load_firmware(usbdev, fw, CYPRESS_FX2);
release_firmware(fw);
if (0 != ret) {
- printk(KERN_ERR "firmware_s2250 download failed\n");
+ dev_err(&interface->dev, "firmware_s2250 download failed\n");
goto failed2;
}

@@ -133,14 +134,14 @@ failed2:
if (s)
kref_put(&(s->kref), s2250loader_delete);

- printk(KERN_ERR "probe failed\n");
+ dev_err(&interface->dev, "probe failed\n");
return -1;
}

static void s2250loader_disconnect(struct usb_interface *interface)
{
pdevice_extension_t s;
- printk(KERN_INFO "s2250: disconnect\n");
+ dev_info(&interface->dev, "s2250: disconnect\n");
s = usb_get_intfdata(interface);
usb_set_intfdata(interface, NULL);
kref_put(&(s->kref), s2250loader_delete);
--
1.7.9.5


2012-11-05 13:11:03

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
> fixed below checkpatch warnings.
> - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
> - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
>
> Signed-off-by: YAMANE Toshiaki <[email protected]>
> ---
> drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
> 1 file changed, 18 insertions(+), 17 deletions(-)

Please note that I don't touch the drivers/staging/media/* files, so
copying me on these patches doesn't do anything :)

thanks,

greg k-h

2012-11-05 13:30:12

by YAMANE Toshiaki

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, Nov 5, 2012 at 10:11 PM, Greg Kroah-Hartman <[email protected]> wrote:
> On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
>> fixed below checkpatch warnings.
>> - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
>> - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
>>
>> Signed-off-by: YAMANE Toshiaki <[email protected]>
>> ---
>> drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
>> 1 file changed, 18 insertions(+), 17 deletions(-)
>
> Please note that I don't touch the drivers/staging/media/* files, so
> copying me on these patches doesn't do anything :)

Thanks for your follow-up.

I tried to check in get_maintainer.pl...
Do I need to be re-sent to the address "Mauro Carvalho Chehab
<[email protected]>"?


--

Regards,

YAMANE Toshiaki

2012-11-05 13:50:18

by Ezequiel Garcia

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, Nov 5, 2012 at 10:30 AM, Toshiaki Yamane <[email protected]> wrote:

>
> I tried to check in get_maintainer.pl...
> Do I need to be re-sent to the address "Mauro Carvalho Chehab
> <[email protected]>"?
>

No, that's not necessary.

You need to send these to linux-media and Cc any relevant maintainer,
if there is one available.

In due time, Mauro will pick the patches from patchwork:

http://patchwork.linuxtv.org/patch/15342/

Thanks!

Ezequiel

2012-11-05 15:11:21

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, 2012-11-05 at 14:11 +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
> > fixed below checkpatch warnings.
> > - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
> > - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
> >
> > Signed-off-by: YAMANE Toshiaki <[email protected]>
> > ---
> > drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
> > 1 file changed, 18 insertions(+), 17 deletions(-)
>
> Please note that I don't touch the drivers/staging/media/* files, so
> copying me on these patches doesn't do anything :)

Maybe:

MAINTAINERS | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b062349..542a541 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6906,6 +6906,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
L: [email protected]
S: Supported
F: drivers/staging/
+X: drivers/staging/media/

STAGING - AGERE HERMES II and II.5 WIRELESS DRIVERS
M: Henk de Groot <[email protected]>

2012-11-05 15:25:24

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, 2012-11-05 at 16:22 +0100, Greg Kroah-Hartman wrote:
> On Mon, Nov 05, 2012 at 07:11:11AM -0800, Joe Perches wrote:
> > On Mon, 2012-11-05 at 14:11 +0100, Greg Kroah-Hartman wrote:
> > > On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
> > > > fixed below checkpatch warnings.
> > > > - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
> > > > - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
> > > >
> > > > Signed-off-by: YAMANE Toshiaki <[email protected]>
> > > > ---
> > > > drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
> > > > 1 file changed, 18 insertions(+), 17 deletions(-)
> > >
> > > Please note that I don't touch the drivers/staging/media/* files, so
> > > copying me on these patches doesn't do anything :)
> >
> > Maybe:
> >
> > MAINTAINERS | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index b062349..542a541 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -6906,6 +6906,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> > L: [email protected]
> > S: Supported
> > F: drivers/staging/
> > +X: drivers/staging/media/
>
> Sure, that would be good, care to resend it with a signed-off-by: so I
> can apply it?

It was just a nudge.

You're the nominal staging maintainer, if you choose not to
work on a specific directory under staging, I think you can
mark it in MAINTAINERS just as easily yourself.

cheers, Joe

2012-11-05 15:22:31

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Mon, Nov 05, 2012 at 07:11:11AM -0800, Joe Perches wrote:
> On Mon, 2012-11-05 at 14:11 +0100, Greg Kroah-Hartman wrote:
> > On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
> > > fixed below checkpatch warnings.
> > > - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
> > > - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
> > >
> > > Signed-off-by: YAMANE Toshiaki <[email protected]>
> > > ---
> > > drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
> > > 1 file changed, 18 insertions(+), 17 deletions(-)
> >
> > Please note that I don't touch the drivers/staging/media/* files, so
> > copying me on these patches doesn't do anything :)
>
> Maybe:
>
> MAINTAINERS | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b062349..542a541 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6906,6 +6906,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> L: [email protected]
> S: Supported
> F: drivers/staging/
> +X: drivers/staging/media/

Sure, that would be good, care to resend it with a signed-off-by: so I
can apply it?

thanks,

greg k-h

2012-11-06 00:14:42

by YAMANE Toshiaki

[permalink] [raw]
Subject: Re: [PATCH] staging/media: Use dev_ printks in go7007/s2250-loader.c

On Tue, Nov 6, 2012 at 12:25 AM, Joe Perches <[email protected]> wrote:
> On Mon, 2012-11-05 at 16:22 +0100, Greg Kroah-Hartman wrote:
>> On Mon, Nov 05, 2012 at 07:11:11AM -0800, Joe Perches wrote:
>> > On Mon, 2012-11-05 at 14:11 +0100, Greg Kroah-Hartman wrote:
>> > > On Mon, Nov 05, 2012 at 08:34:42PM +0900, YAMANE Toshiaki wrote:
>> > > > fixed below checkpatch warnings.
>> > > > - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
>> > > > - WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
>> > > >
>> > > > Signed-off-by: YAMANE Toshiaki <[email protected]>
>> > > > ---
>> > > > drivers/staging/media/go7007/s2250-loader.c | 35 ++++++++++++++-------------
>> > > > 1 file changed, 18 insertions(+), 17 deletions(-)
>> > >
>> > > Please note that I don't touch the drivers/staging/media/* files, so
>> > > copying me on these patches doesn't do anything :)
>> >
>> > Maybe:
>> >
>> > MAINTAINERS | 1 +
>> > 1 files changed, 1 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/MAINTAINERS b/MAINTAINERS
>> > index b062349..542a541 100644
>> > --- a/MAINTAINERS
>> > +++ b/MAINTAINERS
>> > @@ -6906,6 +6906,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
>> > L: [email protected]
>> > S: Supported
>> > F: drivers/staging/
>> > +X: drivers/staging/media/
>>
>> Sure, that would be good, care to resend it with a signed-off-by: so I
>> can apply it?
>
> It was just a nudge.
>
> You're the nominal staging maintainer, if you choose not to
> work on a specific directory under staging, I think you can
> mark it in MAINTAINERS just as easily yourself.

Thanks for all.

I wait Mauro-san will pick the patches.
And I will send the patches to the correct destination from the next time.


--

Regards,

YAMANE Toshiaki