Category: Linux

staging: iio: Use kcalloc instead of kzalloc

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com> This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/accel/lis3l02dq_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 1fd9009..e6101bb 100644 — a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -118,7 …

Continue reading

staging: iio: Use kcalloc instead of kzalloc.

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com> This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/adc/ad7280a.c | 5 +++– 1 file changed, 3 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c index 4d48707..e7d45ee 100644 — a/drivers/staging/iio/adc/ad7280a.c +++ b/drivers/staging/iio/adc/ad7280a.c @@ -547,8 …

Continue reading

staging: dgnc: Use kcalloc instead of kzalloc.

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com> This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgnc/dgnc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index 55b5e6b..b322985 100644 — a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -409,7 …

Continue reading

staging: rtl8188eu: Use kcalloc instead of kzalloc

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com> This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index bc275b2..06d1e65 100644 — a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -42,7 …

Continue reading

staging: rtl8188eu: Use kcalloc instead of kzalloc.

Author: Navya Sri Nizamkari <navyasri.tech@gmail.com> This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_xmit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 7a71df1..7ed60ab 100644 — a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -1634,7 …

Continue reading

Staging: rtl8188eu: Remove redundant local variable

Author: Somya Anand <somyaanand214@gmail.com> This patch removes a redundant variable “val” and adds inline return statements. It also adds a default case to the switch statement which returns 0 to keep the logic intact. It also removes a redundant variable “inx” and adds inline return statements. This issue is identified by the following coccinelle script. …

Continue reading

drivers: staging: iio: meter: Removed unnecessary variable

Author: Tina Johnson <tinajohnson.1234@gmail.com> Variable ret is used only to store the return value. Hence ret is removed and the return statement modified. Coccinelle was used to detect such removable variables: @rule1@ identifier ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Tina Johnson Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/meter/ade7854-spi.c | 6 +—– 1 …

Continue reading

drivers: staging: iio: meter: Removed unnecessary variable

Author: Tina Johnson <tinajohnson.1234@gmail.com> Variable ret is used only to store the return value. Hence ret is removed and the return statement modified. Coccinelle was used to detect such removable variables: @rule1@ identifier ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Tina Johnson Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/meter/ade7854-i2c.c | 5 +—- 1 …

Continue reading

drivers: staging: iio: meter: Removed unnecessary variable

Author: Tina Johnson <tinajohnson.1234@gmail.com> Variable ret is used only to store the error code to be returned. Hence use of ret is removed and the return statement modified. Coccinelle was used to prepare the patch: @rule1@ identifier ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Tina Johnson Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/meter/ade7758_ring.c …

Continue reading

drivers: staging: iio: meter: Removed unnecessary variable

Author: Tina Johnson <tinajohnson.1234@gmail.com> Variable len is used only to store the return value. Hence len is removed and the return statement modified. Coccinelle was used to detect such removable variables: @rule1@ identifier ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Tina Johnson Signed-off-by: Greg Kroah-Hartman — drivers/staging/iio/meter/ade7758_core.c | 5 ++— 1 …

Continue reading