From patchwork Tue Oct 31 16:30:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 160195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b90f:0:b0:403:3b70:6f57 with SMTP id t15csp363520vqg; Tue, 31 Oct 2023 09:33:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSTDMUUXExRgUN4XDH91qH/HOfBzW/WUOKdxs10cYpPJcsMRu0Hx8pPQkeDV0aMZNXPYQ4 X-Received: by 2002:a92:c569:0:b0:34f:2756:8fd with SMTP id b9-20020a92c569000000b0034f275608fdmr17441280ilj.9.1698769982794; Tue, 31 Oct 2023 09:33:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698769982; cv=none; d=google.com; s=arc-20160816; b=eVywDbDFTHdUsaTJP9N1mVFftexYWZuR5eLleoBs3rn3zNvINElZdP5PElJZoYGBCq WBVEMvqd7lsB0H6Fcy2AZ1ofCbX+Im+cqGJuXgtx0Qz/iIpXffsqrnjY/Lc9nQJPoRW7 KDaalSdpO7HbJcS7K/rRXQY3eLtKO81mWP9mGXCgOLZv47S95vTFfhxRc9X+uhPmWyYS nQhliWrkpYbDg3JU+C9dbfibdr0ysCply0BzGAKox1LWJ8A/wt7h6FIwQo4n+yVkqf2F tX0IOnob17vJWo9JlpG8Zu/UQ4ytLFiTO9rLDLFB1ZDwz2aqkWgHuUGA3i3uh8Yvp5pi GYBw== 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=mxhqX9L/LTLjAo8r4FRZmw55ljZYm0j0MEPgb49dKlI=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=PJJ9FUpCaeH2Vhd1pUdQX9V1kSkHFo/68KNs8H3tCFKFbfpCr/9fPC7AQpri2KxN3c 581QRczevYlshDY69FUtFU4eu1eNSFvq18YXGotBGOpHCZhXZ0Ywb6QqjwLAJE0MuoB6 PYS1AoG6XffCTvW8jXkb11P8yLXv6CAThl5u/dKnsLYxw/b3OeCtrFuesRC2MWi0hUtW McU7hgWlccpWiYldTNmApaww1Sb+o5bZMtaybJYhLrVXa2CPaP2n+bTfuobwsEnm2TGo v2DgYfebjonb5wWwBPvYjuBdLiGpnxYUhuWECN9z8koPwH9ak53rU7qtkEwkpg+Msq57 q/wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RhZvI0Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b3-20020a63d803000000b005b8fb1da631si1252068pgh.897.2023.10.31.09.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 09:33:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RhZvI0Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id CEF96801B3AE; Tue, 31 Oct 2023 09:33:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346287AbjJaQcy (ORCPT + 33 others); Tue, 31 Oct 2023 12:32:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345940AbjJaQcJ (ORCPT ); Tue, 31 Oct 2023 12:32:09 -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 0843D1BF; Tue, 31 Oct 2023 09:31:47 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:c562:2ef4:80c0:92f]) (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 63CAD66073AE; Tue, 31 Oct 2023 16:31:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698769905; bh=7OP/lnsbD5MzPZ4L/gceSmxIzda3Ng9eLtu0phjni7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RhZvI0Wm6tpsneCvOt5IoGfJVyNH+/OpU7UlOjcjY4UZsgk8dc55BjoI7wX3bDJFV ytEiqyn297DiwwaX5+GRYPGpFp0teKBvBcmNWxK+875xqHhycAZvcqPp0EiFUODr7J KdVhF0I1TMLct5mfJoehCzcPqx8xXFKUuIhWW3VBnnh4vsUVovTYgt/OaXI/ijgKeC LohvT/M1/kWGGVMTo8JDrffuBGneRtcx98g+xzdTC6EOZnSaIYQ3JnVBfsUHY/MZZt t4xZlFmA7/JF1t/HhPSVK/0K9Z3fvefHBhXoEUmqdGtTLiExuS/OxRTC4hQUMdEAn7 uL14uvLIcbJww== 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 v14 21/56] media: pci: dt3155: Remove useless check Date: Tue, 31 Oct 2023 17:30:29 +0100 Message-Id: <20231031163104.112469-22-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231031163104.112469-1-benjamin.gaignard@collabora.com> References: <20231031163104.112469-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,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 09:33:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781289433586824410 X-GMAIL-MSGID: 1781289433586824410 min_buffers_needed is already set to 2 so remove this useless check. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz --- drivers/media/pci/dt3155/dt3155.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c index 548156b199cc..d09cde2f6ee4 100644 --- a/drivers/media/pci/dt3155/dt3155.c +++ b/drivers/media/pci/dt3155/dt3155.c @@ -128,8 +128,6 @@ dt3155_queue_setup(struct vb2_queue *vq, struct dt3155_priv *pd = vb2_get_drv_priv(vq); unsigned size = pd->width * pd->height; - if (vq->num_buffers + *nbuffers < 2) - *nbuffers = 2 - vq->num_buffers; if (*num_planes) return sizes[0] < size ? -EINVAL : 0; *num_planes = 1;