diff mbox

[PATCHv2] staging: media: as102: replace custom dprintk() with dev_dbg()

Message ID 1400342738-32652-1-git-send-email-martink@posteo.de (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Kepplinger May 17, 2014, 4:05 p.m. UTC
don't reinvent dev_dbg(). remove dprintk() in as102_drv.c.
use the common kernel coding style.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
---
this applies to next-20140516. any more suggestions?
more cleanup can be done when dprintk() is completely gone.

 drivers/staging/media/as102/as102_drv.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Comments

Antti Palosaari May 17, 2014, 5:21 p.m. UTC | #1
On 05/17/2014 07:05 PM, Martin Kepplinger wrote:
> don't reinvent dev_dbg(). remove dprintk() in as102_drv.c.
> use the common kernel coding style.
>
> Signed-off-by: Martin Kepplinger <martink@posteo.de>

Reviewed-by: Antti Palosaari <crope@iki.fi>

> ---
> this applies to next-20140516. any more suggestions?
> more cleanup can be done when dprintk() is completely gone.

Do you have the device? I am a bit reluctant patching that driver 
without any testing as it has happened too many times something has gone 
totally broken.

IIRC Devin said it is in staging because of style issues and nothing 
more. Is that correct?

regards
Antti
Martin Kepplinger May 17, 2014, 5:52 p.m. UTC | #2
Am 2014-05-17 19:21, schrieb Antti Palosaari:
> On 05/17/2014 07:05 PM, Martin Kepplinger wrote:
>> don't reinvent dev_dbg(). remove dprintk() in as102_drv.c.
>> use the common kernel coding style.
>>
>> Signed-off-by: Martin Kepplinger <martink@posteo.de>
> 
> Reviewed-by: Antti Palosaari <crope@iki.fi>
> 
>> ---
>> this applies to next-20140516. any more suggestions?
>> more cleanup can be done when dprintk() is completely gone.
> 
> Do you have the device? I am a bit reluctant patching that driver
> without any testing as it has happened too many times something has gone
> totally broken.
I don't have the device and will, at most, change such style issues.

> 
> IIRC Devin said it is in staging because of style issues and nothing
> more. Is that correct?
I haven't heard anything. A TODO file would help.

> 
> regards
> Antti
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gianluca Gennari May 17, 2014, 6:43 p.m. UTC | #3
Il 17/05/2014 19:52, Martin Kepplinger ha scritto:
> Am 2014-05-17 19:21, schrieb Antti Palosaari:
>> On 05/17/2014 07:05 PM, Martin Kepplinger wrote:
>>> don't reinvent dev_dbg(). remove dprintk() in as102_drv.c.
>>> use the common kernel coding style.
>>>
>>> Signed-off-by: Martin Kepplinger <martink@posteo.de>
>>
>> Reviewed-by: Antti Palosaari <crope@iki.fi>
>>
>>> ---
>>> this applies to next-20140516. any more suggestions?
>>> more cleanup can be done when dprintk() is completely gone.
>>
>> Do you have the device? I am a bit reluctant patching that driver
>> without any testing as it has happened too many times something has gone
>> totally broken.
> I don't have the device and will, at most, change such style issues.
> 
>>
>> IIRC Devin said it is in staging because of style issues and nothing
>> more. Is that correct?
> I haven't heard anything. A TODO file would help.

Hi Antti, Martin,
if I remember correctly, the main issue with this driver is that the
device does not work anymore after a reboot: it needs a power cycle to
start working again. Probably this issue is enough to keep the driver in
staging.

Regards,
Gianluca

> 
>>
>> regards
>> Antti
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Carpenter May 17, 2014, 7:22 p.m. UTC | #4
On Sat, May 17, 2014 at 08:21:03PM +0300, Antti Palosaari wrote:
> On 05/17/2014 07:05 PM, Martin Kepplinger wrote:
> >don't reinvent dev_dbg(). remove dprintk() in as102_drv.c.
> >use the common kernel coding style.
> >
> >Signed-off-by: Martin Kepplinger <martink@posteo.de>
> 
> Reviewed-by: Antti Palosaari <crope@iki.fi>
> 
> >---
> >this applies to next-20140516. any more suggestions?
> >more cleanup can be done when dprintk() is completely gone.
> 
> Do you have the device? I am a bit reluctant patching that driver
> without any testing as it has happened too many times something has
> gone totally broken.

Looking through the log the only time I see breakage is build breakage
on allyesconfig.

1ec9a35 [media] staging: as102: Add missing function argument

This was a compile warning and it definitely should have been caught
before the code was submitted or merged, but it wasn't something people
would hit in real life.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/media/as102/as102_drv.c b/drivers/staging/media/as102/as102_drv.c
index 09d64cd..e0ee618 100644
--- a/drivers/staging/media/as102/as102_drv.c
+++ b/drivers/staging/media/as102/as102_drv.c
@@ -31,10 +31,6 @@ 
 #include "as102_fw.h"
 #include "dvbdev.h"
 
-int as102_debug;
-module_param_named(debug, as102_debug, int, 0644);
-MODULE_PARM_DESC(debug, "Turn on/off debugging (default: off)");
-
 int dual_tuner;
 module_param_named(dual_tuner, dual_tuner, int, 0644);
 MODULE_PARM_DESC(dual_tuner, "Activate Dual-Tuner config (default: off)");
@@ -74,7 +70,8 @@  static void as102_stop_stream(struct as102_dev_t *dev)
 			return;
 
 		if (as10x_cmd_stop_streaming(bus_adap) < 0)
-			dprintk(debug, "as10x_cmd_stop_streaming failed\n");
+			dev_dbg(&dev->bus_adap.usb_dev->dev,
+				"as10x_cmd_stop_streaming failed\n");
 
 		mutex_unlock(&dev->bus_adap.lock);
 	}
@@ -112,14 +109,16 @@  static int as10x_pid_filter(struct as102_dev_t *dev,
 	int ret = -EFAULT;
 
 	if (mutex_lock_interruptible(&dev->bus_adap.lock)) {
-		dprintk(debug, "mutex_lock_interruptible(lock) failed !\n");
+		dev_dbg(&dev->bus_adap.usb_dev->dev,
+			"amutex_lock_interruptible(lock) failed !\n");
 		return -EBUSY;
 	}
 
 	switch (onoff) {
 	case 0:
 		ret = as10x_cmd_del_PID_filter(bus_adap, (uint16_t) pid);
-		dprintk(debug, "DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
+		dev_dbg(&dev->bus_adap.usb_dev->dev,
+			"DEL_PID_FILTER([%02d] 0x%04x) ret = %d\n",
 			index, pid, ret);
 		break;
 	case 1:
@@ -131,7 +130,7 @@  static int as10x_pid_filter(struct as102_dev_t *dev,
 		filter.pid = pid;
 
 		ret = as10x_cmd_add_PID_filter(bus_adap, &filter);
-		dprintk(debug,
+		dev_dbg(&dev->bus_adap.usb_dev->dev,
 			"ADD_PID_FILTER([%02d -> %02d], 0x%04x) ret = %d\n",
 			index, filter.idx, filter.pid, ret);
 		break;