From patchwork Wed Sep 27 15:35:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 145451 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2739914vqu; Wed, 27 Sep 2023 09:15:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfNb4QUhoi/o19S5sfTN8PqpMpvIpHt9W7nzChSR0RBuoWp/zOTLzxw44ntlqMZuUvIb3l X-Received: by 2002:a05:6300:8085:b0:15d:7e2a:cc77 with SMTP id ap5-20020a056300808500b0015d7e2acc77mr2130807pzc.48.1695831310561; Wed, 27 Sep 2023 09:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695831310; cv=none; d=google.com; s=arc-20160816; b=ASHOPgn7OLtuOuUUVeoeKMf3b4Oh3ejyX9gv/NLKYeplc+Pl1I6MnzHJeJoRmvTgA0 HyHyhF6Y/+V7ABxY817y1P+o/yUaZisbU2t7/g+LA310/wXZ3479tVxO1IMjhrAVoIDy g9NEL1sr5vxzc2WK8PbmsUiIWNUygqNbtxngoEWt/pKURrz6G32EeRj2YMAWxhwVjCFy FsoK361txPEHk0gHvwB2al3vL3y7Kklv92AH6Gh3hnp04Yt5nzY062lg+KNIjXsYxhp7 u/kxDYtpdGPXySfKG1Jl/Bd6D2jVRpBV+QL0QHDcQXK+c2UNW9AlX3FEA1ONqngBsI+P cydA== 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=ptm7qcHW90pBOiNdF2l5vPv7Eg6TT1KnFjnSxbTuy9Vf2JuuK7snP7Cc//YhIlM98B 1GTiY6HPEDSwPV0o9Qrn5Ch6bzhzsbeg+3u7qwQrBHgN8OVVGmIRFuU/SIQwLhQbvkNG g/IVEoO0UNnDzvrc9eev5j0QWjmHFnjKd1v5BFIcJpTUmoMQ7WQtFA5IC903JcRJ6uFO f8kD6Jj0WksmbzyM+dh5EFf/Wi87AqkzQuY1FDiWLus+rpjpKV05VGVlHzL7LBM0cZrn VIor0f8uK6aBC+HdlVmQdKQ9htNVBP1SjyVmcHtHapzfR5lQtNualj+I3ZFu+NEjS26B lr2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eGQ39OwL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id t1-20020a170902e84100b001b8c824e826si909971plg.533.2023.09.27.09.15.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 09:15:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=eGQ39OwL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 5FE1D8246320; Wed, 27 Sep 2023 08:38:43 -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 S232975AbjI0Phj (ORCPT + 19 others); Wed, 27 Sep 2023 11:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232679AbjI0Pg3 (ORCPT ); Wed, 27 Sep 2023 11:36:29 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170E0CF5; Wed, 27 Sep 2023 08:36:24 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:672:46bd:3ec7:6cdf]) (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 79ECC6607356; Wed, 27 Sep 2023 16:36:22 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695828982; bh=vej0xyoaRLN25qHgld1P1pTyfPCEtxO7zlLcrG23sig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGQ39OwLaIm9EJms2W8ErEii3GkWljsCnHEI5DOInTuSCVf37BQsFawnqiYxkLuD0 PU9VunYfXQ1Ra1dxXITVZcUD53mr9h4Kb8l2Z50RoMR80+dOIf4NbX9qJt7O7adIzR VBKpDfqECg3c9e0YXI1HKek2UvZUi8ViQrBV0EV8BNzREKuNH+sMr3IhDOhNH2Sn9I rGDe6RazYfMlKoI3G3a2y48mCp1JRE8O7lgHj7ujX7bgoy7ArwZewBhXuLaAX3tvK6 XbVrJsyj8+QBRt7NC38VLiABVyFlQCtMyXZnx8M4ZTLTBFNMeTHFN7YlNhGF+rjDfU HpAhO1s5igRmw== 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 v8 31/53] media: coda: Stop direct calls to queue num_buffers field Date: Wed, 27 Sep 2023 17:35:36 +0200 Message-Id: <20230927153558.159278-32-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230927153558.159278-1-benjamin.gaignard@collabora.com> References: <20230927153558.159278-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 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: 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]); Wed, 27 Sep 2023 08:38:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778208012120279326 X-GMAIL-MSGID: 1778208012120279326 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; }