All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07  0:03 ` Andrey Smirnov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Smirnov @ 2019-02-07  0:03 UTC (permalink / raw)
  To: linux-usb; +Cc: Andrey Smirnov, Mathias Nyman, Greg Kroah-Hartman, linux-kernel

Simplify filed's initialization by directly assigning its final value
instead of initializing the variable to sero and then bitwise or-ing
it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/host/xhci-ring.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 40fa25c4d041..91e592bfb80d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3379,8 +3379,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
 	/* Queue setup TRB - see section 6.4.1.2.1 */
 	/* FIXME better way to translate setup_packet into two u32 fields? */
 	setup = (struct usb_ctrlrequest *) urb->setup_packet;
-	field = 0;
-	field |= TRB_IDT | TRB_TYPE(TRB_SETUP);
+	field = TRB_IDT | TRB_TYPE(TRB_SETUP);
 	if (start_cycle == 0)
 		field |= 0x1;
 
-- 
2.20.1


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

* xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07  0:03 ` Andrey Smirnov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Smirnov @ 2019-02-07  0:03 UTC (permalink / raw)
  To: linux-usb; +Cc: Andrey Smirnov, Mathias Nyman, Greg Kroah-Hartman, linux-kernel

Simplify filed's initialization by directly assigning its final value
instead of initializing the variable to sero and then bitwise or-ing
it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/host/xhci-ring.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 40fa25c4d041..91e592bfb80d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3379,8 +3379,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
 	/* Queue setup TRB - see section 6.4.1.2.1 */
 	/* FIXME better way to translate setup_packet into two u32 fields? */
 	setup = (struct usb_ctrlrequest *) urb->setup_packet;
-	field = 0;
-	field |= TRB_IDT | TRB_TYPE(TRB_SETUP);
+	field = TRB_IDT | TRB_TYPE(TRB_SETUP);
 	if (start_cycle == 0)
 		field |= 0x1;
 

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

* Re: [PATCH] xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07 16:43   ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2019-02-07 16:43 UTC (permalink / raw)
  To: Andrey Smirnov, linux-usb; +Cc: Mathias Nyman, Greg Kroah-Hartman, linux-kernel

Hello!

On 07.02.2019 3:03, Andrey Smirnov wrote:

> Simplify filed's initialization by directly assigning its final value

    field's.

> instead of initializing the variable to sero and then bitwise or-ing
> it.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Mathias Nyman <mathias.nyman@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
[...]

MBR, Sergei

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

* xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07 16:43   ` Sergei Shtylyov
  0 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2019-02-07 16:43 UTC (permalink / raw)
  To: Andrey Smirnov, linux-usb; +Cc: Mathias Nyman, Greg Kroah-Hartman, linux-kernel

Hello!

On 07.02.2019 3:03, Andrey Smirnov wrote:

> Simplify filed's initialization by directly assigning its final value

    field's.

> instead of initializing the variable to sero and then bitwise or-ing
> it.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> Cc: Mathias Nyman <mathias.nyman@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
[...]

MBR, Sergei

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

* Re: [PATCH] xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07 21:07     ` Andrey Smirnov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Smirnov @ 2019-02-07 21:07 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-usb, Mathias Nyman, Greg Kroah-Hartman, linux-kernel

On Thu, Feb 7, 2019 at 8:44 AM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>
> Hello!
>
> On 07.02.2019 3:03, Andrey Smirnov wrote:
>
> > Simplify filed's initialization by directly assigning its final value
>
>     field's.
>

Oops, missed that. Will fix in v2.

Thanks,
Andrey Smirnov

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

* xhci: Drop superfluous initialization in xhci_queue_ctrl_tx()
@ 2019-02-07 21:07     ` Andrey Smirnov
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Smirnov @ 2019-02-07 21:07 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linux-usb, Mathias Nyman, Greg Kroah-Hartman, linux-kernel

On Thu, Feb 7, 2019 at 8:44 AM Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>
> Hello!
>
> On 07.02.2019 3:03, Andrey Smirnov wrote:
>
> > Simplify filed's initialization by directly assigning its final value
>
>     field's.
>

Oops, missed that. Will fix in v2.

Thanks,
Andrey Smirnov

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

end of thread, other threads:[~2019-02-07 21:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-07  0:03 [PATCH] xhci: Drop superfluous initialization in xhci_queue_ctrl_tx() Andrey Smirnov
2019-02-07  0:03 ` Andrey Smirnov
2019-02-07 16:43 ` [PATCH] " Sergei Shtylyov
2019-02-07 16:43   ` Sergei Shtylyov
2019-02-07 21:07   ` [PATCH] " Andrey Smirnov
2019-02-07 21:07     ` Andrey Smirnov

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.