Hello Honza,
thank you very very much for your help and hints. These things make a community what it is, and I apreciate it extremely.
You're perfectly right, I didn't think about this well and/or enough.
Apreciated your hints.....
On Wed, 24 Jan 2018, Honza Petrouš wrote:
Date: Wed, 24 Jan 2018 14:07:52
From: Honza Petrouš <jpetrous@xxxxxxxxx>
To: Enrico Mioso <mrkiko.rs@xxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, Sean Young <sean@xxxxxxxx>,
Piotr Oleszczyk <piotr.oleszczyk@xxxxxxxxx>,
Andrey Konovalov <andreyknvl@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Alexey Dobriyan <adobriyan@xxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
Subject: Re: [PATCH] dib700: stop flooding system ring buffer
Hi Enrico,
I'm not maintener, so treat next hints as hints only :)
2018-01-24 8:40 GMT+01:00 Enrico Mioso <mrkiko.rs@xxxxxxxxx>:
Stop flooding system ring buffer with messages like:
dib0700: stk7700ph_xc3028_callback: unknown command 2, arg 0
while tuning an Asus My Cinema-U3000Hybrid dvb card.
The correctness of this patch is opinable, but it's annoying me so much I
sent it anyway.
CC: linux-media@xxxxxxxxxxxxxxx
CC: Sean Young <sean@xxxxxxxx>
CC: Piotr Oleszczyk <piotr.oleszczyk@xxxxxxxxx>
CC: Andrey Konovalov <andreyknvl@xxxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: Alexey Dobriyan <adobriyan@xxxxxxxxx>
CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
Signed-off-by: Enrico Mioso <mrkiko.rs@xxxxxxxxx>
---
drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c
index 366b05529915..bc5d250ed2f2 100644
--- a/drivers/media/usb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/usb/dvb-usb/dib0700_devices.c
@@ -432,8 +432,7 @@ static int stk7700ph_xc3028_callback(void *ptr, int component,
case XC2028_RESET_CLK:
break;
default:
- err("%s: unknown command %d, arg %d\n", __func__,
- command, arg);
May be change err() to debug() or something similar would be better?
+ break;
return -EINVAL;
Anyway it looks strange to break before return.
In both cases (w/ or w/o removal of message) I would stay
with -EINVAL for unknown command here.
}
return 0;
--
2.16.1
/Honza