From: Pavel Machek <pavel@denx.de>
To: hminas@synopsys.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org,
kernel list <linux-kernel@vger.kernel.org>,
trivial@kernel.org
Subject: [PATCH] sr: dwc2/gadget: remove unneccessary if
Date: Sat, 6 Jun 2020 17:37:03 +0200 [thread overview]
Message-ID: <20200606153703.GA18931@amd> (raw)
[-- Attachment #1: Type: text/plain, Size: 791 bytes --]
We don't really need if/else to set variable to 1/0.
Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 12b98b466287..f9f6fd470c81 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -1761,10 +1761,7 @@ static int dwc2_hsotg_process_req_feature(struct dwc2_hsotg *hsotg,
case USB_RECIP_DEVICE:
switch (wValue) {
case USB_DEVICE_REMOTE_WAKEUP:
- if (set)
- hsotg->remote_wakeup_allowed = 1;
- else
- hsotg->remote_wakeup_allowed = 0;
+ hsotg->remote_wakeup_allowed = set;
break;
case USB_DEVICE_TEST_MODE:
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next reply other threads:[~2020-06-06 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-06 15:37 Pavel Machek [this message]
2020-06-06 15:45 ` [PATCH] sr: dwc2/gadget: remove unneccessary if Minas Harutyunyan
2020-06-06 19:05 ` Pavel Machek
2020-06-09 8:35 ` Minas Harutyunyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200606153703.GA18931@amd \
--to=pavel@denx.de \
--cc=gregkh@linuxfoundation.org \
--cc=hminas@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=trivial@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.