public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/media/common: remove unnecessary casts of void *
@ 2010-01-08 22:51 H Hartley Sweeten
  2010-01-29  4:59 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-01-08 22:51 UTC (permalink / raw)
  To: Linux Kernel, linux-media; +Cc: michael, mchehab

drivers/media/common: Remove unnecessary casts of void *

void pointers do not need to be cast to other pointer types.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Michael Hunold <michael@mihu.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>

---

 drivers/media/common/saa7146_vbi.c   |    6 +++---
 drivers/media/common/saa7146_video.c |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
index 74e2b56..301a795 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -3,7 +3,7 @@
 static int vbi_pixel_to_capture = 720 * 2;
 
 static int vbi_workaround(struct saa7146_dev *dev)
-{
+{.remove_casts.hhs~
 	struct saa7146_vv *vv = dev->vv_data;
 
 	u32          *cpu;
@@ -375,7 +375,7 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 
 static int vbi_open(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 
 	u32 arbtr_ctrl	= saa7146_read(dev, PCI_BT_V1);
 	int ret = 0;
@@ -437,7 +437,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
 
 static void vbi_close(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_vv *vv = dev->vv_data;
 	DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
 
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index becbaad..cfc8634 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1368,7 +1368,7 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 
 static int video_open(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_format *sfmt;
 
 	fh->video_fmt.width = 384;
@@ -1392,7 +1392,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
 
 static void video_close(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_vv *vv = dev->vv_data;
 	struct videobuf_queue *q = &fh->video_q;
 	int err;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers/media/common: remove unnecessary casts of void *
  2010-01-08 22:51 [PATCH] drivers/media/common: remove unnecessary casts of void * H Hartley Sweeten
@ 2010-01-29  4:59 ` Mauro Carvalho Chehab
  2010-01-29 16:44   ` H Hartley Sweeten
  0 siblings, 1 reply; 3+ messages in thread
From: Mauro Carvalho Chehab @ 2010-01-29  4:59 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, linux-media, michael

H Hartley Sweeten wrote:
> drivers/media/common: Remove unnecessary casts of void *
> 
> void pointers do not need to be cast to other pointer types.
> 

> diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
> index 74e2b56..301a795 100644
> --- a/drivers/media/common/saa7146_vbi.c
> +++ b/drivers/media/common/saa7146_vbi.c
> @@ -3,7 +3,7 @@
>  static int vbi_pixel_to_capture = 720 * 2;
>  
>  static int vbi_workaround(struct saa7146_dev *dev)
> -{
> +{.remove_casts.hhs~

What's this? It seems that your patch got corrupted somehow.

Cheers,
Mauro


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drivers/media/common: remove unnecessary casts of void *
  2010-01-29  4:59 ` Mauro Carvalho Chehab
@ 2010-01-29 16:44   ` H Hartley Sweeten
  0 siblings, 0 replies; 3+ messages in thread
From: H Hartley Sweeten @ 2010-01-29 16:44 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Kernel, linux-media, michael

On Thursday, January 28, 2010 9:59 PM, Mauro Carvalho Chehab wrote:
> H Hartley Sweeten wrote:
>> drivers/media/common: Remove unnecessary casts of void *
>> 
>> void pointers do not need to be cast to other pointer types.
>> 

>> diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
>> index 74e2b56..301a795 100644
>> --- a/drivers/media/common/saa7146_vbi.c
>> +++ b/drivers/media/common/saa7146_vbi.c
>> @@ -3,7 +3,7 @@
>>  static int vbi_pixel_to_capture = 720 * 2;
>>  
>>  static int vbi_workaround(struct saa7146_dev *dev)
>> -{
>> +{.remove_casts.hhs~
>
> What's this? It seems that your patch got corrupted somehow.

Oops... Not sure how that happened... Following is the corrected patch.




drivers/media/common: Remove unnecessary casts of void *

void pointers do not need to be cast to other pointer types.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Michael Hunold <michael@mihu.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>

---

 drivers/media/common/saa7146_vbi.c   |    4 ++--
 drivers/media/common/saa7146_video.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
index 74e2b56..8224c30 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -375,7 +375,7 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 
 static int vbi_open(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 
 	u32 arbtr_ctrl	= saa7146_read(dev, PCI_BT_V1);
 	int ret = 0;
@@ -437,7 +437,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file)
 
 static void vbi_close(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_vv *vv = dev->vv_data;
 	DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
 
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index becbaad..cfc8634 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -1368,7 +1368,7 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 
 static int video_open(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_format *sfmt;
 
 	fh->video_fmt.width = 384;
@@ -1392,7 +1392,7 @@ static int video_open(struct saa7146_dev *dev, struct file *file)
 
 static void video_close(struct saa7146_dev *dev, struct file *file)
 {
-	struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+	struct saa7146_fh *fh = file->private_data;
 	struct saa7146_vv *vv = dev->vv_data;
 	struct videobuf_queue *q = &fh->video_q;
 	int err;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-29 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 22:51 [PATCH] drivers/media/common: remove unnecessary casts of void * H Hartley Sweeten
2010-01-29  4:59 ` Mauro Carvalho Chehab
2010-01-29 16:44   ` H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox