Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4484330imb; Wed, 6 Mar 2019 14:46:04 -0800 (PST) X-Google-Smtp-Source: APXvYqydRcu4uppYqurzmSHJZ3ZI3i6I9BomFjCYoPHPkVqEeU+P6gIik7tZq59xiawFql2SMWK7 X-Received: by 2002:a65:6283:: with SMTP id f3mr8504352pgv.125.1551912364065; Wed, 06 Mar 2019 14:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551912364; cv=none; d=google.com; s=arc-20160816; b=NPektznYd1lzjs5QevnAEadwg6fShtWKjGaU5oURh5NmtzkHGhPM9nMxKEb1zUMZWP J15NnBIBMZxpH49iYPHwKAKgfcc/POxYPgrRHElRuUQzQgXTSvfE3bbDLYZeo95FCa8J er2dhDFCNeK1BccfHvoPPgAjwrNMiXrITapilFovQXZGmyjVUqYa6j4Yj6WXTQrSrP44 dnk0w76GbUOP6K0SyoPZpRrD52F67DjO49MS+YV8SMSXjyBYekxnBmCL9uEFOp40P+lK Q3rv6VU9CQjYm3lNmMvap0RzxzUgnzkzfUNvvBDE8sG9UwUZ751tUdmPab8LM7xTr+9p OpYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=V7CXYC4FlwhIZXdYVEI7fjbmHMlY2MhItZf9Eemy1MY=; b=mhvarrlsp86/cjb15k+BnkVl+8BraFL9cz7iPPOhCaAu7cqhCYj7+dG2NJxiw+brTi RWP9v/XRDjlvS2fNC/Y5J6MLfDJUpe1iRz3lWcdIaNsJxkeMmIV82rYG3uE9rAJRnUFw PGOqQeGKJPT8N7Y05tN6ogYpIqcFhFemz7zQlBY7tWTS6Im24tphA+LGNDNa/u4mmhG3 DRVleEZWtWXlF3/T/4/wV2xEmeVsCEFTf97Dv+AmVxgMApuNYJsxDnyHlj+C+s174NlR 3NgfF4rOyFOn6dyhaqwgFZQZWPhPaohobwpnTD/vokh26yglml9hD6F+sybiJzKHmJMV NWwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si2493113plt.120.2019.03.06.14.45.48; Wed, 06 Mar 2019 14:46:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbfCFWni (ORCPT + 99 others); Wed, 6 Mar 2019 17:43:38 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60870 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfCFWni (ORCPT ); Wed, 6 Mar 2019 17:43:38 -0500 Received: from localhost.localdomain (unknown [IPv6:2804:431:9719:798c:6bb0:a97a:4a09:e6d8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: koike) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id B1EF928036E; Wed, 6 Mar 2019 22:43:28 +0000 (GMT) From: Helen Koike To: linux-media@vger.kernel.org Cc: lucmaga@gmail.com, linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com, Hans Verkuil , kernel@collabora.com Subject: [PATCH 5/8] media: vimc: stream: cleanup frame field from struct vimc_stream Date: Wed, 6 Mar 2019 19:42:41 -0300 Message-Id: <20190306224244.21070-6-helen.koike@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190306224244.21070-1-helen.koike@collabora.com> References: <20190306224244.21070-1-helen.koike@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to have the frame field in the vimc_stream struct. Signed-off-by: Helen Koike --- drivers/media/platform/vimc/vimc-streamer.c | 10 ++++------ drivers/media/platform/vimc/vimc-streamer.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c index 392754c18046..b7c1fdef5f0d 100644 --- a/drivers/media/platform/vimc/vimc-streamer.c +++ b/drivers/media/platform/vimc/vimc-streamer.c @@ -117,6 +117,7 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream, static int vimc_streamer_thread(void *data) { struct vimc_stream *stream = data; + u8 *frame = NULL; int i; set_freezable(); @@ -127,12 +128,9 @@ static int vimc_streamer_thread(void *data) break; for (i = stream->pipe_size - 1; i >= 0; i--) { - stream->frame = stream->ved_pipeline[i]->process_frame( - stream->ved_pipeline[i], - stream->frame); - if (!stream->frame) - break; - if (IS_ERR(stream->frame)) + frame = stream->ved_pipeline[i]->process_frame( + stream->ved_pipeline[i], frame); + if (!frame || IS_ERR(frame)) break; } //wait for 60hz diff --git a/drivers/media/platform/vimc/vimc-streamer.h b/drivers/media/platform/vimc/vimc-streamer.h index 752af2e2d5a2..dc1d0be431cb 100644 --- a/drivers/media/platform/vimc/vimc-streamer.h +++ b/drivers/media/platform/vimc/vimc-streamer.h @@ -19,7 +19,6 @@ struct vimc_stream { struct media_pipeline pipe; struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE]; unsigned int pipe_size; - u8 *frame; struct task_struct *kthread; }; -- 2.20.1