[PATCH] rts5208: fix a missing check of the status of sd_init_power

2018-12-25 Thread Kangjie Lu
sd_init_power() could fail. The fix inserts a check of its status. If it
fails, returns STATUS_FAIL.

Signed-off-by: Kangjie Lu 
---
 drivers/staging/rts5208/sd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index ff1a9aa152ce..8c3fd885a4f3 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -2352,7 +2352,9 @@ static int reset_sd(struct rtsx_chip *chip)
break;
}
 
-   sd_init_power(chip);
+   retval = sd_init_power(chip);
+   if (retval != STATUS_SUCCESS)
+   goto status_fail;
 
sd_dummy_clock(chip);
}
-- 
2.17.2 (Apple Git-113)

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


Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Sergio Paracuellos
Hi David,

On Mon, Dec 24, 2018 at 11:15 PM David Miller  wrote:
>
> From: Sergio Paracuellos 
> Date: Sat, 22 Dec 2018 08:39:09 +0100
>
> > Switch bindings for spi managed mode are using spaces instead of tabs.
> > Fix them to get a file with a proper kernel indentation style.
> >
> > Signed-off-by: Sergio Paracuellos 
>
> This doesn't apply to any of my trees so I'm going to assume this was
> targetting the devicetree GIT tree or something like that.

Actually, this was rebased onto linux-next. Which tree do you want me
to rebase onto?

Best regards,
Sergio Paracuellos
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Andrew Lunn
On Tue, Dec 25, 2018 at 12:45:11PM +0100, Sergio Paracuellos wrote:
> Hi David,
> 
> On Mon, Dec 24, 2018 at 11:15 PM David Miller  wrote:
> >
> > From: Sergio Paracuellos 
> > Date: Sat, 22 Dec 2018 08:39:09 +0100
> >
> > > Switch bindings for spi managed mode are using spaces instead of tabs.
> > > Fix them to get a file with a proper kernel indentation style.
> > >
> > > Signed-off-by: Sergio Paracuellos 
> >
> > This doesn't apply to any of my trees so I'm going to assume this was
> > targetting the devicetree GIT tree or something like that.
> 
> Actually, this was rebased onto linux-next. Which tree do you want me
> to rebase onto?

Hi Sergio

It should be based on net-next. However, that is closed now, so please
wait until it reopens in about two weeks time.

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


Re: [PATCH] dt-bindings: net: dsa: ksz9477: fix indentation for switch spi bindings

2018-12-25 Thread Sergio Paracuellos
On Tue, Dec 25, 2018 at 1:39 PM Andrew Lunn  wrote:
>
> On Tue, Dec 25, 2018 at 12:45:11PM +0100, Sergio Paracuellos wrote:
> > Hi David,
> >
> > On Mon, Dec 24, 2018 at 11:15 PM David Miller  wrote:
> > >
> > > From: Sergio Paracuellos 
> > > Date: Sat, 22 Dec 2018 08:39:09 +0100
> > >
> > > > Switch bindings for spi managed mode are using spaces instead of tabs.
> > > > Fix them to get a file with a proper kernel indentation style.
> > > >
> > > > Signed-off-by: Sergio Paracuellos 
> > >
> > > This doesn't apply to any of my trees so I'm going to assume this was
> > > targetting the devicetree GIT tree or something like that.
> >
> > Actually, this was rebased onto linux-next. Which tree do you want me
> > to rebase onto?
>
> Hi Sergio
>
> It should be based on net-next. However, that is closed now, so please
> wait until it reopens in about two weeks time.

Hi Andrew,

Ok, I'll resend v2 rebased onto net-next when merge window is close in
about two weeks.

Thanks for let me know.

>
>  Thanks
> Andrew

Best regards,
Sergio Paracuellos
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc100: make function wilc_get_stats_async static

2018-12-25 Thread Marko Stankovic
Makes local function wilc_get_stats_async() static

Cleans up sparse warning:
symbol 'wilc_get_stats_async' was not declared. Should it be static?

Signed-off-by: Marko Stankovic 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 70c854d939ce..5dae6e7155d3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1992,7 +1992,7 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
return result;
 }
 
