All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v0] media: i2c: fix the erroneous pointer initializer
@ 2022-07-22  2:24 ` Lin Ma
  0 siblings, 0 replies; 6+ messages in thread
From: Lin Ma @ 2022-07-22  2:24 UTC (permalink / raw)
  To: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Lin Ma

There are obvious errors for the initializer of ov02a10_i2c_driver,
ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
"address of function pointer" to function pointer. This patch fixes them
by removing redundant & operators.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
---
 drivers/media/i2c/ov02a10.c | 4 ++--
 drivers/media/i2c/ov2685.c  | 4 ++--
 drivers/media/i2c/ov5695.c  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 0f08c05333ea..5d205454ca4e 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -1004,8 +1004,8 @@ static struct i2c_driver ov02a10_i2c_driver = {
 		.pm = &ov02a10_pm_ops,
 		.of_match_table = ov02a10_of_match,
 	},
-	.probe_new	= &ov02a10_probe,
-	.remove		= &ov02a10_remove,
+	.probe_new	= ov02a10_probe,
+	.remove		= ov02a10_remove,
 };
 module_i2c_driver(ov02a10_i2c_driver);
 
diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index b6e010ea3249..4b9f4f3a0194 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -832,8 +832,8 @@ static struct i2c_driver ov2685_i2c_driver = {
 		.pm = &ov2685_pm_ops,
 		.of_match_table = of_match_ptr(ov2685_of_match),
 	},
-	.probe		= &ov2685_probe,
-	.remove		= &ov2685_remove,
+	.probe		= ov2685_probe,
+	.remove		= ov2685_remove,
 };
 
 module_i2c_driver(ov2685_i2c_driver);
diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
index 910309783885..59da66f4f810 100644
--- a/drivers/media/i2c/ov5695.c
+++ b/drivers/media/i2c/ov5695.c
@@ -1395,8 +1395,8 @@ static struct i2c_driver ov5695_i2c_driver = {
 		.pm = &ov5695_pm_ops,
 		.of_match_table = of_match_ptr(ov5695_of_match),
 	},
-	.probe		= &ov5695_probe,
-	.remove		= &ov5695_remove,
+	.probe		= ov5695_probe,
+	.remove		= ov5695_remove,
 };
 
 module_i2c_driver(ov5695_i2c_driver);
-- 
2.36.1


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

* [PATCH v0] media: i2c: fix the erroneous pointer initializer
@ 2022-07-22  2:24 ` Lin Ma
  0 siblings, 0 replies; 6+ messages in thread
From: Lin Ma @ 2022-07-22  2:24 UTC (permalink / raw)
  To: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek
  Cc: Lin Ma

There are obvious errors for the initializer of ov02a10_i2c_driver,
ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
"address of function pointer" to function pointer. This patch fixes them
by removing redundant & operators.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
---
 drivers/media/i2c/ov02a10.c | 4 ++--
 drivers/media/i2c/ov2685.c  | 4 ++--
 drivers/media/i2c/ov5695.c  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/media/i2c/ov02a10.c b/drivers/media/i2c/ov02a10.c
index 0f08c05333ea..5d205454ca4e 100644
--- a/drivers/media/i2c/ov02a10.c
+++ b/drivers/media/i2c/ov02a10.c
@@ -1004,8 +1004,8 @@ static struct i2c_driver ov02a10_i2c_driver = {
 		.pm = &ov02a10_pm_ops,
 		.of_match_table = ov02a10_of_match,
 	},
-	.probe_new	= &ov02a10_probe,
-	.remove		= &ov02a10_remove,
+	.probe_new	= ov02a10_probe,
+	.remove		= ov02a10_remove,
 };
 module_i2c_driver(ov02a10_i2c_driver);
 
diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c
index b6e010ea3249..4b9f4f3a0194 100644
--- a/drivers/media/i2c/ov2685.c
+++ b/drivers/media/i2c/ov2685.c
@@ -832,8 +832,8 @@ static struct i2c_driver ov2685_i2c_driver = {
 		.pm = &ov2685_pm_ops,
 		.of_match_table = of_match_ptr(ov2685_of_match),
 	},
-	.probe		= &ov2685_probe,
-	.remove		= &ov2685_remove,
+	.probe		= ov2685_probe,
+	.remove		= ov2685_remove,
 };
 
 module_i2c_driver(ov2685_i2c_driver);
