Catégorie : Linux

PCI: ibmphp: Remove unneeded NULL test

Author: Julia Lawall <julia.lawall@lip6.fr> Remove unneeded NULL test. The index variable of list_for_each_entry is never NULL, as it is the structure that contains the list pointer. Generated by: scripts/coccinelle/iterators/itnull.cocci Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall Signed-off-by: Bjorn Helgaas CC: Geliang Tang — drivers/pci/hotplug/ibmphp_core.c | 3 — 1 file changed, 3 deletions(-)   diff –git a/drivers/pci/hotplug/ibmphp_core.c …

Lire la suite

drm/etnaviv: remove owner assignment from platform_driver

Author: Fabio Estevam <festevam@gmail.com> This platform_driver does not need to set an owner as it will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam Signed-off-by: Lucas Stach — drivers/gpu/drm/etnaviv/etnaviv_drv.c | 1 – 1 file changed, 1 deletion(-)   diff –git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 5c89ebb..e885898 100644 — a/drivers/gpu/drm/etnaviv/etnaviv_drv.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c @@ -668,7 …

Lire la suite

wlcore: fix error handling in wlcore_event_fw_logger

Author: Andrzej Hajda <a.hajda@samsung.com> wlcore_read/wlcore_write can return negative values so it should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2120705 Fixes: 3719c17e1816 (« wlcore/wl18xx: fw logger over sdio ») Signed-off-by: Andrzej Hajda Signed-off-by: Kalle Valo — drivers/net/wireless/ti/wlcore/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) …

Lire la suite

iio: ak8975: constify ak_def structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The ak_def structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Jonathan Cameron — drivers/iio/magnetometer/ak8975.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c index b13936d..9c5c9ef 100644 — a/drivers/iio/magnetometer/ak8975.c +++ b/drivers/iio/magnetometer/ak8975.c @@ -252,7 +252,7 @@ …

Lire la suite

ALSA: emux: constify nrpn_conv_table structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The nrpn_conv_table structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai — sound/synth/emux/emux_nrpn.c | 9 +++++—- 1 file changed, 5 insertions(+), 4 deletions(-)   diff –git a/sound/synth/emux/emux_nrpn.c b/sound/synth/emux/emux_nrpn.c index 00fc005..9729a15 100644 — a/sound/synth/emux/emux_nrpn.c +++ b/sound/synth/emux/emux_nrpn.c @@ -48,7 +48,8 @@ …

Lire la suite

hwmon: (ibmaem) constify aem_rw_sensor_template and aem_ro_sensor_template structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The aem_rw_sensor_template and aem_ro_sensor_template structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Guenter Roeck — drivers/hwmon/ibmaem.c | 12 ++++++—— 1 file changed, 6 insertions(+), 6 deletions(-)   diff –git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index 7a8a6fb..1f64378 100644 — a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c @@ -920,8 …

Lire la suite

XFS: Use a signed return type for suffix_kstrtoint()

Author: Markus Elfring <elfring@users.sourceforge.net> The return type « unsigned long » was used by the suffix_kstrtoint() function even though it will eventually return a negative error code. Improve this implementation detail by using the type « int » instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Eric Sandeen Signed-off-by: Dave Chinner — fs/xfs/xfs_super.c …

Lire la suite

chelsio: constify cphy_ops structures

Author: Julia Lawall <julia.lawall@lip6.fr> The cphy_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/ethernet/chelsio/cxgb/cphy.h | 2 +- drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c | 2 +- drivers/net/ethernet/chelsio/cxgb/mv88x201x.c | 2 +- drivers/net/ethernet/chelsio/cxgb/my3126.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/ael1002.c | 12 ++++++—— drivers/net/ethernet/chelsio/cxgb3/aq100x.c | 2 +- drivers/net/ethernet/chelsio/cxgb3/common.h | …

Lire la suite

[media] media: bt8xx: constify sp887x_config structure

Author: Julia Lawall <Julia.Lawall@lip6.fr> This sp887x_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/pci/bt8xx/dvb-bt8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c index 8aeb14c..e69d338 100644 — a/drivers/media/pci/bt8xx/dvb-bt8xx.c +++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c …

Lire la suite

[media] media: bt8xx: constify or51211_config structure

Author: Julia Lawall <Julia.Lawall@lip6.fr> The or51211_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/pci/bt8xx/dvb-bt8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/media/pci/bt8xx/dvb-bt8xx.c b/drivers/media/pci/bt8xx/dvb-bt8xx.c index d407244..8aeb14c 100644 — a/drivers/media/pci/bt8xx/dvb-bt8xx.c +++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c …

Lire la suite