From patchwork Sat Jun 6 15:37:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 11591309 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BD3960D for ; Sat, 6 Jun 2020 15:37:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 723BB2077D for ; Sat, 6 Jun 2020 15:37:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbgFFPhH (ORCPT ); Sat, 6 Jun 2020 11:37:07 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:58326 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgFFPhG (ORCPT ); Sat, 6 Jun 2020 11:37:06 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 11A111C0BD2; Sat, 6 Jun 2020 17:37:05 +0200 (CEST) Date: Sat, 6 Jun 2020 17:37:03 +0200 From: Pavel Machek To: hminas@synopsys.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, kernel list , trivial@kernel.org Subject: [PATCH] sr: dwc2/gadget: remove unneccessary if Message-ID: <20200606153703.GA18931@amd> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org We don't really need if/else to set variable to 1/0. Signed-off-by: Pavel Machek (CIP) 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: