Catégorie : Linux

drm/i915: use dev_priv directly in i915_driver_unload

Author: Daniel Vetter <daniel.vetter@ffwll.ch> Noticed while playing with coccinelle. Reviewed-by: Damien Lespiau Signed-off-by: Daniel Vetter — drivers/gpu/drm/i915/i915_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index d02c8de..46f1dec 100644 — a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1867,7 +1867,7 @@ int i915_driver_unload(struct drm_device *dev) kmem_cache_destroy(dev_priv->slab);   pci_dev_put(dev_priv->bridge_dev); – kfree(dev->dev_private); + kfree(dev_priv);   …

Lire la suite

net: get rid of SET_ETHTOOL_OPS

Author: Wilfried Klaebe <w-lkml@lebenslange-mailadresse.de> net: get rid of SET_ETHTOOL_OPS Dave Miller mentioned he’d like to see SET_ETHTOOL_OPS gone. This does that. Mostly done via coccinelle script: @@ struct ethtool_ops *ops; struct net_device *dev; @@ – SET_ETHTOOL_OPS(dev, ops); + dev->ethtool_ops = ops; Compile tested only, but I’d seriously wonder if this broke anything. Suggested-by: Dave Miller …

Lire la suite

hwrng: n2-drv – Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The NULL assignment to np->units is removed as there is no interaction between this field and sun4v_hvapi_unregister. Also, the labels out_free_units and out_free are removed as they are …

Lire la suite

ASoC: rt5645: fix coccinelle warnings

Author: Oder Chiou <oder_chiou@realtek.com> Return statements in functions returning bool should use true/false instead of 1/0. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown — sound/soc/codecs/rt5645.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-)   diff –git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 30410eb..68923ec 100644 — a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -242,9 +242,9 @@ static bool rt5645_volatile_register(struct device *dev, …

Lire la suite

[media] timblogiw: Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions.The label err_register is removed as it is no longer required. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct …

Lire la suite

block/blk-throttle.c: fix return of 0/1 with return type bool

Author: Fabian Frederick <fabf@skynet.be> Fix 4 coccinelle warnings. Cc: Jens Axboe Cc: Andrew Morton Signed-off-by: Fabian Frederick Signed-off-by: Jens Axboe — block/blk-throttle.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-)   diff –git a/block/blk-throttle.c b/block/blk-throttle.c index 680a0cc..9353b46 100644 — a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -744,7 +744,7 @@ static inline void throtl_extend_slice(struct throtl_grp *tg, bool …

Lire la suite

can: mcp251x: fix coccinelle warnings

Author: Dan Carpenter <dan.carpenter@oracle.com> drivers/net/can/spi/mcp251x.c:953:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci CC: Stefano Babic CC: Marc Kleine-Budde Signed-off-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde — drivers/net/can/spi/mcp251x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) …

Lire la suite

net: filter: misc/various cleanups

Author: Daniel Borkmann <dborkman@redhat.com> This contains only some minor misc cleanpus. We can spare us the extra variable declaration in __skb_get_pay_offset(), the cast in __get_random_u32() is rather unnecessary and in __sk_migrate_realloc() we can remove the memcpy() and do a direct assignment of the structs. Latter was suggested by Fengguang Wu found with coccinelle. Also, remaining …

Lire la suite

net/phy: Remove return value for void function

Author: Shruti Kanetkar <Shruti@Freescale.com> This was caught when using a spatch (aka. coccinelle) script written by Joe Perches. Cc: Joe Perches Signed-off-by: Shruti Kanetkar Signed-off-by: David S. Miller — drivers/net/phy/at803x.c | 3 +– drivers/net/phy/smsc.c | 3 +– drivers/net/phy/vitesse.c | 3 +– 3 files changed, 3 insertions(+), 6 deletions(-)   diff –git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index b256083..6c622ae …

Lire la suite

rbd: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

Author: Duan Jiong <duanj.fnst@cn.fujitsu.com> This patch fixes coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong Reviewed-by: Yan, Zheng — drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/block/rbd.c b/drivers/block/rbd.c index 4c95b50..552a2ed 100644 — a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -4752,7 +4752,7 @@ static int rbd_dev_image_id(struct …

Lire la suite