Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5582635img; Wed, 27 Mar 2019 11:07:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHo5neKJAVOd+elrelvwdjwjFFaLCdEWI8eK5dxunMs/RYLkGFX6D+eTOZCKI5v14ZqbV7 X-Received: by 2002:a17:902:b10c:: with SMTP id q12mr20949883plr.254.1553710047666; Wed, 27 Mar 2019 11:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553710047; cv=none; d=google.com; s=arc-20160816; b=pUbh58EE/VWfYBz2pvZq2kapSSsHpmR/0Do554yXJRwMAlDoHXAoyup31j7j3FtOri 7EBrshIJK/w+birf9Iqbpx+I9HTHDFYM4R0RNv66fTMFwIiYOFY/BhX7dY4ptLOJWQei ITIIzPrvKxEAILyo+794zzpCO6YIwta6+o7qjyqRLP+IvsTbDxsogGbxDXOguNL8XIgL /syakbOjSfm+0UiBfnTxJZGo4JPnmc7lfwlaJP/K7vpIdvh/QC8ITggXhIR1bw06k3OC 7S9kiwihEZic9P3mv/kjU9x4f4/GM69is5/E1ZM8x839lajBmBRbt/YmzZo0qtMIxXVw jhBg== 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=XEaET0DrN43f9WDGyhiiHOlfTxgl6518/WrjQNPNo4A=; b=a/0gBbl7XUQY1PEl7d/0auyyBym9g9JVNgG3TDiaMXpIBKyYi6n7q47aOYZ/tE6Wn/ m21KHIXRxTUwpH0wVz9WFiMTuWFkT9cEy9YlJi6udRuMqcumn3JdgcnkEHIKK2/4z1f+ vbYV89SPNRFbl8YHFwkK/ateR27vRgoxPpgV6XaFqrkhBVlwzVTqcyR3Uex1/AspszWQ 8SiMMyF+oj9S9ATsTe9FuuLo8fXDDEFVSkoeyar0EJsxOHNozQh58NBlWF/RL71iKhoz 2mTM1fpPABk8Ic4fuCztjaeUyrOFVtMMZvldXVmfSL4o6gl72Rophz2abXEKIZa9LvED 9+fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AXWFvlub; 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 h20si17945789pgv.388.2019.03.27.11.07.12; Wed, 27 Mar 2019 11:07:27 -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=AXWFvlub; 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 S2387779AbfC0SFs (ORCPT + 99 others); Wed, 27 Mar 2019 14:05:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:46920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732806AbfC0SFj (ORCPT ); Wed, 27 Mar 2019 14:05:39 -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 27FE02063F; Wed, 27 Mar 2019 18:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709939; bh=rEeIU3O2MmD4cJ+H6PgyiC7UbtR4wImXCiT1Gxl3xik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AXWFvlubbQBDID5+o4iDg6Gqjc7PecSBLXMJY7TjxDmFd2iEHnDnAZSYtsalnThmW Q229Bi+lYqSSofH3WeJJSzjD79xgeYDszWDFZu4Hd4EnRBAnFT3apV3o50YGK5LokL c6REdJER73mPH8+0MxN0eRwWiBaR+m/tgpKu63z4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ezequiel Garcia , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.0 123/262] media: s5p-g2d: Correct return type for mem2mem buffer helpers Date: Wed, 27 Mar 2019 13:59:38 -0400 Message-Id: <20190327180158.10245-123-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 30fa627b32230737bc3f678067e2adfecf956987 ] 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/s5p-g2d/g2d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index 57ab1d1085d1..971c47165010 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -513,7 +513,7 @@ static void device_run(void *prv) { struct g2d_ctx *ctx = prv; struct g2d_dev *dev = ctx->dev; - struct vb2_buffer *src, *dst; + struct vb2_v4l2_buffer *src, *dst; unsigned long flags; u32 cmd = 0; @@ -528,10 +528,10 @@ static void device_run(void *prv) spin_lock_irqsave(&dev->ctrl_lock, flags); g2d_set_src_size(dev, &ctx->in); - g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(src, 0)); + g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0)); g2d_set_dst_size(dev, &ctx->out); - g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(dst, 0)); + g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0)); g2d_set_rop4(dev, ctx->rop); g2d_set_flip(dev, ctx->flip); -- 2.19.1