From patchwork Tue Oct 3 08:06:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 147711 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1928671vqb; Tue, 3 Oct 2023 01:08:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZX9EtcEZZdpQ5TJWFdVilnVgiwrZeaDKuC61Sr6Bu2vYED3rl8x01Xy+smHm39zdA0enj X-Received: by 2002:a17:903:26ce:b0:1c3:e3b1:98df with SMTP id jg14-20020a17090326ce00b001c3e3b198dfmr10529995plb.52.1696320524945; Tue, 03 Oct 2023 01:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696320524; cv=none; d=google.com; s=arc-20160816; b=X/4j9nO6dkurSJtJNHLmZMyGGAunEnr2v+qox6vmpMyviTfGYkK+nz3eFyHi708Bb1 qAmwt09dQ92eMOtw6lGnpdGFqTaXdq4j/NXxj/uTn5kUjw8nwq7hqma95V8uTtll0Z6n NbDDSZADLOZv8loL4WGKL2hfzfLLKuQZj2P2KvT+32TQMxbAJThSdj4NLuNSVnLrLZBd JYbFo2TxbpduvABFdmG1mItApu7wFZRpEk4nrPwcvbsbFNrQHDUydTjMZpAEaMlruhnN 3Y8cK73V6Ju2IQp+mizI1wK7iqLIMNAglj87QzceNfzQhKo/PfIFsNkm4W3axEd1Una8 Zv7Q== 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 :dkim-signature; bh=EGIyUnXfYlZrvHeWCo2ngnGTPgOrZHbbiv5X9rjqVAs=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=yZ4UGxzel3VcHT+9Mf7UimuBPiDLY1wq4OBuuy7Mh5wXqYuPQG6ibw16E3ILMWkezo tE4JxgUmXraPcZ/NgQ/DSOYqtlldOga80pmjeUINQBH/v1Bpd7MdLX3esNuOp8vWJXw6 JhDKHp5+UVdK/L3+e5Kz0ozU8aeScxt5J4WrEm1k6IXT/GgcBwy3VC/UCMsHzPu+gKSp UWNXsyeCSHhnWGTbMzfOobUE9rS0Qpc1BejJB3Ki7jRlwnq7JgaQxo8jdb+4kJm19lNm JDi3FJkRT9I339H0zFBS6J5iAWn9YxGVByXG0ic/QT3C5Tj9sC6jAyrNuC1mcKQffcTl nVVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TM877k3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id f4-20020a170902684400b001c3ba275321si924593pln.76.2023.10.03.01.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:08:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TM877k3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0C05A8243BD3; Tue, 3 Oct 2023 01:08:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239738AbjJCIIk (ORCPT + 18 others); Tue, 3 Oct 2023 04:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239446AbjJCIHg (ORCPT ); Tue, 3 Oct 2023 04:07:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AED3B3; Tue, 3 Oct 2023 01:07:28 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:b6df:b784:6a0f:8451]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id DFD2F660735E; Tue, 3 Oct 2023 09:07:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696320447; bh=ZWZu+iiWZeSR97TuxWAcPyCT2zWmqcsNlEZTasx6lQc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TM877k3dbdv5cZ3/+fzoBT0lguta5bDqCV9H8tQ8PNrG5rqShpGoZHosFKCqo+gR2 aNnRhEh910+mZEG615eL480UAWFDxh5mBICdi8AV1G2/xg53Q2C7SWF+7SmWfip1Mk 3q12j79ajrgx/XNulaWFbSKsJlmeAs34SBtQ7Rbz8u6zY48K68sA2uNRgIDumytrUa vnN34JOqeZOMSddzFZGcz9Oiw3GCGautxBvRG3pHJoUiegtBBD/DDk1ds/db79eaMP tF2MEa9LEcz3+IHiIXmLh++xqfhOqDLuGe9J63hN1PKcD6HAL8CG9SJd15m7vc4rRb zFQtQW7z+30Zg== From: Benjamin Gaignard To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v10 27/54] media: pci: netup_unidvb: Remove useless number of buffers check Date: Tue, 3 Oct 2023 10:06:36 +0200 Message-Id: <20231003080704.43911-28-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003080704.43911-1-benjamin.gaignard@collabora.com> References: <20231003080704.43911-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:08:44 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778720990703221142 X-GMAIL-MSGID: 1778720990703221142 vb2 core tests this already so remove it. Signed-off-by: Benjamin Gaignard --- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c index d85bfbb77a25..52de9b0af812 100644 --- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c @@ -297,11 +297,9 @@ static int netup_unidvb_queue_setup(struct vb2_queue *vq, dev_dbg(&dma->ndev->pci_dev->dev, "%s()\n", __func__); *nplanes = 1; - if (vq->num_buffers + *nbuffers < VIDEO_MAX_FRAME) - *nbuffers = VIDEO_MAX_FRAME - vq->num_buffers; sizes[0] = PAGE_ALIGN(NETUP_DMA_PACKETS_COUNT * 188); dev_dbg(&dma->ndev->pci_dev->dev, "%s() nbuffers=%d sizes[0]=%d\n", - __func__, *nbuffers, sizes[0]); + __func__, vb2_get_num_buffers(vq), sizes[0]); return 0; }