Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp247795rdg; Thu, 12 Oct 2023 04:48:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5i5+MoecsRtfDIEvj3W2yT2RAqIwUHSDroGsyIrkKJLX2WS5PiBE9kZQJf82kK8bmTmey X-Received: by 2002:a05:6300:8083:b0:174:52b7:f63 with SMTP id ap3-20020a056300808300b0017452b70f63mr3242084pzc.26.1697111298956; Thu, 12 Oct 2023 04:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697111298; cv=none; d=google.com; s=arc-20160816; b=KzEZJtg7UWWCmtbzIFv9cf20HSP2d9wwsgkd0M6imoi9ft/hEMjRI6gsonhUG1YjW8 dPcfjHRKU1xDU3O2pnPzodQJFwWLL/imXMBpSn+lsnHd/lY2BNzZ6FE9WB0erKFdq3tw kyCUQ1GeG+VidT9gu1Q6Jf3AKxMl1LGHok75G7abYr2fMK/24fVdlOq1b8Pti+yg2sB/ gxAgGjn5kOyhc6Xr20rpzXatkr6plnHPYsY0qZjU9SZkUupM53LKW01hNltquVtw50vp dV//3hD9FmJJIh7ro4DAD9+KZdB4GUlANFTd0ro+sidNZ7C3Ev5htkEkRlJ4tmxRI+RR OmGg== 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=nQfxfWgxf+UciazPlm08ZD4s+pDT829wW2uEfBoYZ54=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=lyqMJpZ97OcVCRIqp8hoEiJqQw6U+cKTkQ6ywbYI2ltwvNGRVS/yftUD2SH/5TROEc JFNLil+sC/E6FY8otGbkZPYAz+zlXH5i86QzMEP7czwyGtwiZ7WYaroNyc+YuoGuh2vG jZOoR7h0K+zwgaZP7NtzOl3hkJ5EnNijIY1R7SCmHyihoqNzAD9eExzzennGxOUjFH74 YQ847CyFu6hDCcsuDoWyOzYT3598lC6jaovKZHK9YxfjCfMvgIRt0vG+jvlf+AzdVhSo KQ77MfTbgzPhKUwls8CzBXfnaZQCmIxB6KCwz2qkEgrdwqFoDUdX6weTKqq42qh5zbQQ WE5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EzeW+HbJ; 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h15-20020a170902f54f00b001c878b52cf4si2259284plf.365.2023.10.12.04.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 04:48:18 -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=EzeW+HbJ; 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 025C8822CD4A; Thu, 12 Oct 2023 04:48:18 -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 S1379197AbjJLLsC (ORCPT + 99 others); Thu, 12 Oct 2023 07:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378628AbjJLLrN (ORCPT ); Thu, 12 Oct 2023 07:47:13 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E94118; Thu, 12 Oct 2023 04:47:05 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:7ae7:b86d:c19a:877e]) (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 BDD416607350; Thu, 12 Oct 2023 12:47:03 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697111224; bh=VxrSf2TjcSSXRnDg1WucVdGn4nlvPFqwpAeCOwuv/a0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzeW+HbJ86unAEmGAC4vwmJ5F7x1j/bC6V+hGCcN+5PwyTHBMfIvdhLsKjsTR6ZbX fzQPZLHybtEUgDa7WYxo0o71ObcPkUH5LzJLacnFer5iGKBIpLqBWJNeysKjFDobrB X7RqRCOAfXa11sAbZyri9l/IiKiV5KSN/bTFfS4qB4aHNQeBlbvv/aUcts+CkrS5tV adUoQc3HeGOD5k8DFDyMzyGsgMG+ObIy+0OIIKbroXzOYavehZpulR1xFNOWu3iMnl wzWotHSL9RGn3Rx45EgailuFTCK+EenWeSiFlZqoXd0HP0/RT/jPvM85wcM/pkWObV o/vagGaCYrGdQ== 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 v11 27/56] media: coda: Stop direct calls to queue num_buffers field Date: Thu, 12 Oct 2023 13:46:13 +0200 Message-Id: <20231012114642.19040-28-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231012114642.19040-1-benjamin.gaignard@collabora.com> References: <20231012114642.19040-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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]); Thu, 12 Oct 2023 04:48:18 -0700 (PDT) Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. Signed-off-by: Benjamin Gaignard CC: Philipp Zabel --- drivers/media/platform/chips-media/coda-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/chips-media/coda-common.c b/drivers/media/platform/chips-media/coda-common.c index cc4892129aaf..f1d85758f6dd 100644 --- a/drivers/media/platform/chips-media/coda-common.c +++ b/drivers/media/platform/chips-media/coda-common.c @@ -794,7 +794,7 @@ static int coda_s_fmt(struct coda_ctx *ctx, struct v4l2_format *f, if (vb2_is_busy(vq)) { v4l2_err(&ctx->dev->v4l2_dev, "%s: %s queue busy: %d\n", - __func__, v4l2_type_names[f->type], vq->num_buffers); + __func__, v4l2_type_names[f->type], vb2_get_num_buffers(vq)); return -EBUSY; } -- 2.39.2