* [PATCH] usb: dwc2: gadget: Use true and false for boolean values
@ 2018-01-23 15:45 Gustavo A. R. Silva
2018-02-05 21:12 ` John Youn
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-01-23 15:45 UTC (permalink / raw)
To: John Youn, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/usb/dwc2/gadget.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index e4c3ce0..1f684dd 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -116,10 +116,10 @@ static inline void dwc2_gadget_incr_frame_num(struct dwc2_hsotg_ep *hs_ep)
{
hs_ep->target_frame += hs_ep->interval;
if (hs_ep->target_frame > DSTS_SOFFN_LIMIT) {
- hs_ep->frame_overrun = 1;
+ hs_ep->frame_overrun = true;
hs_ep->target_frame &= DSTS_SOFFN_LIMIT;
} else {
- hs_ep->frame_overrun = 0;
+ hs_ep->frame_overrun = false;
}
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: dwc2: gadget: Use true and false for boolean values
2018-01-23 15:45 [PATCH] usb: dwc2: gadget: Use true and false for boolean values Gustavo A. R. Silva
@ 2018-02-05 21:12 ` John Youn
0 siblings, 0 replies; 2+ messages in thread
From: John Youn @ 2018-02-05 21:12 UTC (permalink / raw)
To: Gustavo A. R. Silva, John Youn, Greg Kroah-Hartman, balbi
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Gustavo A. R. Silva
On 01/23/2018 07:45 AM, Gustavo A. R. Silva wrote:
> Assign true or false to boolean variables instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
> drivers/usb/dwc2/gadget.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index e4c3ce0..1f684dd 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -116,10 +116,10 @@ static inline void dwc2_gadget_incr_frame_num(struct dwc2_hsotg_ep *hs_ep)
> {
> hs_ep->target_frame += hs_ep->interval;
> if (hs_ep->target_frame > DSTS_SOFFN_LIMIT) {
> - hs_ep->frame_overrun = 1;
> + hs_ep->frame_overrun = true;
> hs_ep->target_frame &= DSTS_SOFFN_LIMIT;
> } else {
> - hs_ep->frame_overrun = 0;
> + hs_ep->frame_overrun = false;
> }
> }
>
>
+Felipe
Acked-by: John Youn <johnyoun@synopsys.com>
Regards,
John
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-05 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 15:45 [PATCH] usb: dwc2: gadget: Use true and false for boolean values Gustavo A. R. Silva
2018-02-05 21:12 ` John Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox