Category: Linux

Staging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_download.c

Author: Rashika Kheria <rashika.kheria@gmail.com> This patch fixes the following coccinelle error in ft1000-usb/ft1000_download.c – drivers/staging/ft1000/ft1000-usb/ft1000_download.c:615:1-16: ERROR: Assignment of bool to non-0/1 constant drivers/staging/ft1000/ft1000-usb/ft1000_download.c:926:5-20: ERROR: Assignment of bool to non-0/1 constant drivers/staging/ft1000/ft1000-usb/ft1000_download.c:943:7-22: ERROR: Assignment of bool to non-0/1 constant Signed-off-by: Rashika Kheria Reviewed-by: Lisa Nguyen Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 6 +++— 1 file changed, …

Continue reading

Staging: ft1000: Fix assignment of bool to non-0/1 constant in ft1000_usb.c

Author: Rashika Kheria <rashika.kheria@gmail.com> This patch fixes the following coccinelle error in ft1000-usb/ft1000_usb.c- drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:50:4-18: ERROR: Assignment of bool to non-0/1 constant drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:174:1-15: ERROR: Assignment of bool to non-0/1 constant drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:39:12-26: ERROR: Assignment of bool to non-0/1 constant Signed-off-by: Rashika Kheria Reviewed-by: Lisa Nguyen Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_usb.c | 6 +++— 1 file changed, 3 …

Continue reading

staging: rtl8192e: use memdup_user to simplify code

Author: Teodora Baluta <teobaluta@gmail.com> Use memdup_user rather than duplicating its implementation. This patch fixes the following coccinelle warnings: drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2598:8-15: WARNING opportunity for memdup_user drivers/staging/rtl8192e/rtllib_softmac.c:3594:9-16: WARNING opportunity for memdup_user Signed-off-by: Teodora Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 11 +++——– drivers/staging/rtl8192e/rtllib_softmac.c | 11 +++——– 2 files changed, 6 insertions(+), 16 deletions(-)   diff –git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c …

Continue reading

staging: rtl8187se: delete duplicated argument to |

Author: Teodora Baluta <teobaluta@gmail.com> This patch fixes the following coccinelle issue for a mask calculation: drivers/staging/rtl8187se/r8180_core.c:2552:44-54: duplicated argument to & or | Signed-off-by: Teodora Baluta Reviewed-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 8d767f3..76a6738 100644 — a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c …

Continue reading

staging: rtl8187se: fix code allignment

Author: Teodora Baluta <teobaluta@gmail.com> Fix confusingly indented code after if. This patch fixes the following coccinelle issues: drivers/staging/rtl8187se/r8180_wx.c:1148:2-11: code aligned with following code on line 1150 drivers/staging/rtl8187se/r8180_dm.c:668:1-84: code aligned with following code on line 674 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:623:2-38: code aligned with following code on line 625 drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c:148:1-85: code aligned with following code on line 149 Signed-off-by: Teodora …

Continue reading

staging: rtl8187se: bool tests don’t need comparisons

Author: Teodora Baluta <teobaluta@gmail.com> This patch fixes the following coccinelle warning: drivers/staging/rtl8187se/r8180_core.c:2217:5-40: WARNING: Comparison to bool Signed-off-by: Teodora Baluta Reviewed-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index eb98222..8d767f3 100644 — a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -2214,7 +2214,7 @@ static void …

Continue reading

staging: rtl8187se: fix assignment of bool to 0/1

Author: Teodora Baluta <teobaluta@gmail.com> This patch fixes the following coccinelle warnings: drivers/staging/rtl8187se/r8180_core.c:2433:1-20: WARNING: Assignment of bool to 0/1 drivers/staging/rtl8187se/r8180_core.c:2275:3-34: WARNING: Assignment of bool to 0/1 Signed-off-by: Teodora Baluta Reviewed-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8187se/r8180_core.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index 55dfd5e..eb98222 100644 — …

Continue reading

staging: rtl8187se: use memdup_user to simplify code

Author: Teodora Baluta <teobaluta@gmail.com> This patch fixes the following coccinelle warning to use memdup_user rather than duplicating its implementation: drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:2947:9-16: WARNING opportunity for memdup_user Signed-off-by: Teodora Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c | 11 +++——– 1 file changed, 3 insertions(+), 8 deletions(-)   diff –git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c index 0405826..0290706 100644 — a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c @@ …

Continue reading

staging: imx-drm: use true and false for bool variables

Author: Valentina Manea <valentina.manea.m@gmail.com> This patch fixes coccinelle errors for bool variables initialized with 1 or 0 instead of true and false. Signed-off-by: Valentina Manea Reviewed-by: Rusty Russell Signed-off-by: Greg Kroah-Hartman — drivers/staging/imx-drm/imx-tve.c | 4 ++– drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++– drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 4 ++– drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) …

Continue reading

staging: sep: do not use comparisons on bool tests

Author: Valentina Manea <valentina.manea.m@gmail.com> This patch fixes coccinelle errors regarding comparisons used in bool tests. Signed-off-by: Valentina Manea Signed-off-by: Greg Kroah-Hartman — drivers/staging/sep/sep_main.c | 22 ++++++++++———— 1 file changed, 10 insertions(+), 12 deletions(-)   diff –git a/drivers/staging/sep/sep_main.c b/drivers/staging/sep/sep_main.c index 5f8c0a8..1e80a40 100644 — a/drivers/staging/sep/sep_main.c +++ b/drivers/staging/sep/sep_main.c @@ -493,8 +493,7 @@ int sep_free_dma_table_data_handler(struct sep_device *sep, * then …

Continue reading