[GIT PULL] Staging driver fixes for 5.0-rc2

2019-01-13 Thread Greg KH
The following changes since commit bfeffd155283772bbe78c6a05dec7c0128ee500c:

  Linux 5.0-rc1 (2019-01-06 17:08:20 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
tags/staging-5.0-rc2

for you to fetch changes up to 06382deac2b8a49bbc5aaa3c9118fed6da4a1ac1:

  Revert "staging: rtl8723bs: Mark ACPI table declaration as used" (2019-01-11 
10:40:13 +0100)


Staging driver fixes for 5.0-rc2

Here are some small staging driver fixes for some reported issues.

One reverts a patch that was made to the rtl8723bs driver that turned
out to not be needed at all as it was a bug in clang.  The others fix up
some reported issues in the rtl8188eu driver and update the MAINTAINERS
file to point to Larry for this driver so he can get the bug reports
easier.

All have been in linux-next with no reported issues.

Signed-off-by: Greg Kroah-Hartman 


Greg Kroah-Hartman (1):
  Revert "staging: rtl8723bs: Mark ACPI table declaration as used"

Larry Finger (3):
  MAINTAINERS: Add entry for staging driver r8188eu
  staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
  staging: rtl8188eu: Fix module loading from tasklet for WEP encryption

 MAINTAINERS   | 5 +
 drivers/staging/rtl8188eu/core/rtw_security.c | 6 +++---
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  | 2 +-
 3 files changed, 9 insertions(+), 4 deletions(-)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: rtl8712u: Remove dummy reset-resume callback

2019-01-13 Thread Kai-Heng Feng
An USB wireless dongle uses rtl8712u stops working after system
suspend/resume.

When a USB device lost its power during suspend, the USB core knows the
power was lost and a reset-resume or a re-probe is required. But rtl8712u
provides a dummy reset-resume callback, which gets called and renders
the device dead after resume.

So remove the reset-resume call back, if power was lost during suspend,
let the USB core unbind and probe the device to solve the issue.

Signed-off-by: Kai-Heng Feng 
---
 drivers/staging/rtl8712/usb_intf.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8712/usb_intf.c 
b/drivers/staging/rtl8712/usb_intf.c
index 92d75d7c51ae..9cf2a798cfca 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -232,13 +232,6 @@ static int r871x_resume(struct usb_interface *pusb_intf)
rtl871x_intf_resume(padapter);
return 0;
 }
