diff mbox series

pinctrl: single: Remove invalid message

Message ID 20171214165115.27150-1-tony@atomide.com
State New
Headers show
Series pinctrl: single: Remove invalid message | expand

Commit Message

Tony Lindgren Dec. 14, 2017, 4:51 p.m. UTC
Pinctrl single should just show how many pins were found, the physical
address is already in the dev information. So let's remove the wrong
information that claims to show the physical address but really prints
a virtual address that is now hashed.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/pinctrl/pinctrl-single.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Haojian Zhuang Dec. 17, 2017, 5:25 a.m. UTC | #1
On 2017/12/15 0:51, Tony Lindgren wrote:
> Pinctrl single should just show how many pins were found, the physical
> address is already in the dev information. So let's remove the wrong
> information that claims to show the physical address but really prints
> a virtual address that is now hashed.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>   drivers/pinctrl/pinctrl-single.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -1774,8 +1774,7 @@ static int pcs_probe(struct platform_device *pdev)
>   			dev_warn(pcs->dev, "initialized with no interrupts\n");
>   	}
>   
> -	dev_info(pcs->dev, "%i pins at pa %p size %u\n",
> -		 pcs->desc.npins, pcs->base, pcs->size);
> +	dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
>   
>   	return pinctrl_enable(pcs->pctl);
>   
> 
Hi Tony,

If there's only one pinctrl region in SoC, it's fine to remove the pa 
part. But there're always multiple pinctrl regions in Hisilicon SoCs. It 
causes multiple pinctrl register bases are used. Will it cause debug 
information harder to read when pa parts are removed?

Best Regards
Haojian
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren Dec. 17, 2017, 4:07 p.m. UTC | #2
* Haojian Zhuang <haojian.zhuang@linaro.org> [171217 05:43]:
> On 2017/12/15 0:51, Tony Lindgren wrote:
> > Pinctrl single should just show how many pins were found, the physical
> > address is already in the dev information. So let's remove the wrong
> > information that claims to show the physical address but really prints
> > a virtual address that is now hashed.
> > 
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >   drivers/pinctrl/pinctrl-single.c | 3 +--
> >   1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> > --- a/drivers/pinctrl/pinctrl-single.c
> > +++ b/drivers/pinctrl/pinctrl-single.c
> > @@ -1774,8 +1774,7 @@ static int pcs_probe(struct platform_device *pdev)
> >   			dev_warn(pcs->dev, "initialized with no interrupts\n");
> >   	}
> > -	dev_info(pcs->dev, "%i pins at pa %p size %u\n",
> > -		 pcs->desc.npins, pcs->base, pcs->size);
> > +	dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
> >   	return pinctrl_enable(pcs->pctl);
> > 
> Hi Tony,
> 
> If there's only one pinctrl region in SoC, it's fine to remove the pa part.
> But there're always multiple pinctrl regions in Hisilicon SoCs. It causes
> multiple pinctrl register bases are used. Will it cause debug information
> harder to read when pa parts are removed?

I doubt as for years now we've been printing out the va instead of pa
and so far nobody noticed :) We still get the real device pa with the
dev_info, size and number of pins.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Haojian Zhuang Dec. 18, 2017, 12:21 a.m. UTC | #3
On 2017/12/18 0:07, Tony Lindgren wrote:
> * Haojian Zhuang <haojian.zhuang@linaro.org> [171217 05:43]:
>> On 2017/12/15 0:51, Tony Lindgren wrote:
>>> Pinctrl single should just show how many pins were found, the physical
>>> address is already in the dev information. So let's remove the wrong
>>> information that claims to show the physical address but really prints
>>> a virtual address that is now hashed.
>>>
>>> Signed-off-by: Tony Lindgren <tony@atomide.com>
>>> ---
>>>    drivers/pinctrl/pinctrl-single.c | 3 +--
>>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
>>> --- a/drivers/pinctrl/pinctrl-single.c
>>> +++ b/drivers/pinctrl/pinctrl-single.c
>>> @@ -1774,8 +1774,7 @@ static int pcs_probe(struct platform_device *pdev)
>>>    			dev_warn(pcs->dev, "initialized with no interrupts\n");
>>>    	}
>>> -	dev_info(pcs->dev, "%i pins at pa %p size %u\n",
>>> -		 pcs->desc.npins, pcs->base, pcs->size);
>>> +	dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
>>>    	return pinctrl_enable(pcs->pctl);
>>>
>> Hi Tony,
>>
>> If there's only one pinctrl region in SoC, it's fine to remove the pa part.
>> But there're always multiple pinctrl regions in Hisilicon SoCs. It causes
>> multiple pinctrl register bases are used. Will it cause debug information
>> harder to read when pa parts are removed?
> 
> I doubt as for years now we've been printing out the va instead of pa
> and so far nobody noticed :) We still get the real device pa with the
> dev_info, size and number of pins.
> 

OK

Regards
Haojian

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij Dec. 20, 2017, 11:39 a.m. UTC | #4
On Thu, Dec 14, 2017 at 5:51 PM, Tony Lindgren <tony@atomide.com> wrote:

> Pinctrl single should just show how many pins were found, the physical
> address is already in the dev information. So let's remove the wrong
> information that claims to show the physical address but really prints
> a virtual address that is now hashed.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1774,8 +1774,7 @@  static int pcs_probe(struct platform_device *pdev)
 			dev_warn(pcs->dev, "initialized with no interrupts\n");
 	}
 
-	dev_info(pcs->dev, "%i pins at pa %p size %u\n",
-		 pcs->desc.npins, pcs->base, pcs->size);
+	dev_info(pcs->dev, "%i pins, size %u\n", pcs->desc.npins, pcs->size);
 
 	return pinctrl_enable(pcs->pctl);