All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] constify drm i2c_device_id
@ 2017-08-19 18:28 Arvind Yadav
  2017-08-19 18:28 ` [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id Arvind Yadav
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:28 UTC (permalink / raw)
  To: airlied, linux; +Cc: linux-kernel, dri-devel

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Arvind Yadav (3):
  [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id
  [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id
  [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id

 drivers/gpu/drm/i2c/ch7006_drv.c  | 2 +-
 drivers/gpu/drm/i2c/sil164_drv.c  | 2 +-
 drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4

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

* [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id
  2017-08-19 18:28 [PATCH 0/3] constify drm i2c_device_id Arvind Yadav
@ 2017-08-19 18:28 ` Arvind Yadav
  2017-08-19 18:28 ` [PATCH 2/3] drm: i2c: sil164: " Arvind Yadav
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:28 UTC (permalink / raw)
  To: airlied, linux; +Cc: linux-kernel, dri-devel

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/i2c/ch7006_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index e9e8ae2..544a8a2 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -485,7 +485,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
 	return 0;
 }
 
-static struct i2c_device_id ch7006_ids[] = {
+static const struct i2c_device_id ch7006_ids[] = {
 	{ "ch7006", 0 },
 	{ }
 };
-- 
2.7.4

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

* [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id
  2017-08-19 18:28 [PATCH 0/3] constify drm i2c_device_id Arvind Yadav
  2017-08-19 18:28 ` [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id Arvind Yadav
@ 2017-08-19 18:28 ` Arvind Yadav
  2017-08-19 18:28 ` [PATCH 3/3] drm: i2c: tda998x: " Arvind Yadav
  2017-08-22  6:31   ` Daniel Vetter
  3 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:28 UTC (permalink / raw)
  To: airlied, linux; +Cc: linux-kernel, dri-devel

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/i2c/sil164_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i2c/sil164_drv.c b/drivers/gpu/drm/i2c/sil164_drv.c
index db0b03f..ecaa587 100644
--- a/drivers/gpu/drm/i2c/sil164_drv.c
+++ b/drivers/gpu/drm/i2c/sil164_drv.c
@@ -415,7 +415,7 @@ sil164_encoder_init(struct i2c_client *client,
 	return 0;
 }
 
-static struct i2c_device_id sil164_ids[] = {
+static const struct i2c_device_id sil164_ids[] = {
 	{ "sil164", 0 },
 	{ }
 };
-- 
2.7.4

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

* [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id
  2017-08-19 18:28 [PATCH 0/3] constify drm i2c_device_id Arvind Yadav
  2017-08-19 18:28 ` [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id Arvind Yadav
  2017-08-19 18:28 ` [PATCH 2/3] drm: i2c: sil164: " Arvind Yadav
@ 2017-08-19 18:28 ` Arvind Yadav
  2017-08-22  6:31   ` Daniel Vetter
  3 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:28 UTC (permalink / raw)
  To: airlied, linux; +Cc: linux-kernel, dri-devel

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 86f47e1..7605661 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1754,7 +1754,7 @@ static const struct of_device_id tda998x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, tda998x_dt_ids);
 #endif
 
-static struct i2c_device_id tda998x_ids[] = {
+static const struct i2c_device_id tda998x_ids[] = {
 	{ "tda998x", 0 },
 	{ }
 };
-- 
2.7.4

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

* Re: [PATCH 0/3] constify drm i2c_device_id
  2017-08-19 18:28 [PATCH 0/3] constify drm i2c_device_id Arvind Yadav
@ 2017-08-22  6:31   ` Daniel Vetter
  2017-08-19 18:28 ` [PATCH 2/3] drm: i2c: sil164: " Arvind Yadav
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-08-22  6:31 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: airlied, linux, linux-kernel, dri-devel

On Sat, Aug 19, 2017 at 11:58:17PM +0530, Arvind Yadav wrote:
> i2c_device_id are not supposed to change at runtime. All functions
> working with i2c_device_id provided by <linux/i2c.h> work with
> const i2c_device_id. So mark the non-const structs as const.

All applied.

btw I think this isn't your first series, and we're trying to keep some of
the trivial mistakes around in drm, as an easy way for newbies to get into
the subsystem with their first patch.

We'd like more regular contributors to tackle some of the more involved
cleanup tasks, which should also be more valuable to the subsystem:

file:///home/daniel/linux/src/Documentation/output/gpu/todo.html#todo

Cheers, Daniel

> 
> Arvind Yadav (3):
>   [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id
>   [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id
>   [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id
> 
>  drivers/gpu/drm/i2c/ch7006_drv.c  | 2 +-
>  drivers/gpu/drm/i2c/sil164_drv.c  | 2 +-
>  drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 0/3] constify drm i2c_device_id
@ 2017-08-22  6:31   ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-08-22  6:31 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: linux, dri-devel, linux-kernel

On Sat, Aug 19, 2017 at 11:58:17PM +0530, Arvind Yadav wrote:
> i2c_device_id are not supposed to change at runtime. All functions
> working with i2c_device_id provided by <linux/i2c.h> work with
> const i2c_device_id. So mark the non-const structs as const.

All applied.

btw I think this isn't your first series, and we're trying to keep some of
the trivial mistakes around in drm, as an easy way for newbies to get into
the subsystem with their first patch.

We'd like more regular contributors to tackle some of the more involved
cleanup tasks, which should also be more valuable to the subsystem:

file:///home/daniel/linux/src/Documentation/output/gpu/todo.html#todo

Cheers, Daniel

> 
> Arvind Yadav (3):
>   [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id
>   [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id
>   [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id
> 
>  drivers/gpu/drm/i2c/ch7006_drv.c  | 2 +-
>  drivers/gpu/drm/i2c/sil164_drv.c  | 2 +-
>  drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 0/3] constify drm i2c_device_id
  2017-08-22  6:31   ` Daniel Vetter
  (?)
@ 2017-08-22  9:43   ` Arvind Yadav
  -1 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-22  9:43 UTC (permalink / raw)
  To: airlied, linux, linux-kernel, dri-devel

Hi Daniel,


On Tuesday 22 August 2017 12:01 PM, Daniel Vetter wrote:
> On Sat, Aug 19, 2017 at 11:58:17PM +0530, Arvind Yadav wrote:
>> i2c_device_id are not supposed to change at runtime. All functions
>> working with i2c_device_id provided by <linux/i2c.h> work with
>> const i2c_device_id. So mark the non-const structs as const.
> All applied.
>
> btw I think this isn't your first series, and we're trying to keep some of
> the trivial mistakes around in drm, as an easy way for newbies to get into
> the subsystem with their first patch.
>
> We'd like more regular contributors to tackle some of the more involved
> cleanup tasks, which should also be more valuable to the subsystem:
>
> file:///home/daniel/linux/src/Documentation/output/gpu/todo.html#todo
I want to contribute drm and others subsystem. If you can guide me.
It will helpful for me.
> Cheers, Daniel
>
>> Arvind Yadav (3):
>>    [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id
>>    [PATCH 2/3] drm: i2c: sil164: constify i2c_device_id
>>    [PATCH 3/3] drm: i2c: tda998x: constify i2c_device_id
>>
>>   drivers/gpu/drm/i2c/ch7006_drv.c  | 2 +-
>>   drivers/gpu/drm/i2c/sil164_drv.c  | 2 +-
>>   drivers/gpu/drm/i2c/tda998x_drv.c | 2 +-
>>   3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> -- 
>> 2.7.4
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
~arvind

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

end of thread, other threads:[~2017-08-22  9:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-19 18:28 [PATCH 0/3] constify drm i2c_device_id Arvind Yadav
2017-08-19 18:28 ` [PATCH 1/3] drm: i2c: ch7006: constify i2c_device_id Arvind Yadav
2017-08-19 18:28 ` [PATCH 2/3] drm: i2c: sil164: " Arvind Yadav
2017-08-19 18:28 ` [PATCH 3/3] drm: i2c: tda998x: " Arvind Yadav
2017-08-22  6:31 ` [PATCH 0/3] constify drm i2c_device_id Daniel Vetter
2017-08-22  6:31   ` Daniel Vetter
2017-08-22  9:43   ` Arvind Yadav

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.