-
-static int r871x_reset_resume(struct usb_interface *pusb_intf)
-{
-   /* dummy routine */
-   return 0;
-}
-
 #endif
 
 static struct drv_priv drvpriv = {
@@ -249,7 +242,6 @@ static struct drv_priv drvpriv = {
 #ifdef CONFIG_PM
.r871xu_drv.suspend = r871x_suspend,
.r871xu_drv.resume = r871x_resume,
-   .r871xu_drv.reset_resume = r871x_reset_resume,
 #endif
 };
 
-- 
2.17.1

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


[PATCH 2/2] staging: rtl8712u: Fix suspend and resume callbacks

2019-01-13 Thread Kai-Heng Feng
When system resume and the rtl8712u dongle didn't lose its power, it
doesn't work quite right:
[  146.844241] r8712u 2-3:1.0 wlp0s4f1u3: Unable to resume
...
[  154.029573] r8712u 2-3:1.0 wlp0s4f1u3: In r8711_wx_set_scan: bDriverStopped=1

The !netif_running() check in PM callbacks aren't correct because
rtl8712u doesn't support runtime suspend, so the when the PM ops get
called, it's system suspend or system resume, hence we want to "stop
everthing" or "resume everything".

The NULL check on pnetdev is also redundant, the only place pnetdev can
become NULL is the disconnect callback, which is mutually exclusive to
PM callbacks.

This can make rtl8712u starts working after system resume.

Signed-off-by: Kai-Heng Feng 
---
 drivers/staging/rtl8712/usb_intf.c | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/rtl8712/usb_intf.c 
b/drivers/staging/rtl8712/usb_intf.c
index 9cf2a798cfca..005010de9997 100644
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -196,10 +196,6 @@ static int r871x_suspend(struct usb_interface *pusb_intf, 
pm_message_t state)
struct _adapter *padapter = netdev_priv(pnetdev);
 
netdev_info(pnetdev, "Suspending...\n");
-   if (!pnetdev || !netif_running(pnetdev)) {
-   netdev_info(pnetdev, "Unable to suspend\n");
-   return 0;
-   }
padapter->bSuspended = true;
rtl871x_intf_stop(padapter);
if (pnetdev->netdev_ops->ndo_stop)
@@ -221,10 +217,6 @@ static int r871x_resume(struct usb_interface *pusb_intf)
struct _adapter *padapter = netdev_priv(pnetdev);
 
netdev_info(pnetdev,  "Resuming...\n");
-   if (!pnetdev || !netif_running(pnetdev)) {
-   netdev_info(pnetdev, "Unable to resume\n");
-   return 0;
-   }
netif_device_attach(pnetdev);
if (pnetdev->netdev_ops->ndo_open)
pnetdev->netdev_ops->ndo_open(pnetdev);
-- 
2.17.1

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


Re: [PATCH v5 3/3] staging: greybus: arche-platform: Switch to the gpio descriptor interface

2019-01-13 Thread Nishad Kamdar
On Fri, Jan 11, 2019 at 09:48:21AM +0100, Johan Hovold wrote:
> On Thu, Jan 10, 2019 at 11:23:07PM +0530, Nishad Kamdar wrote:
> > Use the gpiod interface instead of the deprecated old non-descriptor
> > interface while continuing to ignore gpio flags from device tree in
> > "svc_reset_onoff()" for now.
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> > Changes in v5:
> >   - Change the commit message.
> >   - Restore the names of the gpio device-tree properties without
> > the "-gpio" suffix.
> > Changes in v4:
> >  - Move 'gpio_desc *svc_sysboot' below the reset flag
> >as it is more logical to have reset flag below
> >reset gpio.
> >  - Remove a few unnecessary line breaks.
> > Changes in v3:
> >  - Add this patch to a patchset.
> > Changes in v2:
> >  - Move comment to the same line as to what it applies to.
> > ---
> 
> Also looks good. Some really minor comments to a couple of the error
> messages. The issues are there in the current code, but since you modify
> these messages anyway you might as well fix them up. Please fix that and
> resend with my
> 
> Reviewed-by: Johan Hovold 
> 
Ok, I'll do that.

> Really good job with this!
> 
Thank you.
> > @@ -435,6 +428,7 @@ static int arche_platform_probe(struct platform_device 
> > *pdev)
> > struct device *dev = &pdev->dev;
> > struct device_node *np = dev->of_node;
> > int ret;
> > +   unsigned int flags;
> >  
> > arche_pdata = devm_kzalloc(&pdev->dev, sizeof(*arche_pdata),
> >GFP_KERNEL);
> > @@ -444,61 +438,33 @@ static int arche_platform_probe(struct 
> > platform_device *pdev)
> > /* setup svc reset gpio */
> > arche_pdata->is_reset_act_hi = of_property_read_bool(np,
> >  
> > "svc,reset-active-high");
> > -   arche_pdata->svc_reset_gpio = of_get_named_gpio(np,
> > -   "svc,reset-gpio",
> > -   0);
> > -   if (!gpio_is_valid(arche_pdata->svc_reset_gpio)) {
> > -   dev_err(dev, "failed to get reset-gpio\n");
> > -   return arche_pdata->svc_reset_gpio;
> > -   }
> > -   ret = devm_gpio_request(dev, arche_pdata->svc_reset_gpio, "svc-reset");
> > -   if (ret) {
> > -   dev_err(dev, "failed to request svc-reset gpio:%d\n", ret);
> > -   return ret;
> > -   }
> > -   ret = gpio_direction_output(arche_pdata->svc_reset_gpio,
> > -   arche_pdata->is_reset_act_hi);
> > -   if (ret) {
> > -   dev_err(dev, "failed to set svc-reset gpio dir:%d\n", ret);
> > +   if (arche_pdata->is_reset_act_hi)
> > +   flags = GPIOD_OUT_HIGH;
> > +   else
> > +   flags = GPIOD_OUT_LOW;
> > +
> > +   arche_pdata->svc_reset = devm_gpiod_get(dev, "svc,reset", flags);
> > +   if (IS_ERR(arche_pdata->svc_reset)) {
> > +   ret = PTR_ERR(arche_pdata->svc_reset);
> > +   dev_err(dev, "failed to request svc-reset GPIO:%d\n", ret);
> 
> Add a space after ':' for consistency.
> 
Ok. I'll do that.
> > @@ -515,19 +481,11 @@ static int arche_platform_probe(struct 
> > platform_device *pdev)
> > arche_pdata->num_apbs = of_get_child_count(np);
> > dev_dbg(dev, "Number of APB's available - %d\n", arche_pdata->num_apbs);
> >  
> > -   arche_pdata->wake_detect_gpio = of_get_named_gpio(np,
> > - 
> > "svc,wake-detect-gpio",
> > - 0);
> > -   if (arche_pdata->wake_detect_gpio < 0) {
> > -   dev_err(dev, "failed to get wake detect gpio\n");
> > -   return arche_pdata->wake_detect_gpio;
> > -   }
> > -
> > -   ret = devm_gpio_request(dev, arche_pdata->wake_detect_gpio,
> > -   "wake detect");
> > -   if (ret) {
> > -   dev_err(dev, "Failed requesting wake_detect gpio %d\n",
> > -   arche_pdata->wake_detect_gpio);
> > +   arche_pdata->wake_detect = devm_gpiod_get(dev, "svc,wake-detect",
> > + GPIOD_IN);
> > +   if (IS_ERR(arche_pdata->wake_detect)) {
> > +   ret = PTR_ERR(arche_pdata->wake_detect);
> > +   dev_err(dev, "Failed requesting wake_detect GPIO %d\n", ret);
> 
> Add colon after "GPIO" for consistency (and to avoid ambiguity).
> 

Ok, I'll do that.

Thanks for the review,
Nishad
> > return ret;
> > }
> 
> Thanks,
> Johan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v5 2/3] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface

2019-01-13 Thread Nishad Kamdar
On Fri, Jan 11, 2019 at 09:41:34AM +0100, Johan Hovold wrote:
> On Thu, Jan 10, 2019 at 11:21:04PM +0530, Nishad Kamdar wrote:
> > Use the gpiod interface instead of the deprecated old non-descriptor
> > interface while continuing to ignore gpio flags from device tree in
> > functions "deassert_reset()" and "assert_reset()" for now.
> > 
> > Signed-off-by: Nishad Kamdar 
> > ---
> > Changes in v5:
> >  - Change the commit message.
> >  - Restore the names of the gpio device-tree properties without
> >the "-gpio" suffix.
> > Changes in v4:
> >  - Use gpiod_set_raw_value() for deassert_reset() and
> >assert_reset() as gpiod_set_value() will change the
> >sematics of these calls by taking any gpio flags
> >into account.
> >  - Remove some unnecesssary line breaks.
> >  - Restore 'spi_en' gpio check in fw_flashing_seq()
> >as it is currently optional.
> > Changes in v3:
> >  - Add this patch in a patchset.
> > Changes in v2:
> >  - Resolved compilation errors.
> > ---
> 
> Also looks good now. You can add my
> 
> Reviewed-by: Johan Hovold 
> 
> Found one really minor nit below, which doesn't really need to be fixed,
> but since you may need to update the third patch, you might as well
> consider this too.
> 
Ok, I'll do that.
> > /* It's not mandatory to support power management interface */
> > -   apb->pwroff_gpio = of_get_named_gpio(np, "pwr-off-gpios", 0);
> > -   if (apb->pwroff_gpio < 0) {
> > -   dev_err(dev, "failed to get power off gpio\n");
> > -   return apb->pwroff_gpio;
> > -   }
> > -   ret = devm_gpio_request_one(dev, apb->pwroff_gpio,
> > -   GPIOF_IN, "pwroff_n");
> > -   if (ret) {
> > -   dev_err(dev, "Failed requesting pwroff_n gpio %d\n",
> > -   apb->pwroff_gpio);
> > +   apb->pwroff = devm_gpiod_get_optional(dev, "pwr-off",
> > + GPIOD_IN);
> 
> Looks like you don't need to break the above statement any more either.
> 
> > +   if (IS_ERR(apb->pwroff)) {
> > +   ret = PTR_ERR(apb->pwroff);
> > +   dev_err(dev, "Failed requesting pwroff_n GPIO: %d\n", ret);
> > return ret;
> > }
> >  
> > /* Do not make clock mandatory as of now (for DB3) */
> > -   apb->clk_en_gpio = of_get_named_gpio(np, "clock-en-gpio", 0);
> > -   if (apb->clk_en_gpio < 0) {
> > -   dev_warn(dev, "failed to get clock en gpio\n");
> > -   } else if (gpio_is_valid(apb->clk_en_gpio)) {
> > -   ret = devm_gpio_request_one(dev, apb->clk_en_gpio,
> > -   GPIOF_OUT_INIT_LOW, "apb_clk_en");
> > -   if (ret) {
> > -   dev_warn(dev, "Failed requesting APB clock en gpio 
> > %d\n",
> > -apb->clk_en_gpio);
> > -   return ret;
> > -   }
> > +   apb->clk_en = devm_gpiod_get_optional(dev, "clock-en",
> > + GPIOD_OUT_LOW);
> 
> Same here?
> 
Ok, I'll do that.

Thanks and regards,
Nishad
> > +   if (IS_ERR(apb->clk_en)) {
> > +   ret = PTR_ERR(apb->clk_en);
> > +   dev_err(dev, "Failed requesting APB clock en GPIO: %d\n", ret);
> > +   return ret;
> > }
> 
> Johan
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [GIT PULL] Staging driver fixes for 5.0-rc2

2019-01-13 Thread pr-tracker-bot
The pull request you sent on Sun, 13 Jan 2019 11:23:42 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 
> tags/staging-5.0-rc2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f7c1038bc7597af5d6809c5b3e0352627cef5c07

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v2] vmbus: Switch to use new generic UUID API

2019-01-13 Thread Michael Kelley
From: Andy Shevchenko  Sent: Thursday, 
January 10, 2019 6:26 AM
> 
> There are new types and helpers that are supposed to be used in new code.
> 
> As a preparation to get rid of legacy types and API functions do
> the conversion here.
> 
> Cc: "K. Y. Srinivasan" 
> Cc: Haiyang Zhang 
> Cc: Stephen Hemminger 
> Cc: de...@linuxdriverproject.org
> Signed-off-by: Andy Shevchenko 
> ---
> 
> v2:
> - leave uapi untouched (Christoph, Haiyang)
> - rebase on top of latest linux-next
> 
>  drivers/hv/channel.c  |  4 +-
>  drivers/hv/channel_mgmt.c | 18 +++
>  drivers/hv/hyperv_vmbus.h |  4 +-
>  drivers/hv/vmbus_drv.c| 48 +++
>  include/linux/hyperv.h| 98 +++
>  5 files changed, 79 insertions(+), 93 deletions(-)

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


[PATCH] staging: mt7621-pinctrl: fix pinmux warning at boot

2019-01-13 Thread Greg Ungerer
Fix unassigned "num_maps" when calling pinctrl_utils_reserve_map() in
the satging mt7621-pinctrl driver. Although we do set an initial "map"
pointer to NULL, there is no initialization of the "num_maps" argument.

Uninitialized "num_maps" causes the following warning on boot on 5.0-rc1:

[ cut here ]
WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:4511 
__alloc_pages_nodemask+0x1d0/0xb70
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc1-4-gf3cdc52549a2 #2
Stack : 0046   807e 87d1e580 8006fb04 8072da9c 000b
  8072d2dc 87c3d894 8077 0001 87c3d828 588f41e8
  8082   807e76a6 0047 
2d316372    8077  806eb6b8 0009
119f 8077 8070 807016cc 0010 0001  807e
...
Call Trace:
[<8000cfe0>] show_stack+0x94/0x12c
[<8060dd7c>] dump_stack+0x8c/0xd0
[<80028430>] __warn+0x10c/0x120
[<80028554>] warn_slowpath_null+0x44/0x60
[<800e27a8>] __alloc_pages_nodemask+0x1d0/0xb70
[<800fe4a8>] kmalloc_order+0x20/0x54
[<800fe858>] krealloc+0x7c/0x108
[<802ec9c8>] pinctrl_utils_reserve_map+0x88/0x100
[<80445f0c>] rt2880_pinctrl_dt_node_to_map+0xa0/0x18c
[<802ede20>] pinctrl_dt_to_map+0x274/0x394
[<802eb7cc>] create_pinctrl+0x80/0x478
[<802ebd7c>] pinctrl_enable+0x20/0x148
[<802ebed0>] pinctrl_register+0x2c/0x50
[<80446514>] rt2880_pinmux_probe+0x51c/0x758
[<80352d24>] platform_drv_probe+0x40/0x9c
[<80350e48>] really_probe+0x1f0/0x35c
[<8034ed74>] bus_for_each_drv+0x78/0xd0
[<80350c10>] __device_attach+0xdc/0x11c
[<8034ff04>] bus_probe_device+0xa0/0xbc
[<8034c548>] device_add+0x3c8/0x618
[<8043df90>] of_platform_device_create_pdata+0xac/0x120
[<8043e1b4>] of_platform_bus_create+0x168/0x260
[<8043e42c>] of_platform_populate+0x7c/0xec
[<8079985c>] __dt_register_buses+0x70/0x90
[<80798df0>] plat_of_setup+0x1c/0x34
[<800015f4>] do_one_initcall+0x50/0x1ac
[<80795e48>] kernel_init_freeable+0x184/0x26c
[<8062bad4>] kernel_init+0x14/0x110
[<80007198>] ret_from_kernel_thread+0x14/0x1c
---[ end trace d752c6e38e5b8de8 ]---
rt2880-pinmux pinctrl: krealloc(map) failed
rt2880-pinmux pinctrl: can't reserve map: -12
rt2880-pinmux pinctrl: error claiming hogs: -12
rt2880-pinmux pinctrl: could not claim hogs: -12
rt2880-pinmux: probe of pinctrl failed with error -12

Signed-off-by: Greg Ungerer 
---
 drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c 
b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
index aa98fbb17013..b007f905b24e 100644
--- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
+++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
@@ -89,6 +89,7 @@ static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev 
*pctrldev,
ngroups++;
 
*map = NULL;
+   *num_maps = 0;
ret = pinctrl_utils_reserve_map(pctrldev, map, &reserved_maps,
num_maps, ngroups);
if (ret) {
-- 
2.17.1

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


Re: [PATCH] staging: mt7621-pinctrl: fix pinmux warning at boot

2019-01-13 Thread Sergio Paracuellos
Hi Greg,

On Mon, Jan 14, 2019 at 6:36 AM Greg Ungerer  wrote:
>
> Fix unassigned "num_maps" when calling pinctrl_utils_reserve_map() in
> the satging mt7621-pinctrl driver. Although we do set an initial "map"
> pointer to NULL, there is no initialization of the "num_maps" argument.
>
> Uninitialized "num_maps" causes the following warning on boot on 5.0-rc1:
>
> [ cut here ]
> WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:4511 
> __alloc_pages_nodemask+0x1d0/0xb70
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc1-4-gf3cdc52549a2 #2
> Stack : 0046   807e 87d1e580 8006fb04 8072da9c 
> 000b
>   8072d2dc 87c3d894 8077 0001 87c3d828 
> 588f41e8
>   8082   807e76a6 0047 
> 
> 2d316372    8077  806eb6b8 
> 0009
> 119f 8077 8070 807016cc 0010 0001  
> 807e
> ...
> Call Trace:
> [<8000cfe0>] show_stack+0x94/0x12c
> [<8060dd7c>] dump_stack+0x8c/0xd0
> [<80028430>] __warn+0x10c/0x120
> [<80028554>] warn_slowpath_null+0x44/0x60
> [<800e27a8>] __alloc_pages_nodemask+0x1d0/0xb70
> [<800fe4a8>] kmalloc_order+0x20/0x54
> [<800fe858>] krealloc+0x7c/0x108
> [<802ec9c8>] pinctrl_utils_reserve_map+0x88/0x100
> [<80445f0c>] rt2880_pinctrl_dt_node_to_map+0xa0/0x18c
> [<802ede20>] pinctrl_dt_to_map+0x274/0x394
> [<802eb7cc>] create_pinctrl+0x80/0x478
> [<802ebd7c>] pinctrl_enable+0x20/0x148
> [<802ebed0>] pinctrl_register+0x2c/0x50
> [<80446514>] rt2880_pinmux_probe+0x51c/0x758
> [<80352d24>] platform_drv_probe+0x40/0x9c
> [<80350e48>] really_probe+0x1f0/0x35c
> [<8034ed74>] bus_for_each_drv+0x78/0xd0
> [<80350c10>] __device_attach+0xdc/0x11c
> [<8034ff04>] bus_probe_device+0xa0/0xbc
> [<8034c548>] device_add+0x3c8/0x618
> [<8043df90>] of_platform_device_create_pdata+0xac/0x120
> [<8043e1b4>] of_platform_bus_create+0x168/0x260
> [<8043e42c>] of_platform_populate+0x7c/0xec
> [<8079985c>] __dt_register_buses+0x70/0x90
> [<80798df0>] plat_of_setup+0x1c/0x34
> [<800015f4>] do_one_initcall+0x50/0x1ac
> [<80795e48>] kernel_init_freeable+0x184/0x26c
> [<8062bad4>] kernel_init+0x14/0x110
> [<80007198>] ret_from_kernel_thread+0x14/0x1c
> ---[ end trace d752c6e38e5b8de8 ]---
> rt2880-pinmux pinctrl: krealloc(map) failed
> rt2880-pinmux pinctrl: can't reserve map: -12
> rt2880-pinmux pinctrl: error claiming hogs: -12
> rt2880-pinmux pinctrl: could not claim hogs: -12
> rt2880-pinmux: probe of pinctrl failed with error -12
>
> Signed-off-by: Greg Ungerer 
> ---
>  drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c 
> b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
> index aa98fbb17013..b007f905b24e 100644
> --- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
> +++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
> @@ -89,6 +89,7 @@ static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev 
> *pctrldev,
> ngroups++;
>
> *map = NULL;
> +   *num_maps = 0;
> ret = pinctrl_utils_reserve_map(pctrldev, map, &reserved_maps,
> num_maps, ngroups);
> if (ret) {
> --
> 2.17.1
>

This warning has been fixed and patches applied to the staging tree
last week. Please see:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=0ca1f90861b6d64386261096b42bfc81ce11948a
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=bd7c95d48854af2db899bc8b6966a0e9b9f5bf4e

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


Re: [PATCH] staging: mt7621-pinctrl: fix pinmux warning at boot

2019-01-13 Thread Greg Ungerer

Hi Sergio,

On 14/1/19 4:45 pm, Sergio Paracuellos wrote:

On Mon, Jan 14, 2019 at 6:36 AM Greg Ungerer  wrote:


Fix unassigned "num_maps" when calling pinctrl_utils_reserve_map() in
the satging mt7621-pinctrl driver. Although we do set an initial "map"
pointer to NULL, there is no initialization of the "num_maps" argument.

Uninitialized "num_maps" causes the following warning on boot on 5.0-rc1:

[ cut here ]
WARNING: CPU: 0 PID: 1 at mm/page_alloc.c:4511 
__alloc_pages_nodemask+0x1d0/0xb70
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc1-4-gf3cdc52549a2 #2
Stack : 0046   807e 87d1e580 8006fb04 8072da9c 000b
   8072d2dc 87c3d894 8077 0001 87c3d828 588f41e8
   8082   807e76a6 0047 
 2d316372    8077  806eb6b8 0009
 119f 8077 8070 807016cc 0010 0001  807e
 ...
Call Trace:
[<8000cfe0>] show_stack+0x94/0x12c
[<8060dd7c>] dump_stack+0x8c/0xd0
[<80028430>] __warn+0x10c/0x120
[<80028554>] warn_slowpath_null+0x44/0x60
[<800e27a8>] __alloc_pages_nodemask+0x1d0/0xb70
[<800fe4a8>] kmalloc_order+0x20/0x54
[<800fe858>] krealloc+0x7c/0x108
[<802ec9c8>] pinctrl_utils_reserve_map+0x88/0x100
[<80445f0c>] rt2880_pinctrl_dt_node_to_map+0xa0/0x18c
[<802ede20>] pinctrl_dt_to_map+0x274/0x394
[<802eb7cc>] create_pinctrl+0x80/0x478
[<802ebd7c>] pinctrl_enable+0x20/0x148
[<802ebed0>] pinctrl_register+0x2c/0x50
[<80446514>] rt2880_pinmux_probe+0x51c/0x758
[<80352d24>] platform_drv_probe+0x40/0x9c
[<80350e48>] really_probe+0x1f0/0x35c
[<8034ed74>] bus_for_each_drv+0x78/0xd0
[<80350c10>] __device_attach+0xdc/0x11c
[<8034ff04>] bus_probe_device+0xa0/0xbc
[<8034c548>] device_add+0x3c8/0x618
[<8043df90>] of_platform_device_create_pdata+0xac/0x120
[<8043e1b4>] of_platform_bus_create+0x168/0x260
[<8043e42c>] of_platform_populate+0x7c/0xec
[<8079985c>] __dt_register_buses+0x70/0x90
[<80798df0>] plat_of_setup+0x1c/0x34
[<800015f4>] do_one_initcall+0x50/0x1ac
[<80795e48>] kernel_init_freeable+0x184/0x26c
[<8062bad4>] kernel_init+0x14/0x110
[<80007198>] ret_from_kernel_thread+0x14/0x1c
---[ end trace d752c6e38e5b8de8 ]---
rt2880-pinmux pinctrl: krealloc(map) failed
rt2880-pinmux pinctrl: can't reserve map: -12
rt2880-pinmux pinctrl: error claiming hogs: -12
rt2880-pinmux pinctrl: could not claim hogs: -12
rt2880-pinmux: probe of pinctrl failed with error -12

Signed-off-by: Greg Ungerer 
---
  drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c 
b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
index aa98fbb17013..b007f905b24e 100644
--- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
+++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
@@ -89,6 +89,7 @@ static int rt2880_pinctrl_dt_node_to_map(struct pinctrl_dev 
*pctrldev,
 ngroups++;

 *map = NULL;
+   *num_maps = 0;
 ret = pinctrl_utils_reserve_map(pctrldev, map, &reserved_maps,
 num_maps, ngroups);
 if (ret) {
--
2.17.1



This warning has been fixed and patches applied to the staging tree
last week. Please see:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=0ca1f90861b6d64386261096b42bfc81ce11948a
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=bd7c95d48854af2db899bc8b6966a0e9b9f5bf4e


Ok, great, thanks.

Regards
Greg



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