From patchwork Thu Sep 14 13:33:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 139821 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp606143vqi; Thu, 14 Sep 2023 13:25:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9nym2+p4e6h7UV6xlL/pbBGatKEMWxJ3jx7zFVHd4vIYS9awbBJruT+7R/MUFvWKlGLDG X-Received: by 2002:a05:6a00:1c92:b0:68b:fc76:7dea with SMTP id y18-20020a056a001c9200b0068bfc767deamr4019164pfw.12.1694723130570; Thu, 14 Sep 2023 13:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694723130; cv=none; d=google.com; s=arc-20160816; b=ZQ1+jEKbg+mANG/dx8moLMHknt+VWiAWcEIlmH0cfi25upwCDE/xvDYeAoqFZYDfXG 1B4bNCIgRzbmONns+CnTM0psCitsB6YSepK8docsGTtSiWiAHUChVKEkCjj7Hwly48t0 ZHgilQdfspmNVhSmGGrD+jEP4MxVDP7xJ7iY8xxALafycy0+l23J1LGwJGaxb0XRqnkr QJoGUMkIwDSGGzOg5VpuLzezN3MAanHIlcrDzNZc8tdNXSyfc+CrrRRccz/quuLSGasV eiVU3yVSjIkVgF1RmGlp68E1jG2kBrUnYbvzu8iCIQ8d8N5A4TWiCgNadxD0mxffGt+0 4Qhg== 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=KnK9e8ZFi3pebVdrAjDVtxSA0qCAi/hA6TDylmv0g/A=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=enfm7ktFd0TDsi8AvrtUnzpQcnOm1/daBcrb3gug3gFt27ronYaGpaDyaG2QdWne65 32KIG4luHG6WnQXiRpCbFn/VwdkY5lUDy+Mm2/6JX3tf1ZPW+mNvJv1ElDSm6Hr0EO82 1I8eRfK8ulegltSsicvhJiD9+fpiYjoCU4x+o16IkFe8LPXNi3u/mZiWhW4S/eQyupP7 IBtjJETJE56Ko3rW9W5xV7HkiyqShU+6M+kuCzeyrIYzThIx+GX6OFC4lMMQ9oYl/A/m 7cwWDNo+SBhbUS1JIsyEj3OUC8PZHbppeiKNExQgNalyBkqvnJOWHcSF6UrMX8P1MKPo jy4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nhuItNLe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id dc3-20020a056a0035c300b0068be042fe24si2081293pfb.356.2023.09.14.13.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:25:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nhuItNLe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 7ED2A81BFAA4; Thu, 14 Sep 2023 06:36:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239472AbjINNev (ORCPT + 35 others); Thu, 14 Sep 2023 09:34:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239402AbjINNeI (ORCPT ); Thu, 14 Sep 2023 09:34:08 -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 536AC2129; Thu, 14 Sep 2023 06:33:47 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:36f2:37bd:ccbb:373f]) (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 43469660737D; Thu, 14 Sep 2023 14:33:46 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694698426; bh=vej0xyoaRLN25qHgld1P1pTyfPCEtxO7zlLcrG23sig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nhuItNLeE/eHshL9NqkSa3ui7vNLCle4BfyDm9HwWNOf8qU6fu9ZHVbz+qM7AUO2+ hjtFv2xfyIYnj36Jr5UkggkUfKEpG+u+CpDaGy+jvdb5cRM8cdW/BFr1DmyBh8ykgZ A+onhe5XfI6fnEPoYo5B4XEKGDou1F9nCi2P0ZGTG2IJYyGu7BSjmOQmM+Q8TVGRfd ZvmgpyITYotiJO2Okdgp887wYJBeNEufXuTVMaC3wUFk7JbYR2wLd5IiKKWEStrlUP DD5WHQhVEn3UcvTuhg0gqOU/EBFU9gDBrKKgVfQ7duL809XOFrYLLYdikpK+LbTCkE Td8EeFZsBaUjg== 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 v7 29/49] media: coda: Stop direct calls to queue num_buffers field Date: Thu, 14 Sep 2023 15:33:03 +0200 Message-Id: <20230914133323.198857-30-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914133323.198857-1-benjamin.gaignard@collabora.com> References: <20230914133323.198857-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 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 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 06:36:13 -0700 (PDT) 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 lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777046001524742296 X-GMAIL-MSGID: 1777046001524742296 Use vb2_get_num_buffers() to avoid using queue num_buffer field directly. Signed-off-by: Benjamin Gaignard --- 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; }