Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3285569pxk; Mon, 7 Sep 2020 08:29:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtqnn21fgvL114Ffi1S4jyWQWANGr0N72Wd0ZVHprT4Qn3ZgxItFl9UFiJRAdG94r6+gda X-Received: by 2002:a17:906:1dd0:: with SMTP id v16mr4049077ejh.309.1599492597803; Mon, 07 Sep 2020 08:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599492597; cv=none; d=google.com; s=arc-20160816; b=Uax8j8WbunbQShu9ADrGRIsGOjO4C2Gk0k7Svx9nPwIDxWXrRZ6cH4Os3HZfNCnoQJ EognZ7QBjcbBxTxpumvIYktfIRbRViP9CpLBZjiq933gKJhEprICLnlhIOHM6JnC+hfr 5P+o31cJDgXh8kgBUf98qDJh0wM+VdtwPq+c4w8hkDdkLsXw4apkO7OJqxaW24Pd9Yog kupnhe4M9T0YXYDpnHFngolLXmSiBrRtZNkfoLy9BwJEC8spoWbTINhZEFzMtnmIMuaJ oXaKzP+cs2Tjo9zPRGXKNT/j3qGWL7hSK2d5FTsZI0ewgO+SrJAOvYJ7Mc9xFvD91soA /Rcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Yx3qmZCE6B86ZWvU1tsZPgcT7y4GE8Bpcot9KsHpJYI=; b=JH+r9XbChVIPElrDHhYjh+q1jCtpH1/6Sc25NFD/sWews1BCMdGNkBTWvD9AVCvamG 11MZGuffiwDqMKVIt2NRrMRBJ1jD2jWBAd37P615pv83S+f/s54slAaURRKSoAFuBb5m +hFtczfygz8vmM+EOY5GoCgNV5jLbFQh/60piLOi4ZSBIoBEgWmV/cc8qDKqWLhqKc9M c9F7mke/MtgIJ2u0Y7hR+bPOzEF7yrsCxHxSRJqDhwn1V/ht20YH6RdyrcCtIoz6VFlE C3a5dOfetqXJcHy71pzHyUhUPNGts6Di3MYKHW+vXwgOIX5aZF3hbBFOLHKCLx0GUBPq g9kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si9816259edx.325.2020.09.07.08.29.20; Mon, 07 Sep 2020 08:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730144AbgIGP2g (ORCPT + 99 others); Mon, 7 Sep 2020 11:28:36 -0400 Received: from netrider.rowland.org ([192.131.102.5]:39509 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1730115AbgIGPPp (ORCPT ); Mon, 7 Sep 2020 11:15:45 -0400 Received: (qmail 763212 invoked by uid 1000); 7 Sep 2020 11:08:58 -0400 Date: Mon, 7 Sep 2020 11:08:58 -0400 From: Alan Stern To: Greg Kroah-Hartman Cc: himadrispandya@gmail.com, dvyukov@google.com, linux-usb@vger.kernel.org, perex@perex.cz, tiwai@suse.com, stern@rowland.harvard.ed, linux-kernel@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH v2 04/11] USB: core: hub.c: use usb_control_msg_send() in a few places Message-ID: <20200907150858.GD762136@rowland.harvard.edu> References: <20200907145108.3766613-1-gregkh@linuxfoundation.org> <20200907145108.3766613-5-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200907145108.3766613-5-gregkh@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Mon, Sep 07, 2020 at 04:51:01PM +0200, Greg Kroah-Hartman wrote: > There are a few calls to usb_control_msg() that can be converted to use > usb_control_msg_send() instead, so do that in order to make the error > checking a bit simpler and the code smaller. > > Cc: Alan Stern > Signed-off-by: Greg Kroah-Hartman > --- > v2: > - dropped changes to usb_req_set_sel() thanks to review from Alan > @@ -4056,7 +4035,7 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev, > * associated with the link state we're about to enable. > */ > ret = usb_req_set_sel(udev, state); > - if (ret < 0) { > + if (ret) { > dev_warn(&udev->dev, "Set SEL for device-initiated %s failed.\n", > usb3_lpm_names[state]); > return; Did this change survive by mistake? Actually, it looks like usb_req_set_sel needs to check the value returned by usb_control_msg -- a perfect example of the sort of thing you were trying to fix in the first place! Alan Stern