Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5597650img; Wed, 27 Mar 2019 11:23:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy2vhoJ5k+pjCfZYEhC4SaOBGepRUrRg1FytslOyYb2tHAWfrGKAs7i9/+0a6QTWYYDqvv X-Received: by 2002:a17:902:2aa6:: with SMTP id j35mr38146082plb.56.1553711036573; Wed, 27 Mar 2019 11:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553711036; cv=none; d=google.com; s=arc-20160816; b=Rm10zjbPg7A+sX6bkkRToFAFNWeKVOVBv2hEy5XmS7rDNLuLToFeVWdxIZ+uUlu4QY fPVqc4qmSpfqouwHfpY7LbYzDaoL8m5W1tZpyRSxD5b7t2M/MeAgJqSQzN7VWo06HK1p 8ke+oM0AH9nk7cquR4JX/lbj4u2mHgMGvQrdwwZTZt/u6GkNu6acTzYvA9skX4Xi+zMs +XxBbOKncS1W1axSo8WK80yr0LHnhuYPJV9/gB5wNxS6lpIvtUXiBrWQ2bPkUidIfLYX Zu16V5mHR862j2sg6+PZsMl2urxWN3tqIw05WtXO5ZEp7XMoGPRXO2cxMkAnXfEg4jG0 z7Gw== 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=N6wYVdFKPYt5FZPZoEbgjbrWYlHFjYXjFIIxLbzcgjg=; b=CfzKjMrxge70D0NEIWk/vdblm0uhnvOLPY1rzLie6PfCucRO9LeMRMs5OO2NG0qLd9 tFImsWSRgTGCK4MBDW4jebhfqDk7y6O+Eln8Fxx2ZTR3rI6PmDpgJ72o6WwLFLMSS455 4dFdChddtgsKn3s+YOzw8mgMAQ8haVpnCuzJJLByMlPwuQSiVWxC2J/HAefXliy3anYt HJSIRQ5FQS7vvh8EOI3y333hQg2VX9B3mHv4xynfHovX4u1yZCOfMM3+r4IsExTLvdYR JlCthwJJp7wByNNSosBhEeRiO7GfF0YSMjssXIwOqsbNq4LqWd56unHtsXCs1iJkvzKX /N0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xMrBGur6; 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 e14si626749pff.76.2019.03.27.11.23.41; Wed, 27 Mar 2019 11:23:56 -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=xMrBGur6; 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 S2390941AbfC0SVx (ORCPT + 99 others); Wed, 27 Mar 2019 14:21:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:39778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391235AbfC0SVt (ORCPT ); Wed, 27 Mar 2019 14:21:49 -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 EEF71217F5; Wed, 27 Mar 2019 18:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710908; bh=MPeXvPWDNl2rzvzBVR1AX/dqzaRdTDe9j5q8bfyQsXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xMrBGur6d3cKuSKLeT7ky7GNk3Fjc3ddUwrc7/Tw6YiRBGtHdb6AncrcyECv9TNNx OI6Cl2HMKnT2jwQwEAIgZfrw8XN+QMpIfll2LbZ9TtOUTwbBqMd+/00HtkNQVNmpdm n0K7mdZ1iZPPU1S2gaspeff/LZMtRx+1j/Ovvnbg= 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 4.9 41/87] media: s5p-g2d: Correct return type for mem2mem buffer helpers Date: Wed, 27 Mar 2019 14:19:54 -0400 Message-Id: <20190327182040.17444-41-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 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 62c0dec30b59..5f6ccf492111 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -498,7 +498,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; @@ -513,10 +513,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