-int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
+static int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
 {
int result;
struct host_if_msg *msg;
-- 
2.17.1

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


[PATCH] staging: wilc1000: make function wilc_get_stats_async static

2018-12-25 Thread Marko Stankovic
Makes local function wilc_get_stats_async() static

Cleans up sparse warning:
symbol 'wilc_get_stats_async' was not declared. Should it be static?

Signed-off-by: Marko Stankovic 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 70c854d939ce..5dae6e7155d3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1992,7 +1992,7 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
return result;
 }
 
-int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
+static int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
 {
int result;
struct host_if_msg *msg;
-- 
2.17.1

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


[PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it
fails, issue an error message.

Signed-off-by: Kangjie Lu 
---
 drivers/staging/rtl8712/hal_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/hal_init.c 
b/drivers/staging/rtl8712/hal_init.c
index 7cdd609cab6c..7e2f8e0185d5 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -45,7 +45,8 @@ static void rtl871x_load_fw_cb(const struct firmware 
*firmware, void *context)
}
padapter->fw = firmware;
/* firmware available - start netdev */
-   register_netdev(padapter->pnetdev);
+   if (register_netdev(padapter->pnetdev))
+   dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
 }
 
 static const char firmware_file[] = "rtlwifi/rtl8712u.bin";
-- 
2.17.2 (Apple Git-113)

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


Re: [PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread kbuild test robot
Hi Kangjie,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kangjie-Lu/rtl8712-add-a-check-for-the-status-of-register_netdev/20181226-094828
config: nds32-allmodconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=6.4.0 make.cross ARCH=nds32 

All errors (new ones prefixed by >>):

   In file included from include/linux/usb/ch9.h:36:0,
from include/linux/usb.h:6,
from drivers/staging//rtl8712/hal_init.c:19:
   drivers/staging//rtl8712/hal_init.c: In function 'rtl871x_load_fw_cb':
>> drivers/staging//rtl8712/hal_init.c:49:12: error: 'udev' undeclared (first 
>> use in this function)
  dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
   ^
   include/linux/device.h:1453:11: note: in definition of macro 'dev_err'
 _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~
   drivers/staging//rtl8712/hal_init.c:49:12: note: each undeclared identifier 
is reported only once for each function it appears in
  dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
   ^
   include/linux/device.h:1453:11: note: in definition of macro 'dev_err'
 _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~

vim +/udev +49 drivers/staging//rtl8712/hal_init.c

18  
  > 19  #include 
