Catégorie : Linux

tpm/tpm_i2c_atmel: fix coccinelle warnings

Author: Fengguang Wu <fengguang.wu@intel.com> drivers/char/tpm/tpm_i2c_atmel.c:178:8-9: WARNING: return of 0/1 in function ‘i2c_atmel_req_canceled’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: coccinelle/misc/boolreturn.cocci CC: Jason Gunthorpe CC: Peter Huewe Acked-by: Jason Gunthorpe Signed-off-by: Fengguang Wu Signed-off-by: Peter Huewe — drivers/char/tpm/tpm_i2c_atmel.c | 2 +- 1 file changed, 1 …

Lire la suite

staging: crystalhd: return true and false instead of 1 and 0

Author: Valentina Manea <valentina.manea.m@gmail.com> This fixes coccinelle error regarding functions that return bool and return 1 and 0 instead of true and false. Signed-off-by: Valentina Manea Reviewed-by: Lisa Nguyen Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman — drivers/staging/crystalhd/crystalhd_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c index 07a2f24..3972b52 100644 …

Lire la suite

staging: rtl8192e: remove unneeded semicolons

Author: Valentina Manea <valentina.manea.m@gmail.com> This fixes coccinelle errors regarding unneeded semicolons. Signed-off-by: Valentina Manea Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index a285841..2cace9a 100644 — a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1184,7 +1184,7 @@ void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, cb_desc);   if …

Lire la suite

staging: rtl8192e: 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 Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 +++++—– drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 6 +++— drivers/staging/rtl8192e/rtllib_rx.c | 4 ++– drivers/staging/rtl8192e/rtllib_softmac.c | 6 +++— 5 files changed, 14 insertions(+), 14 …

Lire la suite

rtlwifi: fix usage of freq_reg_info()

Author: Luis R. Rodriguez <mcgrof@do-not-panic.com> freq_reg_info() expects KHz and not MHz, fix this. In this case we’ll now be getting the no-ir flags cleared on channels for any channel when the country IE trusts that channel. @@ struct ieee80211_channel *ch; struct wiphy *wiphy; const struct ieee80211_reg_rule *rule; @@ -rule = freq_reg_info(wiphy, ch->center_freq); +rule = freq_reg_info(wiphy, …

Lire la suite

brcm80211: fix usage of freq_reg_info()

Author: Luis R. Rodriguez <mcgrof@do-not-panic.com> freq_reg_info() expects KHz and not MHz, fix this. In this case we’ll now be getting the no-ir flags cleared on channels for any channel when the country IE trusts that channel. @@ struct ieee80211_channel *ch; struct wiphy *wiphy; const struct ieee80211_reg_rule *rule; @@ -rule = freq_reg_info(wiphy, ch->center_freq); +rule = freq_reg_info(wiphy, …

Lire la suite

ath: fix usage of freq_reg_info()

Author: Luis R. Rodriguez <mcgrof@do-not-panic.com> freq_reg_info() expects KHz and not MHz, fix this. In this case we’ll now be getting the no-ir flags cleared on channels for any channel when the country IE trusts that channel. @@ struct ieee80211_channel *ch; struct wiphy *wiphy; const struct ieee80211_reg_rule *rule; @@ -rule = freq_reg_info(wiphy, ch->center_freq); +rule = freq_reg_info(wiphy, …

Lire la suite

staging: comedi: use memdup_user to simplify code

Author: Teodora Baluta <teobaluta@gmail.com> Use memdup_user rather than duplicating implementation. Fix following coccinelle warnings: drivers/staging/comedi/comedi_fops.c:1425:5-12: WARNING opportunity for memdup_user drivers/staging/comedi/comedi_fops.c:1553:6-13: WARNING opportunity for memdup_user Signed-off-by: Teodora Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/comedi_fops.c | 33 ++++++++++———————– 1 file changed, 10 insertions(+), 23 deletions(-)   diff –git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 721df31..f3d59e2 100644 — a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ …

Lire la suite

Staging: ft1000: Fix comparsion of bool to 0/1 in ft1000_hw.c

Author: Rashika Kheria <rashika.kheria@gmail.com> This patch fixes the following coccinelle warning in ft1000-usb/ft1000_hw.c – drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1924:9-25: WARNING: Comparison of bool to 0/1 Signed-off-by: Rashika Kheria Reviewed-by: Lisa Nguyen Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c index ca8c7b2..ca5b56c 100644 — a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c @@ …

Lire la suite

Staging: ft1000: Fix assignment of bool to 0/1 in ft1000_hw.c

Author: Rashika Kheria <rashika.kheria@gmail.com> This patch fixes the following coccinelle warning in ft1000-usb/ft1000_hw.c- drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1444:1-19: WARNING: Assignment of bool to 0/1 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1937:16-34: WARNING: Assignment of bool to 0/1 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1938:16-35: WARNING: Assignment of bool to 0/1 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1570:4-22: WARNING: Assignment of bool to 0/1 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:1575:4-22: WARNING: Assignment of bool to 0/1 drivers/staging/ft1000/ft1000-usb/ft1000_hw.c:636:1-26: WARNING: Assignment of bool to 0/1 …

Lire la suite