diff --git a/drivers/media/i2c/ov5695.c b/drivers/media/i2c/ov5695.c
index 910309783885..59da66f4f810 100644
--- a/drivers/media/i2c/ov5695.c
+++ b/drivers/media/i2c/ov5695.c
@@ -1395,8 +1395,8 @@ static struct i2c_driver ov5695_i2c_driver = {
 		.pm = &ov5695_pm_ops,
 		.of_match_table = of_match_ptr(ov5695_of_match),
 	},
-	.probe		= &ov5695_probe,
-	.remove		= &ov5695_remove,
+	.probe		= ov5695_probe,
+	.remove		= ov5695_remove,
 };
 
 module_i2c_driver(ov5695_i2c_driver);
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v0] media: i2c: fix the erroneous pointer initializer
  2022-07-22  2:24 ` Lin Ma
@ 2022-07-22  3:08   ` Lin Ma
  -1 siblings, 0 replies; 6+ messages in thread
From: Lin Ma @ 2022-07-22  3:08 UTC (permalink / raw)
  To: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hello there,


> 
> There are obvious errors for the initializer of ov02a10_i2c_driver,
> ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
> "address of function pointer" to function pointer. This patch fixes them
> by removing redundant & operators.
> 
> Signed-off-by: Lin Ma <linma@zju.edu.cn>

Sorry as this is a false alarm :(
I just get confused by the function pointers and function addresses and
the original code works fine.

Regards
Lin

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

* Re: [PATCH v0] media: i2c: fix the erroneous pointer initializer
@ 2022-07-22  3:08   ` Lin Ma
  0 siblings, 0 replies; 6+ messages in thread
From: Lin Ma @ 2022-07-22  3:08 UTC (permalink / raw)
  To: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hello there,


> 
> There are obvious errors for the initializer of ov02a10_i2c_driver,
> ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
> "address of function pointer" to function pointer. This patch fixes them
> by removing redundant & operators.
> 
> Signed-off-by: Lin Ma <linma@zju.edu.cn>

Sorry as this is a false alarm :(
I just get confused by the function pointers and function addresses and
the original code works fine.

Regards
Lin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v0] media: i2c: fix the erroneous pointer initializer
  2022-07-22  3:08   ` Lin Ma
@ 2022-07-23  9:17     ` Sakari Ailus
  -1 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2022-07-23  9:17 UTC (permalink / raw)
  To: Lin Ma
  Cc: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi Lin,

On Fri, Jul 22, 2022 at 11:08:01AM +0800, Lin Ma wrote:
> Hello there,
> 
> 
> > 
> > There are obvious errors for the initializer of ov02a10_i2c_driver,
> > ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
> > "address of function pointer" to function pointer. This patch fixes them
> > by removing redundant & operators.
> > 
> > Signed-off-by: Lin Ma <linma@zju.edu.cn>
> 
> Sorry as this is a false alarm :(
> I just get confused by the function pointers and function addresses and
> the original code works fine.

Thanks for the patch.

The original code works fine but functions are always by reference, the
preference is without &.

First patch version is typically 1 and there's no need to denote that.

-- 
Regards,

Sakari Ailus

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

* Re: [PATCH v0] media: i2c: fix the erroneous pointer initializer
@ 2022-07-23  9:17     ` Sakari Ailus
  0 siblings, 0 replies; 6+ messages in thread
From: Sakari Ailus @ 2022-07-23  9:17 UTC (permalink / raw)
  To: Lin Ma
  Cc: dongchun.zhu, zhengsq, mchehab, matthias.bgg, linux-media,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hi Lin,

On Fri, Jul 22, 2022 at 11:08:01AM +0800, Lin Ma wrote:
> Hello there,
> 
> 
> > 
> > There are obvious errors for the initializer of ov02a10_i2c_driver,
> > ov2682_i2c_driver, and ov5695_i2c_driver as the code intended to assign
> > "address of function pointer" to function pointer. This patch fixes them
> > by removing redundant & operators.
> > 
> > Signed-off-by: Lin Ma <linma@zju.edu.cn>
> 
> Sorry as this is a false alarm :(
> I just get confused by the function pointers and function addresses and
> the original code works fine.

Thanks for the patch.

The original code works fine but functions are always by reference, the
preference is without &.

First patch version is typically 1 and there's no need to denote that.

-- 
Regards,

Sakari Ailus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-07-23  9:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22  2:24 [PATCH v0] media: i2c: fix the erroneous pointer initializer Lin Ma
2022-07-22  2:24 ` Lin Ma
2022-07-22  3:08 ` Lin Ma
2022-07-22  3:08   ` Lin Ma
2022-07-23  9:17   ` Sakari Ailus
2022-07-23  9:17     ` Sakari Ailus

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.