20  #include 
21  #include 
22  #include 
23  #include 
24  
25  #include "osdep_service.h"
26  #include "drv_types.h"
27  #include "usb_osintf.h"
28  
29  #define FWBUFF_ALIGN_SZ 512
30  #define MAX_DUMP_FWSZ   49152 /*default = 49152 (48k)*/
31  
32  static void rtl871x_load_fw_cb(const struct firmware *firmware, void 
*context)
33  {
34  struct _adapter *padapter = context;
35  
36  complete(&padapter->rtl8712_fw_ready);
37  if (!firmware) {
38  struct usb_device *udev = padapter->dvobjpriv.pusbdev;
39  struct usb_interface *pusb_intf = padapter->pusb_intf;
40  
41  dev_err(&udev->dev, "r8712u: Firmware request 
failed\n");
42  usb_put_dev(udev);
43  usb_set_intfdata(pusb_intf, NULL);
44  return;
45  }
46  padapter->fw = firmware;
47  /* firmware available - start netdev */
48  if (register_netdev(padapter->pnetdev))
  > 49  dev_err(&udev->dev, "r8712u: Registering netdev 
failed\n");
50  }
51  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread kbuild test robot
Hi Kangjie,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kangjie-Lu/rtl8712-add-a-check-for-the-status-of-register_netdev/20181226-094828
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

   In file included from include/linux/usb/ch9.h:36,
from include/linux/usb.h:6,
from drivers/staging/rtl8712/hal_init.c:19:
   drivers/staging/rtl8712/hal_init.c: In function 'rtl871x_load_fw_cb':
>> drivers/staging/rtl8712/hal_init.c:49:12: error: 'udev' undeclared (first 
>> use in this function); did you mean 'cdev'?
  dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
   ^~~~
   include/linux/device.h:1453:11: note: in definition of macro 'dev_err'
 _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~
   drivers/staging/rtl8712/hal_init.c:49:12: note: each undeclared identifier 
is reported only once for each function it appears in
  dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
   ^~~~
   include/linux/device.h:1453:11: note: in definition of macro 'dev_err'
 _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~

vim +49 drivers/staging/rtl8712/hal_init.c

18  
  > 19  #include 
20  #include 
21  #include 
22  #include 
23  #include 
24  
25  #include "osdep_service.h"
26  #include "drv_types.h"
27  #include "usb_osintf.h"
28  
29  #define FWBUFF_ALIGN_SZ 512
30  #define MAX_DUMP_FWSZ   49152 /*default = 49152 (48k)*/
31  
32  static void rtl871x_load_fw_cb(const struct firmware *firmware, void 
*context)
33  {
34  struct _adapter *padapter = context;
35  
36  complete(&padapter->rtl8712_fw_ready);
37  if (!firmware) {
38  struct usb_device *udev = padapter->dvobjpriv.pusbdev;
39  struct usb_interface *pusb_intf = padapter->pusb_intf;
40  
41  dev_err(&udev->dev, "r8712u: Firmware request 
failed\n");
42  usb_put_dev(udev);
43  usb_set_intfdata(pusb_intf, NULL);
44  return;
45  }
46  padapter->fw = firmware;
47  /* firmware available - start netdev */
48  if (register_netdev(padapter->pnetdev))
  > 49  dev_err(&udev->dev, "r8712u: Registering netdev 
failed\n");
50  }
51  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it
fails, issue an error message.

Signed-off-by: Kangjie Lu 
---
 drivers/staging/rtl8712/hal_init.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/hal_init.c 
b/drivers/staging/rtl8712/hal_init.c
index 7cdd609cab6c..ca0858660a45 100644
--- a/drivers/staging/rtl8712/hal_init.c
+++ b/drivers/staging/rtl8712/hal_init.c
@@ -32,10 +32,10 @@
 static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
 {
struct _adapter *padapter = context;
+   struct usb_device *udev = padapter->dvobjpriv.pusbdev;
 
complete(&padapter->rtl8712_fw_ready);
if (!firmware) {
-   struct usb_device *udev = padapter->dvobjpriv.pusbdev;
struct usb_interface *pusb_intf = padapter->pusb_intf;
 
dev_err(&udev->dev, "r8712u: Firmware request failed\n");
@@ -45,7 +45,8 @@ static void rtl871x_load_fw_cb(const struct firmware 
*firmware, void *context)
}
padapter->fw = firmware;
/* firmware available - start netdev */
-   register_netdev(padapter->pnetdev);
+   if (register_netdev(padapter->pnetdev))
+   dev_err(&udev->dev, "r8712u: Registering netdev failed\n");
 }
 
 static const char firmware_file[] = "rtlwifi/rtl8712u.bin";
-- 
2.17.2 (Apple Git-113)

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


[PATCH] staging: erofs: fix return type of erofs_workgroup_get

2018-12-25 Thread Gao Xiang
There exists a return type misuse (`int'->`bool') since all
users assume it fails if only return value != 0, let's fix
the return type to `int' instead of confusing `bool'.

No logic changes.

Signed-off-by: Gao Xiang 
---
 drivers/staging/erofs/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/erofs/internal.h b/drivers/staging/erofs/internal.h
index e049d00c087a..49c587383315 100644
--- a/drivers/staging/erofs/internal.h
+++ b/drivers/staging/erofs/internal.h
@@ -252,7 +252,7 @@ static inline int erofs_wait_on_workgroup_freezed(struct 
erofs_workgroup *grp)
 }
 #endif
 
-static inline bool erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
+static inline int erofs_workgroup_get(struct erofs_workgroup *grp, int *ocnt)
 {
int o;
 
-- 
2.14.4

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


Re: [PATCH] staging: erofs: fix return type of erofs_workgroup_get

2018-12-25 Thread Chao Yu
On 2018/12/26 11:34, Gao Xiang wrote:
> There exists a return type misuse (`int'->`bool') since all
> users assume it fails if only return value != 0, let's fix
> the return type to `int' instead of confusing `bool'.
> 
> No logic changes.
> 
> Signed-off-by: Gao Xiang 

Reviewed-by: Chao Yu 

Thanks,

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