Re: [PATCH] pinctrl: tegra: use signed bitfields for optional fields

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

 



On 2015-03-15 01:05, Stefan Agner wrote:
> Optional fields are set to -1 by various preprocessor macros. Make
> sure the struct fields can actually store them.
> 
> Signed-off-by: Stefan Agner <stefan@xxxxxxxx>
> ---
> This lead to a lot of warnings when compiling the Tegra pinctrl drivers
> using LLVM/clang:
> 
> drivers/pinctrl/pinctrl-tegra124.c:2048:2: warning: implicit truncation from
> 'int' to bitfield changes value from -1 to 63 [-Wbitfield-constant-conversion]
>         MIPI_PAD_CTRL_PINGROUP(dsi_b,   0x820, 1, CSI, DSI_B)
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/pinctrl/pinctrl-tegra124.c:1807:18: note: expanded from macro
> 'MIPI_PAD_CTRL_PINGROUP'
>                 .rcv_sel_bit = -1,                                      \
>                                ^~
> 
> However, I did not check if this could actually lead to an unintended
> pin configuration...

Stephen, what do you think about this? While I think the patch  is the
right thing to do, it could actually introduce nasty regressions (stuff
which was working due to  "accidentally" wrong pin configuration)...

I need to admit that I did not actually run a kernel with that patch.

--
Stefan
--
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