Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5582577img; Wed, 27 Mar 2019 11:07:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8sKdmsvH/CHdasDH2sqyy6Ju+jK/CsFQiZiUesU8LfJc/Lvn2mLNje4NzpH8KVVv90hRJ X-Received: by 2002:a17:902:b217:: with SMTP id t23mr38923438plr.184.1553710043052; Wed, 27 Mar 2019 11:07:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710043; cv=none; d=google.com; s=arc-20160816; b=Zl2Z0uVbWrSAhm2raPd4V/VQWYrTNMw1MmNMsYIwpYqIcSLwhSgHOptZEbG3mXZZqa K6tcFmJbsMo6YGiB4wbRDXX5L+Bgs//V7RAcHBiuEsont2GNrBThXCBDyeZ5x4s3k4sa gPk9DDrbQO8s08R895g3qvrz/PDAgn8rncXTf3l5So4yp9G2VbH2n8dt7yBs3WdolHXf spU09HB6JEcza5xcq4a/pGhnh8CMH2Zpy0TTY1qIXd0M1xPwPzdbjZSl4Of3u9cI4dB4 rorChv+bRiN2CjSCz17oFnVDmuebjMlthvDZ2UUek/kyZKGH/3AjI/rOXUVEpKh54n01 jaTg== 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=WecxPpzFNCgUn/LHqUHrrPi3w4/Y33594iR4yPIwKM8=; b=hxrsX7KBGY2peNOLOo+sg0vXZeOCJm8+DxfMvkDg3EMmUPYUY5uL7tNPgcK739bnGB haOrilM3ijCi47dajbocrxP7rkgegg4g2KEjNyTmMduofQVofDEbCPPfgNywgKxhkP/R z8e7F91Jwsl7pXBo8OCkhd3fzuQCuNcZFlw5A18ebSjf5xZUcIQh2F9XdU0x2cihL8dE VVomLdeyA5dBMwjkxvWVr0fdtsxAw3AFRKnAHNIUQW6JiTCXP3uBl1rdDHeYxYBauUHK zRBg3GgL0/XHqkHkaBFXOyD4whHD1dRUGp2v+ZD7NSmh+tRM0nz3K/bbRERXKg0+HMwc 5vcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DVyhYy7R; 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 94si20374887plc.298.2019.03.27.11.07.07; Wed, 27 Mar 2019 11:07:23 -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=DVyhYy7R; 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 S2387770AbfC0SFo (ORCPT + 99 others); Wed, 27 Mar 2019 14:05:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:46978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731362AbfC0SFm (ORCPT ); Wed, 27 Mar 2019 14:05:42 -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 BC7E2217F5; Wed, 27 Mar 2019 18:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709941; bh=MpydZQhZGiUeA+gEcjSa7yVW8upX/+n7cgb4XYRmbjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVyhYy7RjedFfbZu34n9BgtzQwq6ohfsrrKP+pGXsjoET2dgE6WaV/dqTpaVme670 mGeoWy0wsCwc3s3Meq72pZ3WMs/M3I4ww9GNa1WGZ5DLyeQ7ykTx+nNqkWmooKUS4M +xR3SKkIfR1I/aJa571cA2Un99Wp5n9vgRWR38xQ= 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 5.0 124/262] media: mx2_emmaprp: Correct return type for mem2mem buffer helpers Date: Wed, 27 Mar 2019 13:59:39 -0400 Message-Id: <20190327180158.10245-124-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-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 27b078cf98e3..f60f499c596b 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -274,7 +274,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; @@ -294,8 +294,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