Re: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")

From: Linus Torvalds
Date: Fri May 27 2022 - 14:56:47 EST


On Fri, May 27, 2022 at 2:07 AM Sudip Mukherjee
<sudipm.mukherjee@xxxxxxxxx> wrote:
>
> declared with attribute error: BUILD_BUG_ON failed: sizeof(*edid) != EDID_LENGTH
>
> And, reverting it on top of mainline branch has fixed the build failure.

Hmm. That BUILD_BUG_ON() looks entirely correct, and if that sizeof()
doesn't work, then the code doesn't work.

I'm not seeing what could go wrong in there, with all the structures I
see being marked as __packed__.

I wonder if the union in 'struct detailed_timing' also wants that
"__attribute__((packed))" but I also wonder what it is that would make
this fail on spear3xx but not elsewhere.

Very strange. It would be interesting to know where that sizeof goes
wrong, but it would seem to be something very peculiar to your build
environment (either that config, or your compiler).

Linus