Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2646580pxb; Fri, 5 Nov 2021 02:10:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC9ITYnS65mp29VLyDr1lzTex3PvKaFBFOjDzBUCoFfHlAIghzJmSV6Dl54G2e53WZFiOh X-Received: by 2002:a5d:81c7:: with SMTP id t7mr42571130iol.65.1636103410720; Fri, 05 Nov 2021 02:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636103410; cv=none; d=google.com; s=arc-20160816; b=GY0Xcb5I15f8XsERjgodtAM/7b2strPs96zF7iXU50PDzM0YZynhYFEmVkjz+76+R+ ch98IkaxWlw4PI3XBH4gIVsZthdhONo0+C7Wcbk+sIsYKqcIL6bXMtDUlUe5KSz8E7am ROFVfA2FoEO2uce15cRdRVvF0zVrkB+cdCb2qmj9yI4eLIpt0+gFKB31byp/iMWDPUIg wWo2pphR8GOlFotr95NVrVOK5MLDYGAP5EB/ArL9PuFsWtYwo/enPMMBwX6j0gC2pZ3F Zhw5HAJ2ygfGSCT9FuXLqj4aaYDSwQRHHUmL9k+0ex0B5YfdwumECJJAjhlZXQHXcccW e4vw== 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=KF6VzPEhznPeJ/GR19Aiohicuino2VGwJNhTV7QsTKs=; b=ETAoOWAQn2JSxuAoZwBX0hB/be8R4keiU/4aKL/IFjghqscHfZtvZ2u0D3HH/Bi0/E zju/dQ+Z+OJvBY6iyXkEqbSx3NgA7zlVvQ04xYaFALz7D3eQoFtKHCAyRcMT2/pSFNao 9fKY4WdEI1n23iGKhSd+BllddNdNq+xmzMvbHSrTOi5Nvw99JtA8ZvTDxMjvqVVjDdzG B6poJlpIPv1gSvTmFBiJXZcoX9kwRejQx+PQjZsvhW4gKDE9AawohlEGqERVSvuH7GVq kVdzjsWmvuTvaQVbWjPBTxtSiatU6L9mIuBDHMd12i7HDJjHsUdUJg+JB/u7D2OQNDQ+ ar9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GDvvuJB1; 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 f3si4186526ilu.70.2021.11.05.02.09.57; Fri, 05 Nov 2021 02:10: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=GDvvuJB1; 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 S232048AbhKEIyz (ORCPT + 99 others); Fri, 5 Nov 2021 04:54:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:39944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbhKEIyz (ORCPT ); Fri, 5 Nov 2021 04:54:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8EB1761245; Fri, 5 Nov 2021 08:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636102336; bh=tLq4vqpRI+b9CyNwNzXtcwMluJjPlrKEK5QQz35I6xA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GDvvuJB1Xn4A3267nPe3+WwFjpQN0W3lz+TD9eGEv9gamS7iDFne71ZezRz4g4WjA dI9RbILJlkgSWiCVhH3P5oISq6hJrKAGlEgQfT98tCrJ4wsBRFifUuhp/zD+lkAeI8 SueiwQuGgS6ML7uRHE5L8FzXGXcEFs1ujkSXH0A8= Date: Fri, 5 Nov 2021 09:52:13 +0100 From: Greg KH To: Haimin Zhang Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Haimin Zhang , TCS Robot Subject: Re: [PATCH 2/2] USB: ehci_brcm_hub_control: replace wIndex-1 with temp Message-ID: References: <20211105083357.29715-1-tcs_kernel@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211105083357.29715-1-tcs_kernel@tencent.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 05, 2021 at 04:33:57PM +0800, Haimin Zhang wrote: > In function `ehci_brcm_hub_control`, like following code, > it filters out the case where the upper byte of wIndex is nonzero, > so it need be replaced with temp. I do not understand this text, can you try to reword it? And you have trailing whitespace. And why use `? > ``` What is this for? Changelog comments are not in markdown format. > if ((typeReq == GetPortStatus) && > (wIndex && wIndex <= ports) && // need to be replaced What does this comment mean? > ehci->reset_done[wIndex-1] && > time_after_eq(jiffies, ehci->reset_done[wIndex-1]) && > (ehci_readl(ehci, status_reg) & PORT_RESUME)) { > ``` > > Signed-off-by: Haimin Zhang > Reported-by: TCS Robot Again, lines need to be in different order, and your from: line is not correct. Also, you need an individual email address, not a group email alias for your contributions. We work with individuals, not groups. > --- > drivers/usb/host/ehci-brcm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/host/ehci-brcm.c b/drivers/usb/host/ehci-brcm.c > index a1e3290e5459..efcfca162126 100644 > --- a/drivers/usb/host/ehci-brcm.c > +++ b/drivers/usb/host/ehci-brcm.c > @@ -73,9 +73,9 @@ static int ehci_brcm_hub_control( > * of RESUME > */ > if ((typeReq == GetPortStatus) && > - (wIndex && wIndex <= ports) && > - ehci->reset_done[wIndex-1] && > - time_after_eq(jiffies, ehci->reset_done[wIndex-1]) && > + (temp < ports) && Where did temp come from? thanks, greg k-h