linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] flexcop: unneeded ATOMIC
@ 2022-05-17 13:11 Oliver Neukum
  2022-05-17 13:11 ` [PATCH 2/2] flexcop: allow for modern speeds Oliver Neukum
  2022-05-17 13:21 ` [PATCH 1/2] flexcop: unneeded ATOMIC Johan Hovold
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Neukum @ 2022-05-17 13:11 UTC (permalink / raw)
  To: linux-media, gushengxian, johan, hverkuil-cisco, mchehab; +Cc: Oliver Neukum

No need for GFP_ATOMIC during probe()

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/media/usb/b2c2/flexcop-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 7835bb0f32fc..98d9912a4efb 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -446,7 +446,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
 	/* creating iso urbs */
 	for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) {
 		fc_usb->iso_urb[i] = usb_alloc_urb(B2C2_USB_FRAMES_PER_ISO,
-			GFP_ATOMIC);
+			GFP_KERNEL);
 		if (fc_usb->iso_urb[i] == NULL) {
 			ret = -ENOMEM;
 			goto urb_error;
@@ -479,7 +479,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
 			frame_offset += frame_size;
 		}
 
-		if ((ret = usb_submit_urb(fc_usb->iso_urb[i],GFP_ATOMIC))) {
+		if ((ret = usb_submit_urb(fc_usb->iso_urb[i],GFP_KERNEL))) {
 			err("submitting urb %d failed with %d.", i, ret);
 			goto urb_error;
 		}
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] flexcop: allow for modern speeds
  2022-05-17 13:11 [PATCH 1/2] flexcop: unneeded ATOMIC Oliver Neukum
@ 2022-05-17 13:11 ` Oliver Neukum
  2022-05-17 13:23   ` Johan Hovold
  2022-05-17 13:21 ` [PATCH 1/2] flexcop: unneeded ATOMIC Johan Hovold
  1 sibling, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2022-05-17 13:11 UTC (permalink / raw)
  To: linux-media, gushengxian, johan, hverkuil-cisco, mchehab; +Cc: Oliver Neukum

High speed is no longer the ultimate in speed.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
---
 drivers/media/usb/b2c2/flexcop-usb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 98d9912a4efb..52e9964c2e59 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -525,6 +525,12 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
 	case USB_SPEED_HIGH:
 		info("running at HIGH speed.");
 		break;
+	case USB_SPEED_SUPER:
+		info("running at SUPER speed.");
+		break;
+	case USB_SPEED_SUPER_PLUS:
+		info("running at SUPER+ speed.");
+		break;
 	case USB_SPEED_UNKNOWN:
 	default:
 		err("cannot handle USB speed because it is unknown.");
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] flexcop: unneeded ATOMIC
  2022-05-17 13:11 [PATCH 1/2] flexcop: unneeded ATOMIC Oliver Neukum
  2022-05-17 13:11 ` [PATCH 2/2] flexcop: allow for modern speeds Oliver Neukum
@ 2022-05-17 13:21 ` Johan Hovold
  1 sibling, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2022-05-17 13:21 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-media, gushengxian, hverkuil-cisco, mchehab

On Tue, May 17, 2022 at 03:11:08PM +0200, Oliver Neukum wrote:
> No need for GFP_ATOMIC during probe()

Please add a "media: " prefix and use a verb (e.g. "replace") in
Subject.

> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
>  drivers/media/usb/b2c2/flexcop-usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
> index 7835bb0f32fc..98d9912a4efb 100644
> --- a/drivers/media/usb/b2c2/flexcop-usb.c
> +++ b/drivers/media/usb/b2c2/flexcop-usb.c
> @@ -446,7 +446,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
>  	/* creating iso urbs */
>  	for (i = 0; i < B2C2_USB_NUM_ISO_URB; i++) {
>  		fc_usb->iso_urb[i] = usb_alloc_urb(B2C2_USB_FRAMES_PER_ISO,
> -			GFP_ATOMIC);
> +			GFP_KERNEL);
>  		if (fc_usb->iso_urb[i] == NULL) {
>  			ret = -ENOMEM;
>  			goto urb_error;
> @@ -479,7 +479,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
>  			frame_offset += frame_size;
>  		}
>  
> -		if ((ret = usb_submit_urb(fc_usb->iso_urb[i],GFP_ATOMIC))) {
> +		if ((ret = usb_submit_urb(fc_usb->iso_urb[i],GFP_KERNEL))) {

And add the missing space after the comma here.

>  			err("submitting urb %d failed with %d.", i, ret);
>  			goto urb_error;
>  		}

Change itself looks good otherwise.

Reviewed-by: Johan Hovold <johan@kernel.org>

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] flexcop: allow for modern speeds
  2022-05-17 13:11 ` [PATCH 2/2] flexcop: allow for modern speeds Oliver Neukum
@ 2022-05-17 13:23   ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2022-05-17 13:23 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-media, gushengxian, hverkuil-cisco, mchehab

On Tue, May 17, 2022 at 03:11:09PM +0200, Oliver Neukum wrote:
> High speed is no longer the ultimate in speed.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
>  drivers/media/usb/b2c2/flexcop-usb.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
> index 98d9912a4efb..52e9964c2e59 100644
> --- a/drivers/media/usb/b2c2/flexcop-usb.c
> +++ b/drivers/media/usb/b2c2/flexcop-usb.c
> @@ -525,6 +525,12 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)
>  	case USB_SPEED_HIGH:
>  		info("running at HIGH speed.");
>  		break;
> +	case USB_SPEED_SUPER:
> +		info("running at SUPER speed.");
> +		break;
> +	case USB_SPEED_SUPER_PLUS:
> +		info("running at SUPER+ speed.");
> +		break;

Not sure this change is warranted, though. These devices aren't going to
start supporting SuperSpeed.

>  	case USB_SPEED_UNKNOWN:
>  	default:
>  		err("cannot handle USB speed because it is unknown.");

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-17 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 13:11 [PATCH 1/2] flexcop: unneeded ATOMIC Oliver Neukum
2022-05-17 13:11 ` [PATCH 2/2] flexcop: allow for modern speeds Oliver Neukum
2022-05-17 13:23   ` Johan Hovold
2022-05-17 13:21 ` [PATCH 1/2] flexcop: unneeded ATOMIC Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).