Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5614151img; Wed, 27 Mar 2019 11:44:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl8FRAKk3VBvVF7AQI3dmqG+HPQszTGrmR12QVu3SOW+SDPzOPKGwQ/t/QOeminVoFoRsl X-Received: by 2002:aa7:8694:: with SMTP id d20mr36310232pfo.81.1553712264241; Wed, 27 Mar 2019 11:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553712264; cv=none; d=google.com; s=arc-20160816; b=zKFogngudmGYGFbAw4raotoYvk+P4lcGmxhUm2AxO4obRWoqNNlFNG9gCJgMsPW62B 70w5A0Vtq9FFzURZMGliQCz480ACbYYitmnR81zw4FJ4PR9y+vIHWznIahlCPctCu0T6 LlpFC+5H0UEjbLE/noN0l8/0uxBLNLwvHXcy5hkHzafC+sHyjc9mowT7sBaJG9OJPSQE 0oiLhO5L3Uvfzg2v8/Atp8H6oG8pCrLFg2x1sWq0q1ixT9T2I9UwTsm681SGgmUR8RW9 0qjTQ4nTQaMnyshXFGDZrC3gpLRSrQdDGTOU8mnlaDfx3c1syDKspW9NyDNMDfY3DWkm Eu0A== 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 :dkim-signature; bh=NjJROjVq2Sxy3VeEMzoFTxW1oj5yOYvIbva6vwciNYg=; b=gWjob7313l29alhejM8Bqxg6/CgOIG0mlnimRdqbgW6tiTT/xvY2l+vSo8kXWp9KHA UuZXwKn37v4a1XPzrE/3eSOkTfO/u85wkbr8cnOvB/JAUvjUHy0gm/NutkHW2sAkx6lr VAD69XTpY6DuvyIrSyFqJ8GTbD87qK0DhxbYaZK9nsWx2Tw7Y/VmRSxpt20nv8bcVgsl /Lbdt3MSLCZZQjiUVmgP665Nuwvlt8MEYCOaiEJURhgHhcxKo0CnOS1FnM150D3V6YVW gx4Zb1HrImXz/SqfSVV/l/qTYaQ1hW1UyTXlrTTJS6BmEYVpfSQb2OOKAIB00isDoPFD er9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z7QWjEbn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si19434481plr.76.2019.03.27.11.44.08; Wed, 27 Mar 2019 11:44:24 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Z7QWjEbn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391567AbfC0Smq (ORCPT + 99 others); Wed, 27 Mar 2019 14:42:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:39824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390689AbfC0SVw (ORCPT ); Wed, 27 Mar 2019 14:21:52 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87BCD21738; Wed, 27 Mar 2019 18:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710911; bh=JjjoZCR+5qNZBkOkxuTOpvubcK9g2vxjOe910tjKSzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z7QWjEbnWjtphCKRGbyrNI3KVZ8KcM6anRBzdlhrrlRtJP0OJ10t7MRFDlUySG6c7 +YwFGpzOZbE4C3XNoRU5Lzg0GxJagj1Y9EctALuOTJrDB6wn0VedsTTg8jvzxhrLAN xmOo9v/mYpPE/vSOthA8mm8XfblhpQT6gRBNKyF0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ezequiel Garcia , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 42/87] media: mx2_emmaprp: Correct return type for mem2mem buffer helpers Date: Wed, 27 Mar 2019 14:19:55 -0400 Message-Id: <20190327182040.17444-42-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327182040.17444-1-sashal@kernel.org> References: <20190327182040.17444-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ezequiel Garcia [ Upstream commit 8d20dcefe471763f23ad538369ec65b51993ffff ] Fix the assigned type of mem2mem buffer handling API. Namely, these functions: v4l2_m2m_next_buf v4l2_m2m_last_buf v4l2_m2m_buf_remove v4l2_m2m_next_src_buf v4l2_m2m_next_dst_buf v4l2_m2m_last_src_buf v4l2_m2m_last_dst_buf v4l2_m2m_src_buf_remove v4l2_m2m_dst_buf_remove return a struct vb2_v4l2_buffer, and not a struct vb2_buffer. Fixing this is necessary to fix the mem2mem buffer handling API, changing the return to the correct struct vb2_v4l2_buffer instead of a void pointer. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/mx2_emmaprp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index e68d271b10af..8354ad20865a 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -288,7 +288,7 @@ static void emmaprp_device_run(void *priv) { struct emmaprp_ctx *ctx = priv; struct emmaprp_q_data *s_q_data, *d_q_data; - struct vb2_buffer *src_buf, *dst_buf; + struct vb2_v4l2_buffer *src_buf, *dst_buf; struct emmaprp_dev *pcdev = ctx->dev; unsigned int s_width, s_height; unsigned int d_width, d_height; @@ -308,8 +308,8 @@ static void emmaprp_device_run(void *priv) d_height = d_q_data->height; d_size = d_width * d_height; - p_in = vb2_dma_contig_plane_dma_addr(src_buf, 0); - p_out = vb2_dma_contig_plane_dma_addr(dst_buf, 0); + p_in = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0); + p_out = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0); if (!p_in || !p_out) { v4l2_err(&pcdev->v4l2_dev, "Acquiring kernel pointers to buffers failed\n"); -- 2.19.1