* [likely PATCH] media: lmedm04: Fix misuse of comma
@ 2020-08-23 18:13 Joe Perches
2020-08-24 20:01 ` Malcolm Priestley
0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2020-08-23 18:13 UTC (permalink / raw)
To: Malcolm Priestley; +Cc: LKML, Mauro Carvalho Chehab, linux-media, Julia Lawall
There's a comma used instead of a semicolon that causes multiple
statements to be executed after an if instead of just the intended
single statement.
Replace the comma with a semicolon.
Signed-off-by: Joe Perches <joe@perches.com>
---
Untested, but really likely to be a defect given the indentation.
Found using Julia Lawall's (and my) coccinelle script.
https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2008201856110.2524@hadrien/
drivers/media/usb/dvb-usb-v2/lmedm04.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 8a3c0eeed959..cce431f34f61 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -391,7 +391,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
- lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
+ lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
info("INT Interrupt Service Started");
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [likely PATCH] media: lmedm04: Fix misuse of comma
2020-08-23 18:13 [likely PATCH] media: lmedm04: Fix misuse of comma Joe Perches
@ 2020-08-24 20:01 ` Malcolm Priestley
2020-08-24 20:02 ` Joe Perches
2020-09-29 17:09 ` Mauro Carvalho Chehab
0 siblings, 2 replies; 6+ messages in thread
From: Malcolm Priestley @ 2020-08-24 20:01 UTC (permalink / raw)
To: Joe Perches; +Cc: LKML, Mauro Carvalho Chehab, linux-media, Julia Lawall
Good catch the interrupt URB is not running because usb_submit_urb is tangled with it.
It only really affects signal strength.
add
Fixes: 15e1ce33182d ("[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb")
Cc: <stable@vger.kernel.org>
Regards
Malcolm
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [likely PATCH] media: lmedm04: Fix misuse of comma
2020-08-24 20:01 ` Malcolm Priestley
@ 2020-08-24 20:02 ` Joe Perches
2020-08-24 20:09 ` Malcolm Priestley
2020-09-29 17:09 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2020-08-24 20:02 UTC (permalink / raw)
To: Malcolm Priestley; +Cc: LKML, Mauro Carvalho Chehab, linux-media, Julia Lawall
On Mon, 2020-08-24 at 21:01 +0100, Malcolm Priestley wrote:
> Good catch the interrupt URB is not running because usb_submit_urb is tangled with it.
>
> It only really affects signal strength.
>
> add
>
> Fixes: 15e1ce33182d ("[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb")
> Cc: <stable@vger.kernel.org>
If that's a request for me, I won't as I can't test.
As the maintainer, you should do that.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [likely PATCH] media: lmedm04: Fix misuse of comma
2020-08-24 20:02 ` Joe Perches
@ 2020-08-24 20:09 ` Malcolm Priestley
0 siblings, 0 replies; 6+ messages in thread
From: Malcolm Priestley @ 2020-08-24 20:09 UTC (permalink / raw)
To: Joe Perches; +Cc: LKML, Mauro Carvalho Chehab, linux-media, Julia Lawall
> If that's a request for me, I won't as I can't test.
>
> As the maintainer, you should do that.
No it is for media maintainer.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [likely PATCH] media: lmedm04: Fix misuse of comma
2020-08-24 20:01 ` Malcolm Priestley
2020-08-24 20:02 ` Joe Perches
@ 2020-09-29 17:09 ` Mauro Carvalho Chehab
2020-10-03 9:32 ` [PATCH] media: lmedm04: Use GFP_KERNEL for URB allocation/submission Malcolm Priestley
1 sibling, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2020-09-29 17:09 UTC (permalink / raw)
To: Malcolm Priestley; +Cc: Joe Perches, LKML, linux-media, Julia Lawall
Em Mon, 24 Aug 2020 21:01:12 +0100
Malcolm Priestley <tvboxspy@gmail.com> escreveu:
> Good catch the interrupt URB is not running because usb_submit_urb is tangled with it.
>
> It only really affects signal strength.
Yeah, that indeed sounds to be a real bug.
>
> add
>
> Fixes: 15e1ce33182d ("[media] lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb")
> Cc: <stable@vger.kernel.org>
>
> Regards
>
>
> Malcolm
That's said, while here, it sounds weird to use GFP_ATOMIC instead
of GFP_KERNEL for the URB submissions.
Malcolm,
if you still have the hardware for testing, could you please
check if replacing them by GFP_KERNEL will work?
Thanks!
Mauro
Thanks,
Mauro
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] media: lmedm04: Use GFP_KERNEL for URB allocation/submission.
2020-09-29 17:09 ` Mauro Carvalho Chehab
@ 2020-10-03 9:32 ` Malcolm Priestley
0 siblings, 0 replies; 6+ messages in thread
From: Malcolm Priestley @ 2020-10-03 9:32 UTC (permalink / raw)
To: linux-media; +Cc: Mauro Carvalho Chehab, Joe Perches, LKML, Julia Lawall
lme2510_int_read is not atomically called so use GFP_KERNEL for
usb_alloc_urb and usb_submit_urb which is the first in the chain
of interrupt submissions.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
This patch is applied on top of
[likely] media: lmedm04: Fix misuse of comma
I have tested both patches with hardware and all is well.
drivers/media/usb/dvb-usb-v2/lmedm04.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 9ddda8d68ee0..0f5a1eed5ea9 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -373,7 +373,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
struct lme2510_state *lme_int = adap_to_priv(adap);
struct usb_host_endpoint *ep;
- lme_int->lme_urb = usb_alloc_urb(0, GFP_ATOMIC);
+ lme_int->lme_urb = usb_alloc_urb(0, GFP_KERNEL);
if (lme_int->lme_urb == NULL)
return -ENOMEM;
@@ -393,7 +393,7 @@ static int lme2510_int_read(struct dvb_usb_adapter *adap)
if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa);
- usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
+ usb_submit_urb(lme_int->lme_urb, GFP_KERNEL);
info("INT Interrupt Service Started");
return 0;
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-03 9:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-23 18:13 [likely PATCH] media: lmedm04: Fix misuse of comma Joe Perches
2020-08-24 20:01 ` Malcolm Priestley
2020-08-24 20:02 ` Joe Perches
2020-08-24 20:09 ` Malcolm Priestley
2020-09-29 17:09 ` Mauro Carvalho Chehab
2020-10-03 9:32 ` [PATCH] media: lmedm04: Use GFP_KERNEL for URB allocation/submission Malcolm Priestley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.