Articles de cet auteur
Feb 26 2016
staging: lustre: lclient: Replace kmem_cache_alloc with kmem_cache_zalloc
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc with flag GFP_ZERO since kmem_alloc_zalloc sets allocated memory to zero. The Coccinelle semantic patch used to make this change is as follows: // @@ expression e,f; @@ – kmem_cache_alloc(e, f |__GFP_ZERO) + kmem_cache_zalloc(e, f) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — …
Feb 25 2016
Staging: lustre: lov: Use list_for_each_entry instead of list_for_each
Author: Bhumika Goyal <bhumirks@gmail.com> Use list_for_each_entry instead of list_for_each and list_entry as it simplifies the code. Done using coccinelle: @@ type T,T2; identifier I1,I2; expression e1,e2; iterator name list_for_each_entry; iterator name list_for_each; @@ – T *I1; … – list_for_each(I1,e1) + list_for_each_entry(I2,e1,e2) { …when!=T *I1; – I2=list_entry(I1,T2,e2); … } …when!=I2; @@ type T,T2,T3; identifier I1,I2,I3; expression …
Feb 25 2016
staging: android: Use devm_kcalloc instead of devm_kzalloc
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof. The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E2,E3; @@ – devm_kzalloc(dev,E1*sizeof(E2),E3) + devm_kcalloc(dev,E1,sizeof(E2),E3) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/staging/android/timed_gpio.c | …
Feb 25 2016
staging: android: ion: tegra: Use devm_kcalloc instead of devm_kzalloc
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof. The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E3; type T; @@ – devm_kzalloc(dev,E1*sizeof(T),E3) + devm_kcalloc(dev,E1,sizeof(T),E3) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — …
Feb 25 2016
staging: rdma: hfi1: Remove unnecessary parantheses
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Removed parantheses on the right hand side of assignments as they are not needed. Coccinelle patch used: @@ expression a, b; @@ a = & -( b -) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rdma/hfi1/mad.c | 10 +++++—– 1 file changed, 5 insertions(+), 5 deletions(-) diff –git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c …
Feb 25 2016
staging: rdma: hfi1: Remove casts of pointer to same type
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Casting a pointer to a pointer of the same type is unnecessary, so remove these unnecessary casts. This was done with Coccinelle: @@ type T; T *ptr; @@ – (T *)ptr + ptr Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rdma/hfi1/mad.c | 10 +++++—– 1 file changed, 5 insertions(+), 5 deletions(-) …
Feb 25 2016
staging: fbtft: Use devm_kcalloc instead of devm_kzalloc
Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Replace devm_kzalloc with devm_kcalloc to ensure there are no integer overflows from the multiplication of a number * sizeof The following Coccinelle semantic patch was used to make this change: // @@ expression dev,E1,E2,E3,E4; @@ – devm_kzalloc(dev,E1*E2*sizeof(E3),E4) + devm_kcalloc(dev,E1*E2,sizeof(E3),E4) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/staging/fbtft/fbtft-core.c | …
Feb 25 2016
staging: rtl8188eu: core: Remove casts of pointer to same type
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Casting a pointer to a pointer of the same type is unnecessary, so remove these unnecessary casts. This was done with Coccinelle: @@ type T; T *ptr; @@ – (T *)ptr + ptr Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_recv.c | 10 +++++—– 1 file changed, 5 insertions(+), 5 deletions(-) …
Feb 25 2016
staging: rtl8723au: hal: Remove useless return variables
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ – T i; …when != i when strict ( return -C; | – i = + return f(…); – return i; ) …
Feb 25 2016
staging: unisys: visorbus: Remove useless return variables
Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ – T i; …when != i when strict ( return -C; | – i = + return f(…); – return i; ) …