Re: [bug report] pinctrl: gemini: Fix GMAC groups

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

 



On Mon, Nov 13, 2017 at 12:42 PM, Dan Carpenter
<dan.carpenter@xxxxxxxxxx> wrote:

> Hello Linus Walleij,
>
> The patch 756a024f3983: "pinctrl: gemini: Fix GMAC groups" from Nov
> 6, 2017, leads to the following static checker warning:
>
>         drivers/pinctrl/pinctrl-gemini.c:2190 gemini_pmx_set_mux()
>         error: buffer overflow 'gemini_padgroups' 21 <= 26
>
> drivers/pinctrl/pinctrl-gemini.c
>   2180          /* Print changed states */
>   2181          tmp = grp->mask;
>   2182          for_each_set_bit(i, &tmp, PADS_MAXBIT) {
>                                           ^^^^^^^^^^^
> We boosted this from 20 to 27
>
>   2183                  bool enabled = !(i > 3);
>   2184
>   2185                  /* Did not go low though it should */
>   2186                  if (after & BIT(i)) {
>   2187                          dev_err(pmx->dev,
>   2188                                  "pin group %s could not be %s: "
>   2189                                  "probably a hardware limitation\n",
>   2190                                  gemini_padgroups[i],
>                                         ^^^^^^^^^^^^^^^^^^^
> so we need to add more strings to this array as well.

I'm impressed by this static checking, thanks a *lot*!

I've sent a patch to fix it up.

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