Message ID | 20231003080704.43911-49-benjamin.gaignard@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1930791vqb; Tue, 3 Oct 2023 01:13:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiqA23iTHUdQWswPs3+KrfacpaCfj9mye2xusWbqH5mU0a+nSceL1zz9g7SXkTaA9wPLiS X-Received: by 2002:a17:902:bd94:b0:1c4:2271:55c3 with SMTP id q20-20020a170902bd9400b001c4227155c3mr12190964pls.38.1696320821297; Tue, 03 Oct 2023 01:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696320821; cv=none; d=google.com; s=arc-20160816; b=poVxYxiDTwlvKAkabwcZ+0wvyriK0BZ+01ihDl8g2QDuaVOxxYyYNBOIdq/krwkZtp VP9rj7F2VGfI9Hvu9bN+E7ZKOOA0UWtSd5cK00SItys5/+jGNGm3f7wFGX9ep5LeIM7z F4qwpy9jF8A3N7BNGZTCkqR+LpAC06fnZ7F4PnlOMsxmoqFlnd4eUwEdlv0Tv5vvX1ta 8ndeJyTw4DgwqBtkTVOk1miP4y88+Gx9oAcKud9wUgPfTWgaqLctHkF1ffJAsvlOG0QP YZ9vyggKItPw/cF8csF5vRfnuLQlPlkwPePlDPh7NWLV1GinhUy/IgMFv7ZjRIufes7J 3lxg== 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=wDA22phgcQzkhMuwmjl1yY4drfu1OKCwHivGH2oVgkU=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=gCdAlvDbqVuRZlX+eEm8CM0vsipaAQrDcawKdTReWJ9UQOYNindWcqfrBHOHbjS2yL DfFLSA0QXMDOixqBioQ2MdgPTBZ20rjL4BEruGhxKAR+8KthCvWBejIvWAMCgiLY5Lgw R1HL8+/SbfRIZsPUprorh5zrjqSxLFzZu84nMD4NrB7kycTqBgiFI5x/TNtKeb8+hbj7 e5SW8BeYoGW7PtMz7CbxvcNypeCNUURjQ40TUyaZvOKmiIDt8FdFqbqBJLDKwHgC0fi6 We4USCEHopKhcnSjBNljc2r03CG7fcPlFkQ//2ck1PV0i85ArT7qr/Lx0LcBpIcgQnPb V2Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=M3epeRo7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id km3-20020a17090327c300b001c413905d87si919509plb.49.2023.10.03.01.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:13:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=M3epeRo7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id D9D368077460; Tue, 3 Oct 2023 01:13:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239555AbjJCIKo (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Tue, 3 Oct 2023 04:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239353AbjJCIIB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 04:08:01 -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 14A8CCC4; Tue, 3 Oct 2023 01:07:39 -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 E1E0E660738A; Tue, 3 Oct 2023 09:07:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696320458; bh=xoGuB9BqmG5292CiK1lPMwRIslKTljuiyBog3GEPqdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M3epeRo7idthRIkC77R8NXH8vtYvFbZRowl2OSrBqZLi/rVfVG91spufAYXsEwrEw 54h9V3+diJdFyZ3n7vg9LgnHHFbE88LtTCGiBGPB9lrj/K8iP6FOrYuU5mW9n98Xie Affli3/ItOCO9a5UPj13mOPlKAuMQSZmtCMvoW6smc6dfSZxTVx+jbVHeKLbEpWJV+ 0lqgo4JW6LOrFt9+GFzLkTL6CM/ToS82cxAhpFFHIyfVwiZjwi5cAgx5Ublz/e+3zE enEcuGdzFdQ7FmvduPuZ+oQo1gxv1hTAuFNiiKWOWqhJBPSr20HyLoIsReON589FCR jdNTycXzJVSlA== From: Benjamin Gaignard <benjamin.gaignard@collabora.com> 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 <benjamin.gaignard@collabora.com> Subject: [PATCH v10 48/54] media: nuvoton: Stop direct calls to queue num_buffers field Date: Tue, 3 Oct 2023 10:06:57 +0200 Message-Id: <20231003080704.43911-49-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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 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 groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:13:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778721301559829976 X-GMAIL-MSGID: 1778721301559829976 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 3, 2023, 8:06 a.m. UTC
Use vb2_get_num_buffers() to avoid using queue num_buffers field directly.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/platform/nuvoton/npcm-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c index ac8d73b794d3..29b3c55f5396 100644 --- a/drivers/media/platform/nuvoton/npcm-video.c +++ b/drivers/media/platform/nuvoton/npcm-video.c @@ -393,7 +393,7 @@ static void npcm_video_free_diff_table(struct npcm_video *video) struct rect_list *tmp; unsigned int i; - for (i = 0; i < video->queue.num_buffers; i++) { + for (i = 0; i < vb2_get_num_buffers(&video->queue); i++) { head = &video->list[i]; list_for_each_safe(pos, nx, head) { tmp = list_entry(pos, struct rect_list, list);