From patchwork Wed Aug 28 08:39:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 2850571 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B4697BF546 for ; Wed, 28 Aug 2013 08:40:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B153203ED for ; Wed, 28 Aug 2013 08:40:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25BC8203E8 for ; Wed, 28 Aug 2013 08:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755132Ab3H1Ijm (ORCPT ); Wed, 28 Aug 2013 04:39:42 -0400 Received: from mail-we0-f171.google.com ([74.125.82.171]:47006 "EHLO mail-we0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755106Ab3H1Iji (ORCPT ); Wed, 28 Aug 2013 04:39:38 -0400 Received: by mail-we0-f171.google.com with SMTP id p57so4854389wes.2 for ; Wed, 28 Aug 2013 01:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=Stav6g/H1otVibNX/zwxfr/ZurD5zREkWYxq9w/F78Y=; b=RBllHSakTy+OmTWktdYe6EVz6LS34c6Q22kvcUjwxV6/urL06AFFIaFTTrpP5Nkojj Oa30VxKAr7kvPU1X475f0Y+HWJaq8e2fexB3WSSfmvy5Ak11KkjmaTuubOmdFO+T6DmC roLHmicKAW5p0cOEW5VWYc8b5KmHk0Wk/pCbXVLvcPKMJ4sED6Ce6qKTuZzbLbmPDkhy RFvzCywISYCWu1XDY2otylhj6V6doP+01z9eTdoDBAyi50/0jvvfTimaFSrewP2ZPtaM /MevXaX9YZwlYATOqmgEECfFb8FX45WfqTqwFScih1Yhz7kM9gDvaMCy1dfT3jrn7PJM pB4A== X-Received: by 10.194.173.163 with SMTP id bl3mr18299064wjc.10.1377679177032; Wed, 28 Aug 2013 01:39:37 -0700 (PDT) Received: from localhost ([95.215.60.200]) by mx.google.com with ESMTPSA id bh5sm3250515wib.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 28 Aug 2013 01:39:36 -0700 (PDT) From: Ricardo Ribalda Delgado To: Pawel Osciak , Marek Szyprowski , Kyungmin Park , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Delgado Subject: [PATCH] videobuf2: Fix vb2_write prototype Date: Wed, 28 Aug 2013 10:39:29 +0200 Message-Id: <1377679169-9374-1-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP struct v4_file_operations defines the data param as const char __user *data but on vb2 is defined as char __user *data. This patch fixes the warnings produced by this. ie: drivers/qtec/qtec_xform.c:817:2: warning: initialization from incompatible pointer type [enabled by default] drivers/qtec/qtec_xform.c:817:2: warning: (near initialization for ‘qtec_xform_v4l_fops.write’) [enabled by default] Signed-off-by: Ricardo Ribalda Delgado Acked-by: Marek Szyprowski --- drivers/media/v4l2-core/videobuf2-core.c | 7 ++++--- include/media/videobuf2-core.h | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 9fc4bab..b3f86c1 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -2438,10 +2438,11 @@ size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, } EXPORT_SYMBOL_GPL(vb2_read); -size_t vb2_write(struct vb2_queue *q, char __user *data, size_t count, +size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, loff_t *ppos, int nonblocking) { - return __vb2_perform_fileio(q, data, count, ppos, nonblocking, 0); + return __vb2_perform_fileio(q, (char __user *) data, count, + ppos, nonblocking, 0); } EXPORT_SYMBOL_GPL(vb2_write); @@ -2595,7 +2596,7 @@ int vb2_fop_release(struct file *file) } EXPORT_SYMBOL_GPL(vb2_fop_release); -ssize_t vb2_fop_write(struct file *file, char __user *buf, +ssize_t vb2_fop_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct video_device *vdev = video_devdata(file); diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index d88a098..06ec850 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -388,7 +388,7 @@ unsigned long vb2_get_unmapped_area(struct vb2_queue *q, unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, loff_t *ppos, int nonblock); -size_t vb2_write(struct vb2_queue *q, char __user *data, size_t count, +size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, loff_t *ppos, int nonblock); /** @@ -488,7 +488,7 @@ int vb2_ioctl_expbuf(struct file *file, void *priv, int vb2_fop_mmap(struct file *file, struct vm_area_struct *vma); int vb2_fop_release(struct file *file); -ssize_t vb2_fop_write(struct file *file, char __user *buf, +ssize_t vb2_fop_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos); ssize_t vb2_fop_read(struct file *file, char __user *buf, size_t count, loff_t *ppos);