Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5649250img; Wed, 27 Mar 2019 12:25:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7SIVe6N+zyoexdw8kVlDH6qbPwpsmmX23yWmes5YfsjMFWirBd3FvaedFiL3GlnzSVw7H X-Received: by 2002:a65:62c5:: with SMTP id m5mr35445579pgv.77.1553714730425; Wed, 27 Mar 2019 12:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714730; cv=none; d=google.com; s=arc-20160816; b=UsI/EIH9Wo+wGJcfJ5ySfKTPqJEv2hkPG4NnmP12TIxyU0fe9Q4Avp2xfS9dXFgzkr SQ4Bo3QqbHbWijhJwTqui1Ajbo2jHBWPBBbH8QJ7h/IRdCvaf8oJVbSYE4MsaSu3z150 wXzmUYJrVD0jiqxucDyOCmv3vdvoDQldbk7UM1t2bnSt+T+7nyX2ZZEF5XVMUVSuPr06 w5DwkQfAywnuTG7Egkl/YNqS7EY/b6REqabEHBLiuIK/oUzciujdlVCr5+Mjr+nZ5T9m JKdjHkGUl75T4pgP+jy8ABEBes1aFlWGoN6P+R1MFPZ3mithLDGve3m9x5/LHQB0fejj rSSA== 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=mMH24AwNd0N57dbRBUCe9+9HUOixf1PlqsTK7eNdtBw=; b=mS1pq88LiadwOMwCMdz+B8b74a0eDNFwU51tFlJt/WO2X08H9IurOC2M9PpE1El6FI jLVITsENfsTc0W+od1N5GD+uOvUS+z7Bb7bXmeAjRNtCQcc/5eYDBzPXCx8se5FpgkK0 Cfz/0+6GKXUQvw4rLn5cgSBK0EOv+BtjMe5iF+9ToJIfMRTrYQZsEK1x/++j+w/Y/FY5 tAnZDv7hRY75fubBFFpXZqrkFtJzcFGPxAlht8i6opyDcGSgkkh2tFPqB7As8A7ziKfT arln8EFtaa4GzUgWaA5k5vqXFgZrr8Bw/wstkZtNnEK76jnkxdkgzTQQdKd+8DMNUygP evuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=03FQsIkt; 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 b74si4764352pfj.121.2019.03.27.12.25.15; Wed, 27 Mar 2019 12:25:30 -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=03FQsIkt; 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 S2388033AbfC0TYm (ORCPT + 99 others); Wed, 27 Mar 2019 15:24:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:46876 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732798AbfC0SFi (ORCPT ); Wed, 27 Mar 2019 14:05:38 -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 D70C62183F; Wed, 27 Mar 2019 18:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553709937; bh=wikG804TxOisretLaSAwUANpYP6zzxgM2Acdk/4CjYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=03FQsIkthE454Om70XgFNBCrRHruYMjd+6vrlaumo/gIdE/U+V6Ls/isb/aIO/rCN 906XF+2dkCYhi0gCLZues5Uj5r9oWLKlsDuch6k0E0AaREzGHb0q0uQ2h6M/hbASeJ rfkn6ui6BK8RngSAxaN63MhBFdoiHEcfO/i9IrOE= 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, linux-rockchip@lists.infradead.org Subject: [PATCH AUTOSEL 5.0 122/262] media: rockchip/rga: Correct return type for mem2mem buffer helpers Date: Wed, 27 Mar 2019 13:59:37 -0400 Message-Id: <20190327180158.10245-122-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 da2d3a4e4adabc6ccfb100bc9abd58ee9cd6c4b7 ] 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/rockchip/rga/rga.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index 5c653287185f..b096227a9722 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -43,7 +43,7 @@ static void device_run(void *prv) { struct rga_ctx *ctx = prv; struct rockchip_rga *rga = ctx->rga; - struct vb2_buffer *src, *dst; + struct vb2_v4l2_buffer *src, *dst; unsigned long flags; spin_lock_irqsave(&rga->ctrl_lock, flags); @@ -53,8 +53,8 @@ static void device_run(void *prv) src = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx); dst = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx); - rga_buf_map(src); - rga_buf_map(dst); + rga_buf_map(&src->vb2_buf); + rga_buf_map(&dst->vb2_buf); rga_hw_start(rga); -- 2.19.1