From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63031C433E2 for ; Mon, 7 Sep 2020 15:10:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D348E21897 for ; Mon, 7 Sep 2020 15:10:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="b8wPba8Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D348E21897 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2313A17B6; Mon, 7 Sep 2020 17:09:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2313A17B6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599491403; bh=CI/psgRtgDiLfQi7x/4AW7cQKGNocZjst2htanYguuw=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=b8wPba8Za8PNLci+Mhr92EXjP05ot4dYpfJfm3V/NDV82jg2HWN1eqzItWNMbJnL1 XSc/mu4dB+HUIPZE03ZQY64UTI/vR7xKcN+D0g49wqJ5JLi0c70KE+4e6bhKTUu+as cCA7X3V8KsB0zWtgKzQJ69gWLxXowlmHeXiG0TB4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A6CDCF800D3; Mon, 7 Sep 2020 17:09:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B908DF80227; Mon, 7 Sep 2020 17:09:10 +0200 (CEST) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by alsa1.perex.cz (Postfix) with SMTP id 5387DF800D3 for ; Mon, 7 Sep 2020 17:09:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5387DF800D3 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 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) Cc: alsa-devel@alsa-project.org, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org, marcel@holtmann.org, linux-usb@vger.kernel.org, tiwai@suse.com, stern@rowland.harvard.ed, linux-bluetooth@vger.kernel.org, dvyukov@google.com, himadrispandya@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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