Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34529 )
Change subject: soc/nvidia/tegra210: Prevent implicit integer promotion ......................................................................
Patch Set 1:
Patch Set 1:
IIRC we had some sort of general agreement in coreboot that we don't care about -Wshift-overflow=2 and don't want to litter all our code with casts just to work around this purely theoretical non-problem? If so, wouldn't this be the same kind of issue, and shouldn't we then equally ignore it?
Hmmmm, I didn't know about that and that's a good point. In this case though things are slightly worse, since tegra_dsi_writel() expects a 64 bit integer for that argument, and if it's negative it will be sign extended to a very large unsigned integer. In this case, tegra_dsi_writel() only needs to write a 32 bit integer, so I think I'll change the argument to a u32 instead to avoid the sign extension.