From patchwork Thu Oct 19 12:51:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 155523 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp360116vqb; Thu, 19 Oct 2023 05:55:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDwkQlrx6EAQwz8kWeOSgqemqP/Oxsrtq48wM6swIYGvNVneX5S5ugwO191TbIjzvX0F4x X-Received: by 2002:a05:6a20:4328:b0:126:42ce:bd44 with SMTP id h40-20020a056a20432800b0012642cebd44mr2637752pzk.17.1697720145890; Thu, 19 Oct 2023 05:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697720145; cv=none; d=google.com; s=arc-20160816; b=dhAFWxblK0sOlVtp+6R5zFZKa16SIy8NEtiEvrs0Z9THBBJmv5Ex9TWoLUJ8q2rcPJ FFYCFtfct4yXCWbus7LjvIY5UgU+DQjdG5X5P2mrdOzBYclzZoP8I6sxhtmFyFeVpJwC I0bBnImP5am/2c7b3ZncCGLat4gcFLP3q7f2lfWRaczy6O/cHbiCLyYv73FD0NtBjRpI OccWlTAIa7Dxb+2eWR0rDWZuQu2q1m8FZApHMkOnSHwpabjM0Z7g5cNhUP47S2dS0CDi boQKwWgNWhHperA+Qs6SdDRT6j8jM/rK89x+TgCOxPVod/pCT0nB3PrKc5WPL6V9uDxJ Ux/g== 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=ygagWkTKSpxAwfpgy9CD7Z3vZwaRCO8lX7nULOKBqHJTvj0q703Rxb/Fz6ZAlf+wI1 rHhhQVETx/q4Nx1XNpRMIMtGkqTGMXc6wiPMPv0PEdEHRd9e7UWPkBqNTzbsVTTwHaZ+ QYKQH6zzF/0QvdCV3/VnOlVhlfVQD6FkEmHlc6emIBdcUCqqpTQB0kTj+kh9diu0GJPr Arip4oUREBWtSs8T7yip0ywgI6Uduql7TsShw+5hf9smdYYdKz8x1TDQb7Tp61IVTzbF suoJDOkYybDVCRyyjc8zAi64E+iniuUlQztzKeXXcXYRkdQq4wQ19tc8c3YdMfD4brAu nBmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="e9Q5c/XG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d189-20020a6336c6000000b005b5c68e2c92si4363923pga.371.2023.10.19.05.55.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:55:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="e9Q5c/XG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 8803F819706E; Thu, 19 Oct 2023 05:55:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346111AbjJSMyD (ORCPT + 25 others); Thu, 19 Oct 2023 08:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345807AbjJSMwq (ORCPT ); Thu, 19 Oct 2023 08:52:46 -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 1C256193; Thu, 19 Oct 2023 05:52:43 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:ccea:1fb5:34eb:239b]) (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 846A9660732E; Thu, 19 Oct 2023 13:52:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697719961; bh=7OP/lnsbD5MzPZ4L/gceSmxIzda3Ng9eLtu0phjni7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e9Q5c/XGmoS4q5vNs27JgY/Cjoiran6iFcIpvsC9LeJbR4YLU/pJBA08Ipaf+8RxA xYJFq/edyFkoLyHWKDeV7GGGjkYX7lemUC7swD4Avp2Eu+MZb7k2eSzQQwGRJfR81R sD0BI95cAER5TkephbcbW051fRv8rJk7Ni3/LdylTvOKV6LyqlfFQ4bjvjapep+M0L dI6mQCk1uR0a5Qt0d5kLvBrIEOmbusOqffQKB9xlXFAsB6tEN5D9AD0f3NKk4I1+ne soPvpnnrfgpdG8SR6muomRK1e1jlZUOz2L7eJ4Tl6fBXICwAuEM0tSHSuUSR9wUwx2 w2DcSY2J9uF0g== 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 v13 21/56] media: pci: dt3155: Remove useless check Date: Thu, 19 Oct 2023 14:51:47 +0200 Message-Id: <20231019125222.21370-22-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231019125222.21370-1-benjamin.gaignard@collabora.com> References: <20231019125222.21370-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:55:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780188599693205586 X-GMAIL-MSGID: 1780188599693205586 min_buffers_needed is already set to 2 so remove this useless check. Signed-off-by: Benjamin Gaignard --- 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;