Message ID | 20221025050450.1743072-2-pedro.guilherme@espectro.eng.br |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp812787wru; Mon, 24 Oct 2022 22:08:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Qa0cxR8C6P5n4AekfRw8beKP3BNEVs2fKpk8S24E8JAc2k4utmZs9HS9i7vgodnUa5eVW X-Received: by 2002:a17:90b:1bc3:b0:20d:75b8:ee74 with SMTP id oa3-20020a17090b1bc300b0020d75b8ee74mr80167848pjb.1.1666674504771; Mon, 24 Oct 2022 22:08:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666674504; cv=none; d=google.com; s=arc-20160816; b=WrqvKVrSUalxzRMoRN5pMYb4KcUOEYesUTBGcXb06MMnnD3RFz/eFBkkSi/MNLnfZX iaZE+t9oaA7//e9t4YPTm3ldQ+66kfGQGHx89S4I5RvDbu3u77dnfiXcBkDogtaqyYfe W0gzuAr0vCQnfzUe6/onaUsrLyT3nYW75HORkgPUQxTyTGismbEu0NSqP/xeyWTfoauD 1+aoItaaGoLh/60BCAH3qIy96SSl21xM2JhjfKWIttnXmIfdXlWqy0kHChFynzCbOxbQ +S57CDQlXTKZHb5fdSXJhhcTpNqvWAyZenMjpbrWGnSum0iyVTlIMBrbMePnZb23PfNA Y6tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xlw3Ku6SsSLQuNSHIv5X2ecPLccvNc0JAzmgpyzfdFw=; b=nORcoFOyL7qkZcZDQ1d3pnBV9IWbOTc21q0oQ25/Y+onJOBJJuCMCDfuZRo6FLiLU0 53gGI+0DE5w1jM4dS1ktWhqcWhjNJOUR1mnF0OxL3ZNq7I/en1hxd/hIHiIMcutuPwjB DniazCzyqxqpO6uTCpsKAM9l7yNl0yhvx8xzpSPq0pkVvfVxA8jWA5j2vtzeHezAne0v 972WM0SNYgSea+z18nOQMLecjwCPYN1MPMnoi5eJbzGx0XNmpHGr2ikI4oVMSDx/2tQO 9pb+oiJ50OmC9+llfjJsrwBP2hvpPDXsXZ2TDW+jV5dKZtuuz3AT8KCDnxHT2LY8ObpE o12Q== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa10-20020a17090b1bca00b00205e1caca43si2619045pjb.34.2022.10.24.22.08.11; Mon, 24 Oct 2022 22:08:24 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230428AbiJYFHM (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Tue, 25 Oct 2022 01:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230414AbiJYFGu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 01:06:50 -0400 Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.144.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F12BE503 for <linux-kernel@vger.kernel.org>; Mon, 24 Oct 2022 22:05:08 -0700 (PDT) Received: from atl1wswcm05.websitewelcome.com (unknown [50.6.129.166]) by atl3wswob02.websitewelcome.com (Postfix) with ESMTP id 21BA19925F for <linux-kernel@vger.kernel.org>; Tue, 25 Oct 2022 05:05:03 +0000 (UTC) Received: from br984.hostgator.com.br ([162.241.203.37]) by cmsmtp with ESMTP id nC7aosVdoP2h5nC7aoW5xF; Tue, 25 Oct 2022 05:05:03 +0000 X-Authority-Reason: nr=8 Received: from [177.194.67.221] (port=44582 helo=arch-avell.meuintelbras.local) by br984.hostgator.com.br with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <pedro.guilherme@espectro.eng.br>) id 1onC7Z-001KDW-T5; Tue, 25 Oct 2022 02:05:02 -0300 From: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br> To: laurent.pinchart@ideasonboard.com Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br> Subject: [PATCH v2 2/3] media: uvc_driver: fix assignment inside if condition Date: Tue, 25 Oct 2022 02:04:49 -0300 Message-Id: <20221025050450.1743072-2-pedro.guilherme@espectro.eng.br> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221025050450.1743072-1-pedro.guilherme@espectro.eng.br> References: <20221025050450.1743072-1-pedro.guilherme@espectro.eng.br> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - br984.hostgator.com.br X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - espectro.eng.br X-BWhitelist: no X-Source-IP: 177.194.67.221 X-Source-L: No X-Exim-ID: 1onC7Z-001KDW-T5 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (arch-avell.meuintelbras.local) [177.194.67.221]:44582 X-Source-Auth: pedro.guilherme@espectro.eng.br X-Email-Count: 5 X-Source-Cap: ZXNwZWN0ODU7ZXNwZWN0ODU7YnI5ODQuaG9zdGdhdG9yLmNvbS5icg== X-Local-Domain: yes X-CMAE-Envelope: MS4xfBcoFGPeWcnS/44fq7tqiYGxE4+w21DUsFfHVWnND23YiYqMLM3u7XITcqlbDcDDy48qSTVQW2/og0+9HA8CFzUicDpYYR5jbKSy52kDvcfe7BpLt98J I+K0xbIWiyzuyPu1395sfqBEOdIr4yg5HvbFYMz9Mdw/ZsnRk8G7vutGF/35qnN76s9XCmeRVIfrKodkXfF6MEJ1AdAb46BcG/xr1da871EcS1mCLg8aWf/P X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747634885885260461?= X-GMAIL-MSGID: =?utf-8?q?1747634885885260461?= |
Series |
[v2,1/3] media: uvc_driver: fix missing newline after declarations
|
|
Commit Message
Pedro Guilherme Siqueira Moreira
Oct. 25, 2022, 5:04 a.m. UTC
Fixes 'do not use assignment in if condition' errors issued by
scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
---
drivers/media/usb/uvc/uvc_driver.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Comments
On Tue, 25 Oct 2022 at 07:08, Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br> wrote: > > Fixes 'do not use assignment in if condition' errors issued by > scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c > > Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br> Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> > --- > drivers/media/usb/uvc/uvc_driver.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c > index b591ad823c66..7b6c97ad3a41 100644 > --- a/drivers/media/usb/uvc/uvc_driver.c > +++ b/drivers/media/usb/uvc/uvc_driver.c > @@ -1174,7 +1174,8 @@ static int uvc_parse_control(struct uvc_device *dev) > buffer[1] != USB_DT_CS_INTERFACE) > goto next_descriptor; > > - if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0) > + ret = uvc_parse_standard_control(dev, buffer, buflen); > + if (ret < 0) > return ret; > > next_descriptor: > @@ -2213,7 +2214,8 @@ static int uvc_probe(struct usb_interface *intf, > usb_set_intfdata(intf, dev); > > /* Initialize the interrupt URB. */ > - if ((ret = uvc_status_init(dev)) < 0) { > + ret = uvc_status_init(dev); > + if (ret < 0) { > dev_info(&dev->udev->dev, > "Unable to initialize the status endpoint (%d), status interrupt will not be supported.\n", > ret); > -- > 2.38.1 >
On Tue, Oct 25, 2022 at 10:45:40AM +0200, Ricardo Ribalda wrote: > On Tue, 25 Oct 2022 at 07:08, Pedro Guilherme Siqueira Moreira > <pedro.guilherme@espectro.eng.br> wrote: > > > > Fixes 'do not use assignment in if condition' errors issued by > > scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c > > > > Signed-off-by: Pedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br> > > Reviewed-by: Ricardo Ribalda <ribalda@chromium.org> Likewise, this looks good to me. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > --- > > drivers/media/usb/uvc/uvc_driver.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c > > index b591ad823c66..7b6c97ad3a41 100644 > > --- a/drivers/media/usb/uvc/uvc_driver.c > > +++ b/drivers/media/usb/uvc/uvc_driver.c > > @@ -1174,7 +1174,8 @@ static int uvc_parse_control(struct uvc_device *dev) > > buffer[1] != USB_DT_CS_INTERFACE) > > goto next_descriptor; > > > > - if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0) > > + ret = uvc_parse_standard_control(dev, buffer, buflen); > > + if (ret < 0) > > return ret; > > > > next_descriptor: > > @@ -2213,7 +2214,8 @@ static int uvc_probe(struct usb_interface *intf, > > usb_set_intfdata(intf, dev); > > > > /* Initialize the interrupt URB. */ > > - if ((ret = uvc_status_init(dev)) < 0) { > > + ret = uvc_status_init(dev); > > + if (ret < 0) { > > dev_info(&dev->udev->dev, > > "Unable to initialize the status endpoint (%d), status interrupt will not be supported.\n", > > ret);
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index b591ad823c66..7b6c97ad3a41 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -1174,7 +1174,8 @@ static int uvc_parse_control(struct uvc_device *dev) buffer[1] != USB_DT_CS_INTERFACE) goto next_descriptor; - if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0) + ret = uvc_parse_standard_control(dev, buffer, buflen); + if (ret < 0) return ret; next_descriptor: @@ -2213,7 +2214,8 @@ static int uvc_probe(struct usb_interface *intf, usb_set_intfdata(intf, dev); /* Initialize the interrupt URB. */ - if ((ret = uvc_status_init(dev)) < 0) { + ret = uvc_status_init(dev); + if (ret < 0) { dev_info(&dev->udev->dev, "Unable to initialize the status endpoint (%d), status interrupt will not be supported.\n", ret);