Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2720398pxb; Tue, 24 Aug 2021 06:09:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAwQvxnxMVj8blZG6nJ4hEZ0xV56dVdAP7zriat3Es7mbeS6E+zeqSEcJgQ8DMmDtquVDt X-Received: by 2002:a05:6638:185:: with SMTP id a5mr1618257jaq.31.1629810550437; Tue, 24 Aug 2021 06:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629810550; cv=none; d=google.com; s=arc-20160816; b=BD0PH6QsZgC7Fy9C5BT/bRNyHkzqy4rlXXvSVZtjXokFA6As1Ouj5mxaVzgwOpjndd 6dYSHRjfGAq5M1oMCSmirkjmIcMYUwhf0jiB2thRK8uYEJ6+KXv6iEXRuBn6SFAoA4Gx nVSXa/gAhvptXHcPh6wGdInh6ryCAF/oTZedmEgOi/q8NIBsXpxuWWbwRuHslWEHhyUI HngOKNRq/qWpXVbS888Ps4+Atfpen3g+c7hWO+dc6A4gAkBp+leEE1CSqBGYUS1RLUY8 IhaL/W94n1TngAaBfeeevrBY9HelafdWAwxthW1BrGzhyRdNShHLiS5DuauDBiVP7OuX tJUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=edPkHtxC9IivNVAHwxGeOuIRJPZOEg6ssr7HQ2DKWLs=; b=tjtsMFvhxEgWu2J9iRVJa2qwx+81sV/p19E21RXzdE49dtbmrucahtCOf9xn/ojZjO kg7jgpHsAD+7jZ+zxQwp7rXnBH0ASeUH5Vp3K/VVKbL99DqPlQw0WYADak7CSncpWrsw BqHoMv3wkDAGKf4DRzIrYS5etakLzd9hhWOL40laX98ohZhO+lUCmCEyi8eZ7SjNEBgx MwLQtEE+ou0YA6B4TAoLHhIexMSBrIW7I/FIYMwdJKuOH7BaZY+nv54L75HqA3Z/ybD8 KhgtMwPVpCwgkce2QHxMN2prwT/q2w+u+E4xFOiR+86NpOo7aihh34dEjLpJbfQFf2Jr NnsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0Art4iSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si10564929jaf.92.2021.08.24.06.08.52; Tue, 24 Aug 2021 06:09:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0Art4iSO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237478AbhHXNHe (ORCPT + 99 others); Tue, 24 Aug 2021 09:07:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:49552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237363AbhHXNHd (ORCPT ); Tue, 24 Aug 2021 09:07:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD31461184; Tue, 24 Aug 2021 13:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1629810409; bh=CzvHAdiJz86mH/fepGltH+7sz1a2CYle6fa+UCARsBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0Art4iSOJnHLnZX31fLbttgTBGVCT1WUWVYbn5A1Kgg8M6rzc5WUPXo7tN8T6eNFu 5BJ+n6n6U61uJBouu5u37+gSCtpwQQglZinDN/zfkZHKyN0tXjy40A5uIWngXjX8Gi 8s/tTvwvg8fdk5s5QswSaKoqIfppb+5yt3slcAIo= Date: Tue, 24 Aug 2021 15:06:44 +0200 From: Greg Kroah-Hartman To: Kishon Vijay Abraham I Cc: Mathias Nyman , Alan Stern , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, chris.chiu@canonical.com Subject: Re: [RFC PATCH 1/5] usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd() Message-ID: References: <20210824105302.25382-1-kishon@ti.com> <20210824105302.25382-2-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210824105302.25382-2-kishon@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 04:22:58PM +0530, Kishon Vijay Abraham I wrote: > No functional change. Since configuration to stop HCD is invoked from > multiple places, group all of them in usb_stop_hcd(). > > Signed-off-by: Kishon Vijay Abraham I > --- > drivers/usb/core/hcd.c | 42 +++++++++++++++++++++++++----------------- > 1 file changed, 25 insertions(+), 17 deletions(-) > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index 0f8b7c93310e..c036ba5311b3 100644 > --- a/drivers/usb/core/hcd.c > +++ b/drivers/usb/core/hcd.c > @@ -2760,6 +2760,29 @@ static void usb_put_invalidate_rhdev(struct usb_hcd *hcd) > usb_put_dev(rhdev); > } > > +/** > + * usb_stop_hcd - Halt the HCD > + * @hcd: the usb_hcd that has to be halted > + * > + * Stop the timer and invoke ->stop() callback on the HCD > + */ > +static void usb_stop_hcd(struct usb_hcd *hcd) > +{ > + if (!hcd) > + return; That's impossible to hit, so no need to check for it, right? thanks, greg k-h