From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
<kavyasree.kotagiri@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
Colin Foster <colin.foster@in-advantage.com>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Michael Walle <michael@walle.cc>
Subject: Re: [PATCH v3 1/2] pinctrl: ocelot: Fix pincfg for lan966x
Date: Mon, 11 Jul 2022 22:21:50 +0200 [thread overview]
Message-ID: <20220711202150.7yoxazefe3zzlzpw@soft-dev3-1.localhost> (raw)
In-Reply-To: <CAHp75Vfs8EH-rRn58cS692tZMRFmjFLv6=kB4oqVEGXi5R8BHQ@mail.gmail.com>
The 07/11/2022 21:47, Andy Shevchenko wrote:
>
> On Mon, Jul 11, 2022 at 9:17 PM Horatiu Vultur
> <horatiu.vultur@microchip.com> wrote:
> >
> > The blamed commit introduce support for lan966x which use the same
> > pinconf_ops as sparx5. The problem is that pinconf_ops is specific to
> > sparx5. More precisely the offset of the bits in the pincfg register are
> > different and also lan966x doesn't have support for
> > PIN_CONFIG_INPUT_SCHMITT_ENABLE.
> >
> > Fix this by making pinconf_ops more generic such that it can be also
> > used by lan966x. This is done by introducing 'ocelot_pincfg_data' which
> > contains the offset and what is supported for each SOC.
>
>
> ...
>
> > + info->pincfg_data = devm_kmemdup(dev, &data->pincfg_data,
> > + sizeof(struct ocelot_match_data),
>
> sizeof(*info->pincfg_data)
> (isn't it a bug here?)
Yes it looks like it is. I think underneath it still allocates a page so
that could be the reason why I haven't see any crashes when I have tried
it.
I will fix this in the next version.
>
> > + GFP_KERNEL);
>
> and missed the NULL check.
>
> --
> With Best Regards,
> Andy Shevchenko
--
/Horatiu
next prev parent reply other threads:[~2022-07-11 20:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 19:21 [PATCH v3 0/2] pinctrl: ocelot: Add fixes for ocelot driver Horatiu Vultur
2022-07-11 19:21 ` [PATCH v3 1/2] pinctrl: ocelot: Fix pincfg for lan966x Horatiu Vultur
2022-07-11 19:47 ` Andy Shevchenko
2022-07-11 20:21 ` Horatiu Vultur [this message]
2022-07-12 3:53 ` Colin Foster
2022-07-11 19:21 ` [PATCH v3 2/2] pinctrl: ocelot: Fix pincfg Horatiu Vultur
2022-07-11 19:51 ` Andy Shevchenko
2022-07-11 20:26 ` Horatiu Vultur
2022-07-11 20:29 ` Andy Shevchenko
2022-07-11 20:33 ` Andy Shevchenko
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=20220711202150.7yoxazefe3zzlzpw@soft-dev3-1.localhost \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andy.shevchenko@gmail.com \
--cc=colin.foster@in-advantage.com \
--cc=kavyasree.kotagiri@microchip.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=michael@walle.cc \
/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).