Message ID | 20231109163512.179524-20-benjamin.gaignard@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp558924vqs; Thu, 9 Nov 2023 08:38:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGw8HsPeX0ecKcIVlqQc9+ta1dkDvTpww3eIZgUNagLQIwIF2MgeUo4RMKdZ0jMMl+GckuY X-Received: by 2002:a17:90b:3842:b0:27d:661f:59ac with SMTP id nl2-20020a17090b384200b0027d661f59acmr2094306pjb.38.1699547935094; Thu, 09 Nov 2023 08:38:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699547935; cv=none; d=google.com; s=arc-20160816; b=cxF5SFeV+txzb1bUsYhV/rnzTSVY9krtLJN/XOprRmzg3OQg+qIMXKSxaGTW76aSW8 pk+3GMmUoKZD4kYCDvbs3rFmm/VB1HdYG6eakmHrcWBI4imLKcRzT/5n6I7SJkTM0qeQ 1WDyAPs8uXO7mg/x0BZab9dZj0+G3KT8zFQIXsCFFMkqUU3FOPOEg46lyW5BOkaPoT2V GFvkcCDPihhyo1GfgwnuYKXyql7Q+Fy3/mksjd4kY7b8UrjGunkHUrgu4L2yz5dqwUkH LibUXaB+5N849qd2dlwBM5aoLz2TJ48Ijg0IcZ1UYxNGjF7ESwJHAAbxYI/EAGUwbCp3 UURw== 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=uOEzwapjFsYa+39QXLCA0vOjo2bCyxVuqBJ1gjKnayM=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=pzof25yuys490LBQCHRENilCpJ6N71DMakWQF3fm8GYDUyNghluOBVFrEsi6Am3Cjh Q0nG9WNdcmWfBZcvK/+a2TroB7xSVw5eRfaNxnKfuXfD86IMyurlWJINgMhwCw0R0c9t PHOKZfCbmY8s9mrL9fDxpLn9tDYuvrub2f5d34JmpIhkz2HthDU6g6gSLYUVqb+qZpX3 3j3gReiU9Q5yvyJqzBjLY78vwU7Zq5TPX+okjBEWLjKumxhkdgEHQcc8iJMMnQo4LEnQ /iZheXu/ua52FVFttcbuZEn7/nV8ZudMuCU2zrGIBBluE1y2sgS1UkrL/f4bzgpSriO2 Iuag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HsNH8W0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id l22-20020a17090a409600b0027da14d150esi1920853pjg.187.2023.11.09.08.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 08:38:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HsNH8W0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 D2F95824509A; Thu, 9 Nov 2023 08:38:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344331AbjKIQiF (ORCPT <rfc822;lhua1029@gmail.com> + 31 others); Thu, 9 Nov 2023 11:38:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344206AbjKIQh5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Nov 2023 11:37:57 -0500 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 5E15D384A; Thu, 9 Nov 2023 08:37:49 -0800 (PST) Received: from benjamin-XPS-13-9310.. (cola.collaboradmins.com [195.201.22.229]) (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 50BBC66076AC; Thu, 9 Nov 2023 16:37:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1699547868; bh=4RzVJeiaNWJl64ltMbZK/gliYakvNCXiKbj4cdjzk0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HsNH8W0xojhkRfYJMLXzC9+4KkuxDowhuPqSp4aVXN3GOoT6CzhbmBrOLqPSKdB7o VJCR4VM/JE4vRoXosfEccUoABdby1qMZ7f6GYjxn8metWxrCL64ThKrftmmlFyISnw AdfsRyV0cjqFKG3vxSMMiU4HuTGkMIiNQpyy0gske6xUjcTn5u8EwDNsEQxmE/55/p 65OenSfIfskA1/iZTHsvd+Z/kHicnw3CD4AnWlrYRz24KF7PwIA4yacDXfDIWp1h2W Z95N/n84zNwS8WbQLq/sNiGO2XRNTgkoix3EfK1prpRk2rWA/h58g4fA0/k09Zi7Dl 4u1cRQo1OUgUw== 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 v15 19/56] media: dvb-core: Do not initialize twice queue num_buffer field Date: Thu, 9 Nov 2023 17:34:35 +0100 Message-Id: <20231109163512.179524-20-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231109163512.179524-14-benjamin.gaignard@collabora.com> References: <20231109163512.179524-14-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 (agentk.vger.email [0.0.0.0]); Thu, 09 Nov 2023 08:38:43 -0800 (PST) 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782105175686005242 X-GMAIL-MSGID: 1782105175686005242 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Nov. 9, 2023, 4:34 p.m. UTC
The above memset already zeroed all the ctx fields, it is useless
to do it here again.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/dvb-core/dvb_vb2.c | 3 ---
1 file changed, 3 deletions(-)
Comments
W dniu 9.11.2023 o 17:34, Benjamin Gaignard pisze: > The above memset already zeroed all the ctx fields, it is useless > to do it here again. > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> > --- > drivers/media/dvb-core/dvb_vb2.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c > index 3a966fdf814c..167ff82a6fed 100644 > --- a/drivers/media/dvb-core/dvb_vb2.c > +++ b/drivers/media/dvb-core/dvb_vb2.c > @@ -167,8 +167,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking) > > memset(ctx, 0, sizeof(struct dvb_vb2_ctx)); > q->type = DVB_BUF_TYPE_CAPTURE; > - /**capture type*/ > - q->is_output = 0; > /**only mmap is supported currently*/ > q->io_modes = VB2_MMAP; > q->drv_priv = ctx; > @@ -177,7 +175,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking) > q->ops = &dvb_vb2_qops; > q->mem_ops = &vb2_vmalloc_memops; > q->buf_ops = &dvb_vb2_buf_ops; > - q->num_buffers = 0; > ret = vb2_core_queue_init(q); > if (ret) { > ctx->state = DVB_VB2_STATE_NONE;
diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c index 3a966fdf814c..167ff82a6fed 100644 --- a/drivers/media/dvb-core/dvb_vb2.c +++ b/drivers/media/dvb-core/dvb_vb2.c @@ -167,8 +167,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking) memset(ctx, 0, sizeof(struct dvb_vb2_ctx)); q->type = DVB_BUF_TYPE_CAPTURE; - /**capture type*/ - q->is_output = 0; /**only mmap is supported currently*/ q->io_modes = VB2_MMAP; q->drv_priv = ctx; @@ -177,7 +175,6 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking) q->ops = &dvb_vb2_qops; q->mem_ops = &vb2_vmalloc_memops; q->buf_ops = &dvb_vb2_buf_ops; - q->num_buffers = 0; ret = vb2_core_queue_init(q); if (ret) { ctx->state = DVB_VB2_STATE_NONE;