constify drm i2c_device_id
Subsystems (2)
cover constify drm i2c_device_id
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(-)
Signature · 1 line
2.7.4
PATCH 1/3 drm: i2c: ch7006: constify i2c_device_id
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.
--- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/ch7006_drv.c +1 -1
@@ -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 }, { } };
Signature · 1 line
2.7.4
PATCH 2/3 drm: i2c: sil164: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/gpu/drm/i2c/sil164_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/sil164_drv.c +1 -1
@@ -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 }, { } };
Signature · 1 line
2.7.4
PATCH 3/3 drm: i2c: tda998x: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i2c/tda998x_drv.c +1 -1
@@ -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 }, { } };
Signature · 1 line
2.7.4
Quoted 3 lines · Arvind Yadav
i2c_device_idare not supposed to change at runtime. All functions working withi2c_device_idprovided by <linux/i2c.h> work with consti2c_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
Quoted 18 lines
Arvind Yadav (3):
[PATCH 1/3] drm: i2c: ch7006: constifyi2c_device_id[PATCH 2/3] drm: i2c: sil164: constifyi2c_device_id[PATCH 3/3] drm: i2c: tda998x: constifyi2c_device_iddrivers/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(-)Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Daniel,
Quoted 6 lines · Daniel Vetter
Quoted 3 lines · Arvind Yadav
i2c_device_idare not supposed to change at runtime. All functions working withi2c_device_idprovided by <linux/i2c.h> work with consti2c_device_id. So mark the non-const structs as const.All applied.
Quoted 8 lines
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.
Quoted 19 lines
Cheers, Daniel
Quoted 17 lines
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_iddrivers/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(-)Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
~arvind