Re: [PATCH] sh-pfc: handle pin array holes in sh_pfc_map_pins()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 6, 2015 at 11:58 AM, Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
> Hi Linus,
>
> On Friday 06 March 2015 11:43:45 Linus Walleij wrote:
>> On Sat, Feb 28, 2015 at 12:39 AM, Sergei Shtylyov 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@xxxxxxxxxxxxxxxxxx>
>> >
>> > ---
>> > 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.
>
> Could you also drop "pinctrl: sh-pfc: r8a7790: Remove non existing GPIO pins"
> and "pinctrl: sh-pfc: r8a7791: Remove non existing GPIO pins" for the same
> reason ? Sorry for the trouble.

OK dropped them (rebased .... argh hope noone will kick my ass)

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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux