From: "Geyslan G. Bem" <geyslan@gmail.com>
To: peter.senna@gmail.com
Cc: "Geyslan G. Bem" <geyslan@gmail.com>, Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Robert Baldyga <r.baldyga@samsung.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] usb: gadget: remove redundant condition
Date: Thu, 10 Dec 2015 17:50:10 -0300 [thread overview]
Message-ID: <1449780614-5933-2-git-send-email-geyslan@gmail.com> (raw)
In-Reply-To: <1449780614-5933-1-git-send-email-geyslan@gmail.com>
This patch removes redundant condition.
(!A || (A && B)) is the same as (!A || B).
Tested by compilation only.
Caught by cppcheck.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
drivers/usb/gadget/udc/s3c-hsudc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c
index e9def42..82a9e2a 100644
--- a/drivers/usb/gadget/udc/s3c-hsudc.c
+++ b/drivers/usb/gadget/udc/s3c-hsudc.c
@@ -569,7 +569,7 @@ static int s3c_hsudc_handle_reqfeat(struct s3c_hsudc *hsudc,
hsep = &hsudc->ep[ep_num];
switch (le16_to_cpu(ctrl->wValue)) {
case USB_ENDPOINT_HALT:
- if (set || (!set && !hsep->wedge))
+ if (set || !hsep->wedge)
s3c_hsudc_set_halt(&hsep->ep, set);
return 0;
}
--
2.6.3
next prev parent reply other threads:[~2015-12-10 20:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 20:50 [PATCH 1/4] usb: serial: remove redundant conditions Geyslan G. Bem
2015-12-10 20:50 ` Geyslan G. Bem [this message]
2015-12-10 20:50 ` [PATCH 3/4] usb: host: remove redundant condition Geyslan G. Bem
2015-12-10 20:50 ` [PATCH 4/4] usb: musb: " Geyslan G. Bem
2015-12-11 9:16 ` [PATCH 1/4] usb: serial: remove redundant conditions Johan Hovold
2015-12-11 9:35 ` Geyslan G. Bem
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=1449780614-5933-2-git-send-email-geyslan@gmail.com \
--to=geyslan@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=r.baldyga@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox