[PATCH] ram: mediatek: mt7629: include <linux/sizes.h>

Weijie Gao (高惟杰) Weijie.Gao at mediatek.com
Fri Aug 4 03:09:20 CEST 2023


On Mon, 2023-07-31 at 19:34 +0100, Daniel Golle wrote:
> Something between U-Boot 2023.04 and 2023.07.02 resulted in no
> longer
> implicitely including <linux/sizes.h> in the DDR3 RAM driver for the
> MT7929 SoC. The result is a build failure:
> drivers/ram/mediatek/ddr3-mt7629.c: In function 'mtk_ddr3_get_info':
> drivers/ram/mediatek/ddr3-mt7629.c:734:30: error: 'SZ_128M'
> undeclared (first use in this function)
>   734 |                 info->size = SZ_128M;
>       |                              ^~~~~~~
> drivers/ram/mediatek/ddr3-mt7629.c:734:30: note: each undeclared
> identifier is reported only once for each function it appears in
> drivers/ram/mediatek/ddr3-mt7629.c:737:30: error: 'SZ_256M'
> undeclared (first use in this function)
>   737 |                 info->size = SZ_256M;
>       |                              ^~~~~~~
> drivers/ram/mediatek/ddr3-mt7629.c:740:30: error: 'SZ_512M'
> undeclared (first use in this function)
>   740 |                 info->size = SZ_512M;
>       |                              ^~~~~~~
> drivers/ram/mediatek/ddr3-mt7629.c:743:30: error: 'SZ_1G' undeclared
> (first use in this function)
>   743 |                 info->size = SZ_1G;
>       |                              ^~~~~
> 
> Include <linux/sizes.h> so SZ_* is defined.
> 
> Reported-by: Tianling Shen <cnsztl at immortalwrt.org>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> 

Reviewed-by: Weijie Gao <weijie.gao at mediatek.com>


More information about the U-Boot mailing list