linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linus.walleij@linaro.org, andriy.shevchenko@linux.intel.com
Subject: Re: [PATCH 1/2] pinctrl: ocelot: Fix the pincfg resource.
Date: Thu, 3 Mar 2022 13:28:05 -0800	[thread overview]
Message-ID: <20220303212805.GA19085@COLIN-DESKTOP1.localdomain> (raw)
In-Reply-To: <20220303203716.3012703-2-horatiu.vultur@microchip.com>

Hi Horatiu,

On Thu, Mar 03, 2022 at 09:37:15PM +0100, Horatiu Vultur wrote:
> The pincfg resources are in the second memory resource. But the driver
> still tries to access the first memory resource to get the pincfg. This
> is wrong therefore fix to access the second memory resource.
> 
> Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call")

Sorry for this bug, but thanks for finding / fixing it. Digging through
my commit log to make sure I didn't make the same mistake a _third_ time
:(

For what it's worth:

Reviewed-by: Colin Foster <colin.foster@in-advantage.com>

> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  drivers/pinctrl/pinctrl-ocelot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
> index 685c79e08d40..a859fbcb09af 100644
> --- a/drivers/pinctrl/pinctrl-ocelot.c
> +++ b/drivers/pinctrl/pinctrl-ocelot.c
> @@ -1892,7 +1892,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
>  		.max_register = 32,
>  	};
>  
> -	base = devm_platform_ioremap_resource(pdev, 0);
> +	base = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(base)) {
>  		dev_dbg(&pdev->dev, "Failed to ioremap config registers (no extended pinconf)\n");
>  		return NULL;
> -- 
> 2.33.0
> 

  reply	other threads:[~2022-03-03 21:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 20:37 [PATCH 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-03-03 20:37 ` [PATCH 1/2] pinctrl: ocelot: Fix the pincfg resource Horatiu Vultur
2022-03-03 21:28   ` Colin Foster [this message]
2022-03-03 20:37 ` [PATCH 2/2] pinctrl: ocelot: Fix interrupt parsing Horatiu Vultur
2022-03-04 12:40   ` Andy Shevchenko
2022-03-04 12:41     ` Andy Shevchenko
2022-03-04 14:26       ` Horatiu Vultur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220303212805.GA19085@COLIN-DESKTOP1.localdomain \
    --to=colin.foster@in-advantage.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).