Received: by 10.223.164.221 with SMTP id h29csp2197744wrb; Thu, 2 Nov 2017 07:19:30 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SQsIB7b0cDyfeWqWCRtfUSBLuMGHAH4NbxAhoDzECgtpDz5/BXwZGrMQj/uF0DOQ9cGIXU X-Received: by 10.98.237.5 with SMTP id u5mr3925898pfh.209.1509632370198; Thu, 02 Nov 2017 07:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509632370; cv=none; d=google.com; s=arc-20160816; b=cevnb73CCobqtIEio4vayR3Ka4wMMrpMSUNM26g4+1hrMq+iylnl1YAZU5AKz5cBIJ g9zVKNLJD5367Sgb08kNcQxWsKuukSSnwp1SBUytCIN+aBpeqwFCSNo7nuUyQPKqYTRA /Xdms2aOF67i58Z+qSwXF6tB23M2YNFkt1j/XZsQwEhHfVxhVgGGdigYMcD3osOS3IdI Bp7W4OO4gFkru16EFnSot+aRCP0Z1mnmtlRGJ+B/iP/yyW+N9sCgKkOEEu4gHEGWHRSh dfb7FvfdpW1gYI0efs+Vclzgv03ncnQHYFdKlhgoDuPuhZ17rdh+A0smQuWJj6C2462p PnXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=UJg0WSXS+4qdyPhSxZW0uxi85msNKtvZO+M8kdJlmIQ=; b=r9fht3C1tndJYqtfltqZQcBkNlJfLoyxH5UmoscGK23cmn1SRnoHPcH1EVzY1yjYCU O1ZC7QWPIkak8WLPaQzgiA4j4Cui+eHhUKoybQXO+qZp25nQOd5TdcMxJrpjNjpcFTYx eHtncDQ1wo9Fv4BPCvOn1q9F9iHcGgiJsh0BCUK5ou1zaWLNepUwC9u3sLLzOpysawNi WMnP6AAMUaXCUu67YXl+7pS08Jd+XyRfJhCDd8IYXoyAeOe8CQQA6my7sIn7NheIwanN 8w6RlIU/gdBJI5vxaG7r3o9eDVcpcMiY5C0aQ2ySghZo8GGdTAmfq7aQCvs5EwIrz3KI iZug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 137si3587844pgd.277.2017.11.02.07.19.15; Thu, 02 Nov 2017 07:19:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933488AbdKBORQ (ORCPT + 97 others); Thu, 2 Nov 2017 10:17:16 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:54852 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S933121AbdKBORP (ORCPT ); Thu, 2 Nov 2017 10:17:15 -0400 Received: (qmail 2010 invoked by uid 2102); 2 Nov 2017 10:17:14 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 2 Nov 2017 10:17:14 -0400 Date: Thu, 2 Nov 2017 10:17:14 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Roger Quadros cc: balbi@kernel.org, , Subject: Re: [PATCH] USB: dummy-hcd: Adapt dummy_udc_set_speed() In-Reply-To: <1509613757-4861-1-git-send-email-rogerq@ti.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Nov 2017, Roger Quadros wrote: > The UDC core ensures that .udc_set_speed() is called with > a speed that is a minimum of the max speeds supported > by the gadget function driver and the UDC driver. > > We can now use the speed argument as is. > > Get rid of the debug print as that condition will never happen. > > Signed-off-by: Roger Quadros > --- > drivers/usb/gadget/udc/dummy_hcd.c | 14 +------------- > 1 file changed, 1 insertion(+), 13 deletions(-) > > diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c > index b17618a..c42ca8e 100644 > --- a/drivers/usb/gadget/udc/dummy_hcd.c > +++ b/drivers/usb/gadget/udc/dummy_hcd.c > @@ -910,20 +910,8 @@ static void dummy_udc_set_speed(struct usb_gadget *_gadget, > struct dummy *dum; > > dum = gadget_dev_to_dummy(&_gadget->dev); > - > - if (mod_data.is_super_speed) > - dum->gadget.speed = min_t(u8, USB_SPEED_SUPER, speed); > - else if (mod_data.is_high_speed) > - dum->gadget.speed = min_t(u8, USB_SPEED_HIGH, speed); > - else > - dum->gadget.speed = USB_SPEED_FULL; > - > + dum->gadget.speed = speed; > dummy_udc_update_ep0(dum); > - > - if (dum->gadget.speed < speed) > - dev_dbg(udc_dev(dum), "This device can perform faster" > - " if you connect it to a %s port...\n", > - usb_speed_string(speed)); > } > > static int dummy_udc_start(struct usb_gadget *g, > Acked-by: Alan Stern From 1582944826891332149@xxx Thu Nov 02 09:10:25 +0000 2017 X-GM-THRID: 1582944826891332149 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread