Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1025422yba; Thu, 4 Apr 2019 02:42:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7CBCgVlZFjjIlwFcJf36CauC4HbhDjZJGNKRmIxDEJV5QMyyEZgfxFj7pf5TuLsAhi13b X-Received: by 2002:a62:70c6:: with SMTP id l189mr4857987pfc.139.1554370942408; Thu, 04 Apr 2019 02:42:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370942; cv=none; d=google.com; s=arc-20160816; b=EgyDntWXKyZmQLJ4jx6AoVf9Cd3+YQG6COT+CjNRAMsidCUzk4QtUs5X5PSWGWKj4v caol9cKSOHk/o+vOEKxrA9yj4zV8vyzhYP7mdFZ3ckJLvUUbm5+YE4smTTTYYgtMlLue tLTqFxRa+u1cQKgSE28Rg/TVTXNIw9tlZdx5BbcNdl6KgjqbpEen50a+QrFO4uoZKH+G Mo5QiscnNWpNi4koYyOVYeZlsSsDi0WPNRZP957qwwbMoWY5NJ7WJIruf6LygZK6SHse 9P6hnC/ZYRZmS/RiRgO0wp95vVhStB4nHoCeNza70gHA1BfmtpnYnrQAyWn6AHbBwPx7 Mj4g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B7nPyjFnFVS/37HXGHj1EwJ2aLgFjCJzq4akSL2PY8U=; b=1JjREjDuN/Yav3EhrbTaVT53+X5CfE54ff+cj7uSa+26Dk0ycHXHa3nu5ajX+aRuJp /i6ejKWdiJuutQfAF1YUl1WLQk6QrFJzkMHxHGL6F0iuFPSiRXaELbxEZ5VB+JK8Ttoj YkEZCpn/QfTnA6tQdZHVJyzA+zJFnLkHCbj8CiE/NPRJqaooh8wsBTJkHqDsE2Me4oJ7 MSCmhgjDy4UZ3OAM5hb4Abi0ppKj1bGB7zLnEH7LokE0Avks7bBebfttQLhx2bCpk5K0 IlTeAtg4VJt6yFVwUyTqbcBSPgeZAIR9qkVtRMnD3cVTFGzPfuyQAB3fH3uL/FWgFwL/ 9gdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LeLxHtQg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n129si9684297pgn.580.2019.04.04.02.42.06; Thu, 04 Apr 2019 02:42:22 -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=LeLxHtQg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731804AbfDDJkX (ORCPT + 99 others); Thu, 4 Apr 2019 05:40:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:40420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731697AbfDDJCw (ORCPT ); Thu, 4 Apr 2019 05:02:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B1D521741; Thu, 4 Apr 2019 09:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368571; bh=OHQzKWDR2FCBa+vbVcnWwWDzx2z4Cb1id9fughz/uMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LeLxHtQgwnNxTN3+Mq5Fod4JXbazelZo9Ii9K+bouk0r5f7b4PWNYGnPVbn3Fj6Pv TpTJ1RxwAXyLcHgC/Mcfj79z0U552sJ0tU1DFnjPmAgrp0Wfhor0Res6Q8UE0D/bAb 5DsPsVWdG9Nos1seP6MSfofVfPhAm+3vJH6vy7iQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ezequiel Garcia , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.19 088/187] media: s5p-g2d: Correct return type for mem2mem buffer helpers Date: Thu, 4 Apr 2019 10:47:05 +0200 Message-Id: <20190404084607.206585581@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 e901201b6fcc..1f58574d0b96 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -487,7 +487,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; @@ -502,10 +502,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