[staging:staging-testing] BUILD SUCCESS 06b0c0dce88e2aa2f01343db0f26d214d7f264a0

2021-01-31 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
staging-testing
branch HEAD: 06b0c0dce88e2aa2f01343db0f26d214d7f264a0  staging: 
rtl8192u/ieee80211: fix switch case indentation

i386-tinyconfig vmlinux size:

+---+-+--+
| DELTA | SYMBOL  |  COMMIT  |
+---+-+--+
|  +470 | TOTAL   | 5c8fe583cce5..06b0c0dce88e (ALL COMMITS) |
|  +465 | TEXT| 5c8fe583cce5..06b0c0dce88e (ALL COMMITS) |
|  +101 | kernel_fpu_begin_mask() | 5c8fe583cce5..06b0c0dce88e (ALL COMMITS) |
|   +91 | shrink_page_list()  | 5c8fe583cce5..06b0c0dce88e (ALL COMMITS) |
|   -87 | kernel_fpu_begin()  | 5c8fe583cce5..06b0c0dce88e (ALL COMMITS) |
+---+-+--+

elapsed time: 723m

configs tested: 100
configs skipped: 2

The following configs have been built successfully.
More configs may be tested in the coming days.

gcc tested configs:
arm defconfig
arm64allyesconfig
arm64   defconfig
arm  allyesconfig
arm  allmodconfig
mipsmaltaup_defconfig
xtensa   common_defconfig
armu300_defconfig
arm  integrator_defconfig
powerpc mpc836x_rdk_defconfig
powerpc mpc834x_itx_defconfig
sh  rsk7269_defconfig
m68kmvme16x_defconfig
mips  decstation_64_defconfig
powerpc ppa8548_defconfig
arm   corgi_defconfig
powerpc  walnut_defconfig
arm   spitz_defconfig
armneponset_defconfig
sh   se7705_defconfig
powerpc  chrp32_defconfig
arm am200epdkit_defconfig
shsh7757lcr_defconfig
arcnsimosci_defconfig
powerpc mpc8272_ads_defconfig
sh   se7751_defconfig
archsdk_defconfig
armmini2440_defconfig
arm assabet_defconfig
ia64 allmodconfig
ia64defconfig
ia64 allyesconfig
m68k allmodconfig
m68kdefconfig
m68k allyesconfig
nds32   defconfig
nios2allyesconfig
cskydefconfig
alpha   defconfig
alphaallyesconfig
xtensa   allyesconfig
h8300allyesconfig
arc defconfig
sh   allmodconfig
parisc  defconfig
s390 allyesconfig
parisc   allyesconfig
s390defconfig
i386 allyesconfig
sparcallyesconfig
sparc   defconfig
i386   tinyconfig
i386defconfig
nios2   defconfig
arc  allyesconfig
nds32 allnoconfig
c6x  allyesconfig
mips allyesconfig
mips allmodconfig
powerpc  allyesconfig
powerpc  allmodconfig
powerpc   allnoconfig
i386 randconfig-a005-20210131
i386 randconfig-a003-20210131
i386 randconfig-a002-20210131
i386 randconfig-a001-20210131
i386 randconfig-a004-20210131
i386 randconfig-a006-20210131
x86_64   randconfig-a015-20210131
x86_64   randconfig-a011-20210131
x86_64   randconfig-a014-20210131
x86_64   randconfig-a016-20210131
x86_64   randconfig-a012-20210131
x86_64   randconfig-a013-20210131
i386 randconfig-a013-20210131
i386 randconfig-a011-20210131
i386 randconfig-a015-20210131
i386 randconfig-a012-20210131
i386 randconfig-a014-20210131
i386 randconfig-a016-20210131
riscvnommu_k210_defconfig
riscvallyesconfig
riscvnommu_virt_defconfig
riscv allnoconfig

[PATCH] Staging: wimax: i2400m: fixing several coding style issues.

2021-01-31 Thread dev . dragon
From: Dmitrii Wolf 

Fixed a coding style issues.

Signed-off-by: Dmitrii Wolf 
---
 drivers/staging/wimax/i2400m/debugfs.c |  2 +-
 drivers/staging/wimax/i2400m/netdev.c  |  2 +-
 drivers/staging/wimax/i2400m/rx.c  | 23 +++
 drivers/staging/wimax/i2400m/usb.c |  2 +-
 4 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wimax/i2400m/debugfs.c 
