From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] sh-pfc: handle pin array holes in sh_pfc_map_pins()
Date: Fri, 06 Mar 2015 15:17:36 +0200 [thread overview]
Message-ID: <1595394.zdJD8lWkjG@avalon> (raw)
In-Reply-To: <54F9A09D.7040909@cogentembedded.com>
Hi Sergei,
On Friday 06 March 2015 15:42:05 Sergei Shtylyov wrote:
> On 3/6/2015 1:43 PM, Linus Walleij wrote:
> >> The pin array handled by sh_pfc_map_pins() may contain holes
> >> representing non- existing pins. We have to first count the valid pins
> >> in order to calculate the size of the memory to be allocated, then to
> >> skip over the non-existing pins when initializing the allocated arrays,
> >> and then to return the number of valid pins from sh_pfc_map_pins()
> >> instead of 0 on success.
> >>
> >> As we have to touch devm_kzalloc() calls anyway, use more fitting
> >> devm_kcalloc() instead which additionally checks the array size. And
> >> since PINMUX_TYPE_NONE is #define'd as 0, stop re-initializing already
> >> zeroed out 'pmx->configs' array.
> >>
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>
> >> ---
> >> The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git'
> >> repo. This patch should be applied before my R8A7794 PFC support patch
> >> and before Laurent's patches removing non-existent GPIOs for R8A779[01],
> >> otherwise they would cause the kernel to hang while booting!
> >
> > OK not applying this until ACKed by Laurent,
> > and in the meantime I'm taking the three applied R8A7794 patches
> > out of my tree again.
>
> Thanks!
>
> > Can you please send these depending patches as a series with this
> > patch as 1/4 and the three R8A7794 patches as 2,3,4/4? Thanks.
>
> OK, will try to remember. But what about Lauren't 2 patches also
> dependent on this one?
If you don't mind, please also include them in your series.
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] sh-pfc: handle pin array holes in sh_pfc_map_pins()
Date: Fri, 06 Mar 2015 13:17:36 +0000 [thread overview]
Message-ID: <1595394.zdJD8lWkjG@avalon> (raw)
In-Reply-To: <54F9A09D.7040909@cogentembedded.com>
Hi Sergei,
On Friday 06 March 2015 15:42:05 Sergei Shtylyov wrote:
> On 3/6/2015 1:43 PM, Linus Walleij wrote:
> >> The pin array handled by sh_pfc_map_pins() may contain holes
> >> representing non- existing pins. We have to first count the valid pins
> >> in order to calculate the size of the memory to be allocated, then to
> >> skip over the non-existing pins when initializing the allocated arrays,
> >> and then to return the number of valid pins from sh_pfc_map_pins()
> >> instead of 0 on success.
> >>
> >> As we have to touch devm_kzalloc() calls anyway, use more fitting
> >> devm_kcalloc() instead which additionally checks the array size. And
> >> since PINMUX_TYPE_NONE is #define'd as 0, stop re-initializing already
> >> zeroed out 'pmx->configs' array.
> >>
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >>
> >> ---
> >> The patch is against the 'devel' branch of Linus W.'s 'linux-pinctrl.git'
> >> repo. This patch should be applied before my R8A7794 PFC support patch
> >> and before Laurent's patches removing non-existent GPIOs for R8A779[01],
> >> otherwise they would cause the kernel to hang while booting!
> >
> > OK not applying this until ACKed by Laurent,
> > and in the meantime I'm taking the three applied R8A7794 patches
> > out of my tree again.
>
> Thanks!
>
> > Can you please send these depending patches as a series with this
> > patch as 1/4 and the three R8A7794 patches as 2,3,4/4? Thanks.
>
> OK, will try to remember. But what about Lauren't 2 patches also
> dependent on this one?
If you don't mind, please also include them in your series.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-03-06 13:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 23:39 [PATCH] sh-pfc: handle pin array holes in sh_pfc_map_pins() Sergei Shtylyov
2015-02-27 23:39 ` Sergei Shtylyov
2015-03-03 0:24 ` Laurent Pinchart
2015-03-03 0:24 ` Laurent Pinchart
2015-04-24 20:12 ` Sergei Shtylyov
2015-04-24 20:12 ` Sergei Shtylyov
2015-04-29 22:38 ` Sergei Shtylyov
2015-04-29 22:38 ` Sergei Shtylyov
2015-05-27 8:52 ` Geert Uytterhoeven
2015-05-27 8:52 ` Geert Uytterhoeven
2015-06-03 20:57 ` Sergei Shtylyov
2015-06-03 20:57 ` Sergei Shtylyov
2015-03-06 10:43 ` Linus Walleij
2015-03-06 10:43 ` Linus Walleij
2015-03-06 10:58 ` Laurent Pinchart
2015-03-06 10:58 ` Laurent Pinchart
2015-03-09 17:11 ` Linus Walleij
2015-03-09 17:11 ` Linus Walleij
2015-03-06 12:42 ` Sergei Shtylyov
2015-03-06 12:42 ` Sergei Shtylyov
2015-03-06 13:17 ` Laurent Pinchart [this message]
2015-03-06 13:17 ` Laurent Pinchart
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=1595394.zdJD8lWkjG@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.