dib700: stop flooding system ring buffer
PATCH 1/1 dib700: stop flooding system ring buffer
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.
--- drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/dvb-usb/dib0700_devices.c +1 -2
@@ -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); +break ;return -EINVAL ; }return 0 ;
Signature · 1 line
2.16.1
Hi Enrico,
I'm not maintener, so treat next hints as hints only :)
2018-01-24 8:40 GMT+01:00 Enrico Mioso <[email protected]>:
Quoted 24 lines
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 Sean Young <[email protected]>CC Piotr Oleszczyk <[email protected]>CC Andrey Konovalov <[email protected]>CC Andrew Morton <[email protected]>CC Alexey Dobriyan <[email protected]>CC Mauro Carvalho Chehab <[email protected]>Signed-off-by Enrico Mioso <[email protected]>--- drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/media/usb/dvb-usb/dib0700_devices.c +0
-0
drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_xc3028_callback(void *ptr, int component, · line 436
Quoted 5 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +0
-2@@ -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?
drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_xc3028_callback(void *ptr, int component, · line 436
Quoted 2 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +1
-0+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.
Quoted 5 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +0
-1}return 0 ; --2.16.1
/Honza
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.....
Quoted 64 lines · Honza Petrouš
Date: Wed, 24 Jan 2018 14:07:52
From: Honza Petrouš <[email protected]>
To: Enrico Mioso <[email protected]>
Cc: [email protected], Sean Young <[email protected]>,
Piotr Oleszczyk <[email protected]>, Andrey Konovalov <[email protected]>, Andrew Morton <[email protected]>, Alexey Dobriyan <[email protected]>,
Mauro Carvalho Chehab <[email protected]>
Subject: Re: [PATCH] dib700: stop flooding system ring bufferHi Enrico,
I'm not maintener, so treat next hints as hints only :)
2018-01-24 8:40 GMT+01:00 Enrico Mioso <[email protected]>:
Quoted 24 lines
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 Sean Young <[email protected]>CC Piotr Oleszczyk <[email protected]>CC Andrey Konovalov <[email protected]>CC Andrew Morton <[email protected]>CC Alexey Dobriyan <[email protected]>CC Mauro Carvalho Chehab <[email protected]>Signed-off-by Enrico Mioso <[email protected]>--- drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/media/usb/dvb-usb/dib0700_devices.c +0
-0drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_xc3028_callback(void *ptr, int component, · line 436
Quoted 5 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +0
-2@@ -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()todebug()or something similar would be better?drivers/media/usb/dvb-usb/dib0700_devices.c static int stk7700ph_xc3028_callback(void *ptr, int component, · line 436
Quoted 2 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +1
-0+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
-EINVALfor unknown command here.Quoted 5 lines
drivers/media/usb/dvb-usb/dib0700_devices.c +0
-1}return 0 ; --2.16.1
/Honza