Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28618712rwd; Tue, 4 Jul 2023 23:35:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5SIIqKNW9xyo/ml9n0wxB87CsH/pR5W3j/yBHwvvS6FGSk/QSRtGH0knNYRHc5iqm1QZHT X-Received: by 2002:a05:6830:1315:b0:6b8:8c15:5249 with SMTP id p21-20020a056830131500b006b88c155249mr13713081otq.24.1688538910295; Tue, 04 Jul 2023 23:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688538910; cv=none; d=google.com; s=arc-20160816; b=cLenD6KoVB1GOutE4YrieuFpBxyR3a+xRY5KJ8HhUGUjk1bzcNliKMHqSh2ZJk7sYG mbxZOey/BxXN/K3Z/M/gTXCgo6+0HHcVcmT6Umcwv2ck7yqEroR9m6ey/uFqmCNVRNpZ 1qulNalK0VHSA+Y3IT73HE68w+HVzZXyxXOCUPp4PZuSaHaK0tWPt//mZv3Kz0ZOOTtp yehNvfIniDDIuudQkOT1XDr/sUWEQRVHwwSSDs3mSSu8LDJWHPMf+uCp3GEaBFelHoAD UNRdOcqgmymY2ihmnmxiFkGFSj3UsHwoeaqshOirvi1mSNe+kA1yro+k8o2828y8LaG1 jVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=38TL0OohQhnFY0fxf6wC+WdVlFp9iMauqo+bOMI78yI=; fh=9kYkiLym/afzq/uhrYb8ISO7KkcCcDXSo64LWsRRsc8=; b=WMvFqcZryWkwFd4SoL0Y9nAL5u+TMUA2SOYI+PT9tLPQL6UmljlOHuPXt6ZSp1WYku yHZ9zEpu1prt2h6zyO3LjsArwActCiCdA7HZUp7NR2m5vPdxnpJ5F8ZCZlcqw6rqKkiB uK2PMb23jYZx180DmUL2kMVHCnedI+Cw4KBLr83ZGtVTYAQARK0+wWDZR7Vq0YgUpTON 31Mek+knsYXNbuYXl818rM9+RCd1VT+a31OkTItjvz4dj6EgDIjnHl6kwAUVmteZQNdX tuZ+zMU9wrvnyOCjlinsT+SpcOvpfSmVeKuEscWlxyxjzOCnEmeQY5sxmHi3r0NseLLW 6ukA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r25-20020a6560d9000000b0053f0bfcd4fasi23190252pgv.173.2023.07.04.23.34.55; Tue, 04 Jul 2023 23:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbjGEGUA (ORCPT + 99 others); Wed, 5 Jul 2023 02:20:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbjGEGT7 (ORCPT ); Wed, 5 Jul 2023 02:19:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A2A810EA; Tue, 4 Jul 2023 23:19:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1ED01612A8; Wed, 5 Jul 2023 06:19:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E8C4C433C8; Wed, 5 Jul 2023 06:19:55 +0000 (UTC) Message-ID: <1c74c932-83a1-6b9a-c799-347b25c1979b@xs4all.nl> Date: Wed, 5 Jul 2023 08:19:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v1] drivers: usb: remove duplicate logical judgments in if Content-Language: en-US To: Minjie Du , Mauro Carvalho Chehab , "open list:GO7007 MPEG CODEC" , open list Cc: opensource.kernel@vivo.com References: <20230704104017.9535-1-duminjie@vivo.com> From: Hans Verkuil In-Reply-To: <20230704104017.9535-1-duminjie@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minjie, On 04/07/2023 12:40, Minjie Du wrote: > Fix: delate duplicate judgments > Does the judgment content of this if > mean requesting confirmation twice? > I'm not sure, Could you help check it out? > Thank you! From what I can tell it tries to send the reset request a second time if the first attempt fails. Fair enough. So let's leave this as-is. Regards, Hans > > Signed-off-by: Minjie Du > --- > drivers/media/usb/go7007/go7007-usb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c > index eeb85981e..c85e48e16 100644 > --- a/drivers/media/usb/go7007/go7007-usb.c > +++ b/drivers/media/usb/go7007/go7007-usb.c > @@ -653,8 +653,7 @@ static int go7007_usb_interface_reset(struct go7007 *go) > if (usb->board->flags & GO7007_USB_EZUSB) { > /* Reset buffer in EZ-USB */ > pr_debug("resetting EZ-USB buffers\n"); > - if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || > - go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) > + if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) > return -1; > > /* Reset encoder again */