b/drivers/staging/wimax/i2400m/debugfs.c
index 1c640b41ea4c..4e6e1e3f015e 100644
--- a/drivers/staging/wimax/i2400m/debugfs.c
+++ b/drivers/staging/wimax/i2400m/debugfs.c
@@ -170,7 +170,7 @@ int debugfs_i2400m_reset_set(void *data, u64 val)
int result;
struct i2400m *i2400m = data;
enum i2400m_reset_type rt = val;
-   switch(rt) {
+   switch (rt) {
case I2400M_RT_WARM:
case I2400M_RT_COLD:
case I2400M_RT_BUS:
diff --git a/drivers/staging/wimax/i2400m/netdev.c 
b/drivers/staging/wimax/i2400m/netdev.c
index 8339d600e77b..0895a2e441d3 100644
--- a/drivers/staging/wimax/i2400m/netdev.c
+++ b/drivers/staging/wimax/i2400m/netdev.c
@@ -523,7 +523,7 @@ void i2400m_net_erx(struct i2400m *i2400m, struct sk_buff 
*skb,
 
d_fnstart(2, dev, "(i2400m %p skb %p [%u] cs %d)\n",
  i2400m, skb, skb->len, cs);
-   switch(cs) {
+   switch (cs) {
case I2400M_CS_IPV4_0:
case I2400M_CS_IPV4:
i2400m_rx_fake_eth_header(i2400m->wimax_dev.net_dev,
diff --git a/drivers/staging/wimax/i2400m/rx.c 
b/drivers/staging/wimax/i2400m/rx.c
index c9fb619a9e01..807bd3db69e9 100644
--- a/drivers/staging/wimax/i2400m/rx.c
+++ b/drivers/staging/wimax/i2400m/rx.c
@@ -485,8 +485,7 @@ struct i2400m_roq_data {
  * store the sequence number (sn) and the cs (packet type) coming from
  * the RX payload header from the device.
  */
-struct i2400m_roq
-{
+struct i2400m_roq {
unsigned ws;
struct sk_buff_head queue;
struct i2400m_roq_log *log;
@@ -556,7 +555,7 @@ void i2400m_roq_log_entry_print(struct i2400m *i2400m, 
unsigned index,
 {
struct device *dev = i2400m_dev(i2400m);
 
-   switch(e->type) {
+   switch (e->type) {
case I2400M_RO_TYPE_RESET:
dev_err(dev, "q#%d reset   ws %u cnt %u sn %u/%u"
" - new nws %u\n",
@@ -764,9 +763,9 @@ unsigned __i2400m_roq_update_ws(struct i2400m *i2400m, 
struct i2400m_roq *roq,
 new_nws);
__skb_unlink(skb_itr, >queue);
i2400m_net_erx(i2400m, skb_itr, roq_data_itr->cs);
-   }
-   else
+   } else {
break;  /* rest of packets all nsn_itr > nws */
+   }
}
roq->ws = sn;
return new_nws;
@@ -819,7 +818,7 @@ void i2400m_roq_reset(struct i2400m *i2400m, struct 
i2400m_roq *roq)
  */
 static
 void i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq,
- struct sk_buff * skb, unsigned lbn)
+   struct sk_buff *skb, unsigned lbn)
 {
struct device *dev = i2400m_dev(i2400m);
unsigned nsn, len;
@@ -882,7 +881,7 @@ void i2400m_roq_update_ws(struct i2400m *i2400m, struct 
i2400m_roq *roq,
  */
 static
 void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
-   struct sk_buff * skb, unsigned sn)
+   struct sk_buff *skb, unsigned sn)
 {
struct device *dev = i2400m_dev(i2400m);
unsigned nsn, old_ws, len;
@@ -1046,7 +1045,7 @@ void i2400m_rx_edata(struct i2400m *i2400m, struct 
sk_buff *skb_rx,
 ro_type, ro_cin, roq->ws, ro_sn,
 __i2400m_roq_nsn(roq, ro_sn), size);
d_dump(2, dev, payload, size);
-   switch(ro_type) {
+   switch (ro_type) {
case I2400M_RO_TYPE_RESET:
i2400m_roq_reset(i2400m, roq);
kfree_skb(skb); /* no data here */
@@ -1068,9 +1067,9 @@ void i2400m_rx_edata(struct i2400m *i2400m, struct 
sk_buff *skb_rx,
spin_lock_irqsave(>rx_lock, flags);
kref_put(>rx_roq_refcount, i2400m_rx_roq_destroy);
spin_unlock_irqrestore(>rx_lock, flags);
-   }
-   else
+   } else {
i2400m_net_erx(i2400m, skb, cs);
+   }
 error_skb_clone:
 error:
d_fnend(2, dev, "(i2400m %p skb_rx %p single %u payload %p "
@@ -1346,7 +1345,7 @@ int i2400m_rx_setup(struct i2400m *i2400m)
 {
int result = 0;
 
-   i2400m->rx_reorder = i2400m_rx_reorder_disabled? 0 : 1;
+   i2400m->rx_reorder = i2400m_rx_reorder_disabled ? 0 : 1;
if (i2400m->rx_reorder) {
unsigned itr;
struct i2400m_roq_log *rd;
@@ -1365,7 +1364,7 @@ int i2400m_rx_setup(struct i2400m *i2400m)
goto error_roq_log_alloc;
}
 
-   for(itr = 0; itr < 

[PATCH] staging: media: atomisp: fix coding style issues in timer.c

2021-01-31 Thread Ayush
- Fix unneeded brace in if condition(also, brace was on next line).
- Fix leading space warning before struct ia_css_clock_tick *curr_ts.

compile tested only (on next-20210129)

Signed-off-by: Ayush 
---
 .../staging/media/atomisp/pci/runtime/timer/src/timer.c| 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/runtime/timer/src/timer.c 
b/drivers/staging/media/atomisp/pci/runtime/timer/src/timer.c
index 679ef8242574..7ca435180c5f 100644
--- a/drivers/staging/media/atomisp/pci/runtime/timer/src/timer.c
+++ b/drivers/staging/media/atomisp/pci/runtime/timer/src/timer.c
@@ -20,13 +20,12 @@
 #include "assert_support.h"
 
 int
-ia_css_timer_get_current_tick(
-struct ia_css_clock_tick *curr_ts) {
+ia_css_timer_get_current_tick(struct ia_css_clock_tick *curr_ts)
+{
assert(curr_ts);
if (!curr_ts)
-   {
return -EINVAL;
-   }
+
curr_ts->ticks = (clock_value_t)gp_timer_read(GP_TIMER_SEL);
return 0;
 }
-- 
2.30.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry's return value

2021-01-31 Thread Martin Kaiser
A netdev xmit function should return NETDEV_TX_OK or NETDEV_TX_BUSY.

Signed-off-by: Martin Kaiser 
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c 
b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 11032316c53d..ff164a8c8679 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2516,7 +2516,7 @@ static netdev_tx_t 
rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc
 
dev_kfree_skb_any(skb);
 
-   return 0;
+   return NETDEV_TX_OK;
 
 }
 
-- 
2.20.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/13] staging: wimax: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/wimax/i2400m/netdev.c | 6 +++---
 drivers/staging/wimax/i2400m/usb.c| 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wimax/i2400m/netdev.c 
b/drivers/staging/wimax/i2400m/netdev.c
index 8339d600e..cd06eaf75 100644
--- a/drivers/staging/wimax/i2400m/netdev.c
+++ b/drivers/staging/wimax/i2400m/netdev.c
@@ -561,11 +561,11 @@ static void i2400m_get_drvinfo(struct net_device *net_dev,
 {
struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
 
-   strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-   strlcpy(info->fw_version, i2400m->fw_name ? : "",
+   strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
+   strscpy(info->fw_version, i2400m->fw_name ? : "",
sizeof(info->fw_version));
if (net_dev->dev.parent)
-   strlcpy(info->bus_info, dev_name(net_dev->dev.parent),
+   strscpy(info->bus_info, dev_name(net_dev->dev.parent),
sizeof(info->bus_info));
 }
 
diff --git a/drivers/staging/wimax/i2400m/usb.c 
b/drivers/staging/wimax/i2400m/usb.c
index f250d03ce..481b1ccde 100644
--- a/drivers/staging/wimax/i2400m/usb.c
+++ b/drivers/staging/wimax/i2400m/usb.c
@@ -333,8 +333,8 @@ static void i2400mu_get_drvinfo(struct net_device *net_dev,
struct i2400mu *i2400mu = container_of(i2400m, struct i2400mu, i2400m);
struct usb_device *udev = i2400mu->usb_dev;
 
-   strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-   strlcpy(info->fw_version, i2400m->fw_name ? : "",
+   strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
+   strscpy(info->fw_version, i2400m->fw_name ? : "",
sizeof(info->fw_version));
usb_make_path(udev, info->bus_info, sizeof(info->bus_info));
 }
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/13] staging: sm750fb: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 029f0d09e..c237a8f8e 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -814,7 +814,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int 
index)
fix->ywrapstep = crtc->ywrapstep;
fix->accel = FB_ACCEL_SMI;
 
-   strlcpy(fix->id, fixId[index], sizeof(fix->id));
+   strscpy(fix->id, fixId[index], sizeof(fix->id));
 
fix->smem_start = crtc->oScreen + sm750_dev->vidmem_start;
pr_info("fix->smem_start = %lx\n", fix->smem_start);
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/13] staging: rtl8712: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c 
b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index cbaa7a489..81de5a9e6 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -1784,7 +1784,7 @@ static int r871x_wx_set_enc_ext(struct net_device *dev,
return -ENOMEM;
param->cmd = IEEE_CMD_SET_ENCRYPTION;
eth_broadcast_addr(param->sta_addr);
-   strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
+   strscpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
if (pext->ext_flags & IW_ENCODE_EXT_GROUP_KEY)
param->u.crypt.set_tx = 0;
if (pext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/13] staging: rtl8192u: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
index f434a26cd..afa92ddfa 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c
@@ -484,7 +484,7 @@ int ieee80211_wx_get_name(struct ieee80211_device *ieee,
 struct iw_request_info *info,
 union iwreq_data *wrqu, char *extra)
 {
-   strlcpy(wrqu->name, "802.11", IFNAMSIZ);
+   strscpy(wrqu->name, "802.11", IFNAMSIZ);
if (ieee->modulation & IEEE80211_CCK_MODULATION) {
strlcat(wrqu->name, "b", IFNAMSIZ);
if (ieee->modulation & IEEE80211_OFDM_MODULATION)
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/13] staging: rtl8192e: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c 
b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c
index 6ae7a67e7..f4f7b74c8 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c
@@ -18,9 +18,9 @@ static void _rtl92e_ethtool_get_drvinfo(struct net_device 
*dev,
 {
struct r8192_priv *priv = rtllib_priv(dev);
 
-   strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
-   strlcpy(info->version, DRV_VERSION, sizeof(info->version));
-   strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
+   strscpy(info->driver, DRV_NAME, sizeof(info->driver));
+   strscpy(info->version, DRV_VERSION, sizeof(info->version));
+   strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
 }
 
 static u32 _rtl92e_ethtool_get_link(struct net_device *dev)
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/13] staging: rtl8188eu: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c 
b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 6f42f13a7..bf22f130d 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -1865,7 +1865,7 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
goto exit;
}
 
-   strlcpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
+   strscpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
 
if (pext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
param->u.crypt.set_tx = 1;
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/13] staging: olpc_dcon: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c 
b/drivers/staging/olpc_dcon/olpc_dcon.c
index e7281212d..6d8e9a481 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -576,7 +576,7 @@ static struct notifier_block dcon_panic_nb = {
 
 static int dcon_detect(struct i2c_client *client, struct i2c_board_info *info)
 {
-   strlcpy(info->type, "olpc_dcon", I2C_NAME_SIZE);
+   strscpy(info->type, "olpc_dcon", I2C_NAME_SIZE);
 
return 0;
 }
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/13] staging: octeon: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/octeon/ethernet-mdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/octeon/ethernet-mdio.c 
b/drivers/staging/octeon/ethernet-mdio.c
index 0bf545849..1bb91a904 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -21,9 +21,9 @@
 static void cvm_oct_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
 {
-   strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
-   strlcpy(info->version, UTS_RELEASE, sizeof(info->version));
-   strlcpy(info->bus_info, "Builtin", sizeof(info->bus_info));
+   strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
+   strscpy(info->version, UTS_RELEASE, sizeof(info->version));
+   strscpy(info->bus_info, "Builtin", sizeof(info->bus_info));
 }
 
 static int cvm_oct_nway_reset(struct net_device *dev)
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/13] staging: nvec: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/nvec/nvec_ps2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 45db29262..157009015 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -112,8 +112,8 @@ static int nvec_mouse_probe(struct platform_device *pdev)
ser_dev->start = ps2_startstreaming;
ser_dev->stop = ps2_stopstreaming;
 
-   strlcpy(ser_dev->name, "nvec mouse", sizeof(ser_dev->name));
-   strlcpy(ser_dev->phys, "nvec", sizeof(ser_dev->phys));
+   strscpy(ser_dev->name, "nvec mouse", sizeof(ser_dev->name));
+   strscpy(ser_dev->phys, "nvec", sizeof(ser_dev->phys));
 
ps2_dev.ser_dev = ser_dev;
ps2_dev.notifier.notifier_call = nvec_ps2_notifier;
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/13] staging: most: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/most/sound/sound.c | 2 +-
 drivers/staging/most/video/video.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/sound/sound.c 
b/drivers/staging/most/sound/sound.c
index 3a1a59058..c4287994b 100644
--- a/drivers/staging/most/sound/sound.c
+++ b/drivers/staging/most/sound/sound.c
@@ -525,7 +525,7 @@ static int audio_probe_channel(struct most_interface 
*iface, int channel_id,
pr_err("Incompatible channel type\n");
return -EINVAL;
}
-   strlcpy(arg_list_cpy, arg_list, STRING_SIZE);
+   strscpy(arg_list_cpy, arg_list, STRING_SIZE);
ret = split_arg_list(arg_list_cpy, _num, _res);
if (ret < 0)
return ret;
diff --git a/drivers/staging/most/video/video.c 
b/drivers/staging/most/video/video.c
index 829df899b..90933d78c 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -245,8 +245,8 @@ static int vidioc_querycap(struct file *file, void *priv,
struct comp_fh *fh = priv;
struct most_video_dev *mdev = fh->mdev;
 
-   strlcpy(cap->driver, "v4l2_component", sizeof(cap->driver));
-   strlcpy(cap->card, "MOST", sizeof(cap->card));
+   strscpy(cap->driver, "v4l2_component", sizeof(cap->driver));
+   strscpy(cap->card, "MOST", sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info),
 "%s", mdev->iface->description);
return 0;
@@ -483,7 +483,7 @@ static int comp_probe_channel(struct most_interface *iface, 
int channel_idx,
mdev->v4l2_dev.release = comp_v4l2_dev_release;
 
/* Create the v4l2_device */
-   strlcpy(mdev->v4l2_dev.name, name, sizeof(mdev->v4l2_dev.name));
+   strscpy(mdev->v4l2_dev.name, name, sizeof(mdev->v4l2_dev.name));
ret = v4l2_device_register(NULL, >v4l2_dev);
if (ret) {
pr_err("v4l2_device_register() failed\n");
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/13] staging: fsl-dpaa2: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c 
b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
index d7f4ed1df..0af2e9914 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c
@@ -38,19 +38,19 @@ static void dpaa2_switch_get_drvinfo(struct net_device 
*netdev,
u16 version_major, version_minor;
int err;
 
-   strlcpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));
+   strscpy(drvinfo->driver, KBUILD_MODNAME, sizeof(drvinfo->driver));
 
err = dpsw_get_api_version(port_priv->ethsw_data->mc_io, 0,
   _major,
   _minor);
if (err)
-   strlcpy(drvinfo->fw_version, "N/A",
+   strscpy(drvinfo->fw_version, "N/A",
sizeof(drvinfo->fw_version));
else
snprintf(drvinfo->fw_version, sizeof(drvinfo->fw_version),
 "%u.%u", version_major, version_minor);
 
-   strlcpy(drvinfo->bus_info, dev_name(netdev->dev.parent->parent),
+   strscpy(drvinfo->bus_info, dev_name(netdev->dev.parent->parent),
sizeof(drvinfo->bus_info));
 }
 
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/13] staging: greybus: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/greybus/audio_helper.c   | 2 +-
 drivers/staging/greybus/audio_module.c   | 2 +-
 drivers/staging/greybus/audio_topology.c | 6 +++---
 drivers/staging/greybus/power_supply.c   | 2 +-
 drivers/staging/greybus/spilib.c | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/greybus/audio_helper.c 
b/drivers/staging/greybus/audio_helper.c
index 3011b8abc..1ed4772d2 100644
--- a/drivers/staging/greybus/audio_helper.c
+++ b/drivers/staging/greybus/audio_helper.c
@@ -166,7 +166,7 @@ static int gbaudio_remove_controls(struct snd_card *card, 
struct device *dev,
snprintf(id.name, sizeof(id.name), "%s %s", prefix,
 control->name);
else
-   strlcpy(id.name, control->name, sizeof(id.name));
+   strscpy(id.name, control->name, sizeof(id.name));
id.numid = 0;
id.iface = control->iface;
id.device = control->device;
diff --git a/drivers/staging/greybus/audio_module.c 
b/drivers/staging/greybus/audio_module.c
index a243d60f0..0f9fdc077 100644
--- a/drivers/staging/greybus/audio_module.c
+++ b/drivers/staging/greybus/audio_module.c
@@ -342,7 +342,7 @@ static int gb_audio_probe(struct gb_bundle *bundle,
/* inform above layer for uevent */
dev_dbg(dev, "Inform set_event:%d to above layer\n", 1);
/* prepare for the audio manager */
-   strlcpy(desc.name, gbmodule->name, GB_AUDIO_MANAGER_MODULE_NAME_LEN);
+   strscpy(desc.name, gbmodule->name, GB_AUDIO_MANAGER_MODULE_NAME_LEN);
desc.vid = 2; /* todo */
desc.pid = 3; /* todo */
desc.intf_id = gbmodule->dev_id;
diff --git a/drivers/staging/greybus/audio_topology.c 
b/drivers/staging/greybus/audio_topology.c
index 662e3e8b4..e816e4db5 100644
--- a/drivers/staging/greybus/audio_topology.c
+++ b/drivers/staging/greybus/audio_topology.c
@@ -200,7 +200,7 @@ static int gbcodec_mixer_ctl_info(struct snd_kcontrol 
*kcontrol,
return -EINVAL;
name = gbaudio_map_controlid(module, data->ctl_id,
 uinfo->value.enumerated.item);
-   strlcpy(uinfo->value.enumerated.name, name, NAME_SIZE);
+   strscpy(uinfo->value.enumerated.name, name, NAME_SIZE);
break;
default:
dev_err(comp->dev, "Invalid type: %d for %s:kcontrol\n",
@@ -1047,7 +1047,7 @@ static int gbaudio_tplg_create_widget(struct 
gbaudio_module_info *module,
}
 
/* Prefix dev_id to widget control_name */
-   strlcpy(temp_name, w->name, NAME_SIZE);
+   strscpy(temp_name, w->name, NAME_SIZE);
snprintf(w->name, NAME_SIZE, "GB %d %s", module->dev_id, temp_name);
 
switch (w->type) {
@@ -1169,7 +1169,7 @@ static int gbaudio_tplg_process_kcontrols(struct 
gbaudio_module_info *module,
}
control->id = curr->id;
/* Prefix dev_id to widget_name */
-   strlcpy(temp_name, curr->name, NAME_SIZE);
+   strscpy(temp_name, curr->name, NAME_SIZE);
snprintf(curr->name, NAME_SIZE, "GB %d %s", module->dev_id,
 temp_name);
control->name = curr->name;
diff --git a/drivers/staging/greybus/power_supply.c 
b/drivers/staging/greybus/power_supply.c
index ec96f2888..75cb170e0 100644
--- a/drivers/staging/greybus/power_supply.c
+++ b/drivers/staging/greybus/power_supply.c
@@ -449,7 +449,7 @@ static int __gb_power_supply_set_name(char *init_name, char 
*name, size_t len)
 
if (!strlen(init_name))
init_name = "gb_power_supply";
-   strlcpy(name, init_name, len);
+   strscpy(name, init_name, len);
 
while ((ret < len) && (psy = power_supply_get_by_name(name))) {
power_supply_put(psy);
diff --git a/drivers/staging/greybus/spilib.c b/drivers/staging/greybus/spilib.c
index fc27c52de..672d540d3 100644
--- a/drivers/staging/greybus/spilib.c
+++ b/drivers/staging/greybus/spilib.c
@@ -455,10 +455,10 @@ static int gb_spi_setup_device(struct gb_spilib *spi, u8 
cs)
dev_type = response.device_type;
 
if (dev_type == GB_SPI_SPI_DEV)
-   strlcpy(spi_board.modalias, "spidev",
+   strscpy(spi_board.modalias, "spidev",
sizeof(spi_board.modalias));
else if (dev_type == GB_SPI_SPI_NOR)
-   strlcpy(spi_board.modalias, "spi-nor",
+   

[PATCH 00/13] Convert all users of strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
This series converts all existing users of strlcpy in drivers/staging to use
strscpy instead.

strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and
there is no functional difference when the caller expects truncation (when not
checking the return value). strscpy is relatively better as it also avoids
scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

The conversions were performed in two steps:

1. The following coccinelle script was used to identify and replace call sites
that expect truncation.

$ spatch --sp-file strscpy.cocci --include-headers --dir --in-place 
drivers/staging

@strscpy@
expression dest, src, size;
@@
-strlcpy(dest, src, size);
+strscpy(dest, src, size);

2. Each individual automated conversion was rechecked manually for correctness.

Kumar Kartikeya Dwivedi (13):
  staging: comedi: Switch from strlcpy to strscpy
  staging: greybus: Switch from strlcpy to strscpy
  staging: fsl-dpaa2: Switch from strlcpy to strscpy
  staging: most: Switch from strlcpy to strscpy
  staging: nvec: Switch from strlcpy to strscpy
  staging: octeon: Switch from strlcpy to strscpy
  staging: olpc_dcon: Switch from strlcpy to strscpy
  staging: rtl8188eu: Switch from strlcpy to strscpy
  staging: rtl8192e: Switch from strlcpy to strscpy
  staging: rtl8192u: Switch from strlcpy to strscpy
  staging: rtl8712: Switch from strlcpy to strscpy
  staging: sm750fb: Switch from strlcpy to strscpy
  staging: wimax: Switch from strlcpy to strscpy

 drivers/staging/comedi/comedi_fops.c  | 4 ++--
 drivers/staging/fsl-dpaa2/ethsw/ethsw-ethtool.c   | 6 +++---
 drivers/staging/greybus/audio_helper.c| 2 +-
 drivers/staging/greybus/audio_module.c| 2 +-
 drivers/staging/greybus/audio_topology.c  | 6 +++---
 drivers/staging/greybus/power_supply.c| 2 +-
 drivers/staging/greybus/spilib.c  | 4 ++--
 drivers/staging/most/sound/sound.c| 2 +-
 drivers/staging/most/video/video.c| 6 +++---
 drivers/staging/nvec/nvec_ps2.c   | 4 ++--
 drivers/staging/octeon/ethernet-mdio.c| 6 +++---
 drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 2 +-
 drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c   | 6 +++---
 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c | 2 +-
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 drivers/staging/sm750fb/sm750.c   | 2 +-
 drivers/staging/wimax/i2400m/netdev.c | 6 +++---
 drivers/staging/wimax/i2400m/usb.c| 4 ++--
 19 files changed, 35 insertions(+), 35 deletions(-)

-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/13] staging: comedi: Switch from strlcpy to strscpy

2021-01-31 Thread Kumar Kartikeya Dwivedi
strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
5dbdb2d87c29 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi 
---
 drivers/staging/comedi/comedi_fops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c 
b/drivers/staging/comedi/comedi_fops.c
index 80d74cce2..df77b6bf5 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -939,8 +939,8 @@ static int do_devinfo_ioctl(struct comedi_device *dev,
/* fill devinfo structure */
devinfo.version_code = COMEDI_VERSION_CODE;
devinfo.n_subdevs = dev->n_subdevices;
-   strlcpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
-   strlcpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
+   strscpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN);
+   strscpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN);
 
s = comedi_file_read_subdevice(file);
if (s)
-- 
2.29.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8192u/ieee80211: fix switch case indentation

2021-01-31 Thread Anirudh Rayabharam
Make switch and case to be at the same indent. This fixes the
checkpatch error "switch and case should be at the same indent".

Signed-off-by: Anirudh Rayabharam 
---
 .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 28 +--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c 
b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 63a561ab4a76..bd8914645e95 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -327,20 +327,20 @@ static void ieee80211_tx_query_agg_cap(struct 
ieee80211_device *ieee,
}
 FORCED_AGG_SETTING:
switch (pHTInfo->ForcedAMPDUMode) {
-   case HT_AGG_AUTO:
-   break;
-
-   case HT_AGG_FORCE_ENABLE:
-   tcb_desc->bAMPDUEnable = true;
-   tcb_desc->ampdu_density = pHTInfo->ForcedMPDUDensity;
-   tcb_desc->ampdu_factor = pHTInfo->ForcedAMPDUFactor;
-   break;
-
-   case HT_AGG_FORCE_DISABLE:
-   tcb_desc->bAMPDUEnable = false;
-   tcb_desc->ampdu_density = 0;
-   tcb_desc->ampdu_factor = 0;
-   break;
+   case HT_AGG_AUTO:
+   break;
+
+   case HT_AGG_FORCE_ENABLE:
+   tcb_desc->bAMPDUEnable = true;
+   tcb_desc->ampdu_density = pHTInfo->ForcedMPDUDensity;
+   tcb_desc->ampdu_factor = pHTInfo->ForcedAMPDUFactor;
+   break;
+
+   case HT_AGG_FORCE_DISABLE:
+   tcb_desc->bAMPDUEnable = false;
+   tcb_desc->ampdu_density = 0;
+   tcb_desc->ampdu_factor = 0;
+   break;
 
}
return;
-- 
2.26.2


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v8 00/14] Move Hisilicon 6421v600 SPMI and USB drivers out of staging

2021-01-31 Thread Greg Kroah-Hartman
On Fri, Jan 29, 2021 at 08:51:46PM +0100, Mauro Carvalho Chehab wrote:
> Hi Greg/Mark/Lee/Vinod,
> 
> Another rebase , also the top of staging-testing.
> 
> This series contain the remaining patches for USB to start working,
> except for a final DTS patch.
> 
> Patches 1 and 2 convert the SPMI and regulator
> drivers to use regmap and simplifies the logic by using
> regmap helpers.
> 
> Patches 3 to 9 address some issues pointed by Lee at the MFD driver.
> 
> I guess the best would be if Greg could apply patches 1 to 9
> via the staging tree.

I've taken these first 9 patches in my staging tree.  If any other
subsystem maintainer wants to ack the move of the files out of staging
to their respective subsystems, I'll gladly apply those patches here as
well.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


YOUR URGENT RESPONSE

2021-01-31 Thread Mr. Kim Leang
Greeting!

I am contacting you to receive and share with me an abandoned fund ( 
$21,537.000.00 ) left in our bank by a deceased customer. I was going through 
the Internet search when I found your email address. My name is Mr. Kim Leang.

I want to utilize this opportunity and make use of this fund if I should 
present your name to the bank to stand as his business associate/ trustee for 
the fund to be released to you via Visa card for easy withdrawals in any VISA 
ATM machine anywhere in the World.

The bank will also give you international online transfer options. With these 
you can transfer the funds without any risk.

Should you be interested in working with me in this project? Please reply back 
and let's benefit from this golden opportunity.You are my first contact.. I 
shall wait a few days and if I do not hear from you, I shall look for another 
person.

Thanks and have a nice day,
Mr. Kim Leang
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging:r8188eu: replace enum WIFI_STATUS_CODE with native kernel definitions

2021-01-31 Thread Ivan Safonov
Driver and kernel definitions are equal.
Avoid code duplication, improve readability.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 44 +--
 drivers/staging/rtl8188eu/include/wifi.h  | 14 --
 2 files changed, 22 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 8794907a39f4..ebd9b96a8211 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -779,7 +779,7 @@ static void issue_auth(struct adapter *padapter, struct 
sta_info *psta,
/*  setting auth algo number */
val16 = (u16)psta->authalg;
 
-   if (status != _STATS_SUCCESSFUL_)
+   if (status != WLAN_STATUS_SUCCESS)
val16 = 0;
 
if (val16) {
@@ -2675,13 +2675,13 @@ static unsigned int OnAuth(struct adapter *padapter,
DBG_88E("auth rejected due to bad alg [alg=%d, auth_mib=%d] 
%02X%02X%02X%02X%02X%02X\n",
algorithm, auth_mode, sa[0], sa[1], sa[2], sa[3], 
sa[4], sa[5]);
 
-   status = _STATS_NO_SUPP_ALG_;
+   status = WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG;
 
goto auth_fail;
}
 
if (!rtw_access_ctrl(padapter, sa)) {
-   status = _STATS_UNABLE_HANDLE_STA_;
+   status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
goto auth_fail;
}
 
@@ -2692,7 +2692,7 @@ static unsigned int OnAuth(struct adapter *padapter,
pstat = rtw_alloc_stainfo(pstapriv, sa);
if (!pstat) {
DBG_88E(" Exceed the upper limit of supported 
clients...\n");
-   status = _STATS_UNABLE_HANDLE_STA_;
+   status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
goto auth_fail;
}
 
@@ -2724,7 +2724,7 @@ static unsigned int OnAuth(struct adapter *padapter,
if ((pstat->auth_seq + 1) != seq) {
DBG_88E("(1)auth rejected because out of seq [rx_seq=%d, 
exp_seq=%d]!\n",
seq, pstat->auth_seq + 1);
-   status = _STATS_OUT_OF_AUTH_SEQ_;
+   status = WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION;
goto auth_fail;
}
 
@@ -2737,7 +2737,7 @@ static unsigned int OnAuth(struct adapter *padapter,
} else {
DBG_88E("(2)auth rejected because out of seq 
[rx_seq=%d, exp_seq=%d]!\n",
seq, pstat->auth_seq + 1);
-   status = _STATS_OUT_OF_AUTH_SEQ_;
+   status = WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION;
goto auth_fail;
}
} else { /*  shared system or auto authentication */
@@ -2757,7 +2757,7 @@ static unsigned int OnAuth(struct adapter *padapter,
 
if (!p || ie_len <= 0) {
DBG_88E("auth rejected because challenge 
failure!(1)\n");
-   status = _STATS_CHALLENGE_FAIL_;
+   status = WLAN_STATUS_CHALLENGE_FAIL;
goto auth_fail;
}
 
@@ -2768,13 +2768,13 @@ static unsigned int OnAuth(struct adapter *padapter,
pstat->expire_to =  pstapriv->assoc_to;
} else {
DBG_88E("auth rejected because challenge 
failure!\n");
-   status = _STATS_CHALLENGE_FAIL_;
+   status = WLAN_STATUS_CHALLENGE_FAIL;
goto auth_fail;
}
} else {
DBG_88E("(3)auth rejected because out of seq 
[rx_seq=%d, exp_seq=%d]!\n",
seq, pstat->auth_seq + 1);
-   status = _STATS_OUT_OF_AUTH_SEQ_;
+   status = WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION;
goto auth_fail;
}
}
@@ -2782,7 +2782,7 @@ static unsigned int OnAuth(struct adapter *padapter,
/*  Now, we are going to issue_auth... */
pstat->auth_seq = seq + 1;
 
-   issue_auth(padapter, pstat, (unsigned short)(_STATS_SUCCESSFUL_));
+   issue_auth(padapter, pstat, (unsigned short)(WLAN_STATUS_SUCCESS));
 
if (pstat->state & WIFI_FW_AUTH_SUCCESS)
pstat->auth_seq = 0;
@@ -2892,7 +2892,7 @@ static unsigned int OnAssocReq(struct adapter *padapter,
int i, wpa_ie_len, left;
unsigned char supportRate[16];
int supportRateNum;
-   unsigned short status = _STATS_SUCCESSFUL_;
+   unsigned short status = WLAN_STATUS_SUCCESS;
unsigned short frame_type, ie_offset = 0;
struct mlme_priv *pmlmepriv = >mlmepriv;
struct 

[PATCH] staging:rtl8712: remove unused enum WIFI_STATUS_CODE

2021-01-31 Thread Ivan Safonov
Improve readability.

Signed-off-by: Ivan Safonov 
---
 drivers/staging/rtl8712/wifi.h | 14 --
 1 file changed, 14 deletions(-)

diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h
index 601d4ff607bc..1b32b3510093 100644
--- a/drivers/staging/rtl8712/wifi.h
+++ b/drivers/staging/rtl8712/wifi.h
@@ -101,20 +101,6 @@ enum WIFI_REASON_CODE  {
_RSON_PMK_NOT_AVAILABLE_= 24,
 };
 
-enum WIFI_STATUS_CODE {
-   _STATS_SUCCESSFUL_  = 0,
-   _STATS_FAILURE_ = 1,
-   _STATS_CAP_FAIL_= 10,
-   _STATS_NO_ASOC_ = 11,
-   _STATS_OTHER_   = 12,
-   _STATS_NO_SUPP_ALG_ = 13,
-   _STATS_OUT_OF_AUTH_SEQ_ = 14,
-   _STATS_CHALLENGE_FAIL_  = 15,
-   _STATS_AUTH_TIMEOUT_= 16,
-   _STATS_UNABLE_HANDLE_STA_   = 17,
-   _STATS_RATE_FAIL_   = 18,
-};
-
 enum WIFI_REG_DOMAIN {
DOMAIN_FCC  = 1,
DOMAIN_IC   = 2,
-- 
2.26.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel