All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Tiffany Lin <tiffany.lin@mediatek.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	daniel.thompson@linaro.org, Rob Herring <robh+dt@kernel.org>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Daniel Kurtz <djkurtz@chromium.org>,
	Pawel Osciak <posciak@chromium.org>,
	Eddie Huang <eddie.huang@mediatek.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org,
	PoChun.Lin@mediatek.com,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	kbuild-all@01.org
Subject: [PATCH] VPU: mediatek: fix simple_open.cocci warnings
Date: Fri, 22 Apr 2016 15:12:19 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1604221509350.2872@hadrien> (raw)

Remove an open coded simple_open() function
and replace file operations references to the function
with simple_open() instead.

Generated by: scripts/coccinelle/api/simple_open.cocci

CC: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

I'm just passing this along.  Simple_open additionally has a check that
inode->i_private is not NULL, before doing the assignment.  I don't know
if that difference is important in this case.

base:   git://linuxtv.org/media_tree.git master

 mtk_vpu.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -599,11 +599,6 @@ static void vpu_init_ipi_handler(void *d
 }

 #ifdef CONFIG_DEBUG_FS
-static int vpu_debug_open(struct inode *inode, struct file *file)
-{
-	file->private_data = inode->i_private;
-	return 0;
-}

 static ssize_t vpu_debug_read(struct file *file, char __user *user_buf,
 			      size_t count, loff_t *ppos)
@@ -646,7 +641,7 @@ static ssize_t vpu_debug_read(struct fil
 }

 static const struct file_operations vpu_debug_fops = {
-	.open = vpu_debug_open,
+	.open = simple_open,
 	.read = vpu_debug_read,
 };
 #endif /* CONFIG_DEBUG_FS */

WARNING: multiple messages have this Message-ID (diff)
From: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
To: Tiffany Lin <tiffany.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Hans Verkuil
	<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
	Matthias Brugger
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Daniel Kurtz <djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Pawel Osciak <posciak-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Eddie Huang <eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Yingjoe Chen
	<yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	PoChun.Lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	Andrew-CT Chen
	<andrew-ct.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	kbuild-all-JC7UmRfGjtg@public.gmane.org
Subject: [PATCH] VPU: mediatek: fix simple_open.cocci warnings
Date: Fri, 22 Apr 2016 15:12:19 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1604221509350.2872@hadrien> (raw)

Remove an open coded simple_open() function
and replace file operations references to the function
with simple_open() instead.

Generated by: scripts/coccinelle/api/simple_open.cocci

CC: Andrew-CT Chen <andrew-ct.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
---

I'm just passing this along.  Simple_open additionally has a check that
inode->i_private is not NULL, before doing the assignment.  I don't know
if that difference is important in this case.

base:   git://linuxtv.org/media_tree.git master

 mtk_vpu.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -599,11 +599,6 @@ static void vpu_init_ipi_handler(void *d
 }

 #ifdef CONFIG_DEBUG_FS
-static int vpu_debug_open(struct inode *inode, struct file *file)
-{
-	file->private_data = inode->i_private;
-	return 0;
-}

 static ssize_t vpu_debug_read(struct file *file, char __user *user_buf,
 			      size_t count, loff_t *ppos)
@@ -646,7 +641,7 @@ static ssize_t vpu_debug_read(struct fil
 }

 static const struct file_operations vpu_debug_fops = {
-	.open = vpu_debug_open,
+	.open = simple_open,
 	.read = vpu_debug_read,
 };
 #endif /* CONFIG_DEBUG_FS */
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: julia.lawall@lip6.fr (Julia Lawall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] VPU: mediatek: fix simple_open.cocci warnings
Date: Fri, 22 Apr 2016 15:12:19 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1604221509350.2872@hadrien> (raw)

Remove an open coded simple_open() function
and replace file operations references to the function
with simple_open() instead.

Generated by: scripts/coccinelle/api/simple_open.cocci

CC: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

I'm just passing this along.  Simple_open additionally has a check that
inode->i_private is not NULL, before doing the assignment.  I don't know
if that difference is important in this case.

base:   git://linuxtv.org/media_tree.git master

 mtk_vpu.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -599,11 +599,6 @@ static void vpu_init_ipi_handler(void *d
 }

 #ifdef CONFIG_DEBUG_FS
-static int vpu_debug_open(struct inode *inode, struct file *file)
-{
-	file->private_data = inode->i_private;
-	return 0;
-}

 static ssize_t vpu_debug_read(struct file *file, char __user *user_buf,
 			      size_t count, loff_t *ppos)
@@ -646,7 +641,7 @@ static ssize_t vpu_debug_read(struct fil
 }

 static const struct file_operations vpu_debug_fops = {
-	.open = vpu_debug_open,
+	.open = simple_open,
 	.read = vpu_debug_read,
 };
 #endif /* CONFIG_DEBUG_FS */

             reply	other threads:[~2016-04-22 13:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 13:12 Julia Lawall [this message]
2016-04-22 13:12 ` [PATCH] VPU: mediatek: fix simple_open.cocci warnings Julia Lawall
2016-04-22 13:12 ` Julia Lawall
2016-04-25 12:42 ` andrew-ct chen
2016-04-25 12:42   ` andrew-ct chen
2016-04-25 12:42   ` andrew-ct chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1604221509350.2872@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=PoChun.Lin@mediatek.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djkurtz@chromium.org \
    --cc=eddie.huang@mediatek.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kbuild-all@01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@osg.samsung.com \
    --cc=posciak@chromium.org \
    --cc=robh+dt@kernel.org \
    --cc=tiffany.lin@mediatek.com \
    --cc=yingjoe.chen@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.