Catégorie : Linux

net: systemport: Use eth_hw_addr_random

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use eth_hw_addr_random() instead of calling random_ether_addr(). Here, this change is setting addr_assign_type to NET_ADDR_RANDOM. The Coccinelle semantic patch that performs this transformation is as follows: @@ identifier a,b; @@ -random_ether_addr(a->b); +eth_hw_addr_random(a); Signed-off-by: Vaishali Thakkar Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller — drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file …

Lire la suite

uio: uio_fsl_elbc_gpcm: Use module_platform_driver

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use module_platform_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(…) { return platform_driver_register(&x); } @b depends on a@ identifier e, a.x; @@ -static e(…) { …

Lire la suite

kconfig: Delete unnecessary checks before the function call « sym_calc_value »

Author: Markus Elfring <elfring@users.sourceforge.net> The sym_calc_value() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Michal Marek — scripts/kconfig/confdata.c | 7 ++—– scripts/kconfig/symbol.c | 3 +– 2 files changed, 3 insertions(+), …

Lire la suite

net: ec_bhf: Use module_pci_driver

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use module_pci_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(…) { return pci_register_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(…) { …

Lire la suite

w1: Use module_pci_driver

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use module_pci_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(…) { return pci_register_driver(&x); } @b depends on a@ identifier e, a.x; @@ -static e(…) { …

Lire la suite

rtc: ds1685: Use module_platform_driver

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use module_platform_driver for drivers whose init and exit functions only register and unregister, respectively. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: @a@ identifier f, x; @@ -static f(…) { return platform_driver_register(&x); } @b depends on a@ identifier e, a.x; @@ -static e(…) { …

Lire la suite

tcm_qla2xxx: pass timeout as HZ independent value

Author: Nicholas Mc Guire <hofrat@osadl.org> API compliance scanning with coccinelle flagged: ./drivers/scsi/qla2xxx/tcm_qla2xxx.c:407:2-29: WARNING: timeout is HZ dependent This was introduced in ‘commit 75f8c1f693ee (« [SCSI] tcm_qla2xxx: Add >= 24xx series fabric module for target-core »)’. wait_for_completion_timeout() expects a timeout in jiffies so the numeric constant makes the effective timeout HZ dependent. Resolved by converting it to CONST …

Lire la suite

Bluetooth: bt3c_cs: Fix coding style

Author: Prasanna Karthik <mkarthi3@visteon.com> Remove semicolon in switch statement, reported by coccinelle Signed-off-by: Prasanna Karthik Signed-off-by: Marcel Holtmann — drivers/bluetooth/bt3c_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 7aab654..a00bb82 100644 — a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c @@ -427,7 +427,7 @@ static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) case …

Lire la suite

GPU-DRM-IMX: Delete an unnecessary check before drm_fbdev_cma_restore_mode()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_fbdev_cma_restore_mode() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Philipp Zabel — drivers/gpu/drm/imx/imx-drm-core.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff …

Lire la suite

GPU-DRM: Delete an unnecessary check before drm_property_unreference_blob()

Author: Markus Elfring <elfring@users.sourceforge.net> The drm_property_unreference_blob() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Zhao Junwang Signed-off-by: Daniel Vetter — drivers/gpu/drm/drm_crtc.c | 4 +— 1 file changed, 1 insertion(+), 3 …

Lire la suite