# git rev-parse -q --verify 21b136cc63d2a9ddd60d4699552b69c214b32964^{commit} 21b136cc63d2a9ddd60d4699552b69c214b32964 already have revision, skipping fetch # git checkout -q -f -B kisskb 21b136cc63d2a9ddd60d4699552b69c214b32964 # git clean -qxdf # < git log -1 # commit 21b136cc63d2a9ddd60d4699552b69c214b32964 # Author: Linus Torvalds # Date: Tue Jul 30 15:44:16 2024 -0700 # # minmax: fix up min3() and max3() too # # David Laight pointed out that we should deal with the min3() and max3() # mess too, which still does excessive expansion. # # And our current macros are actually rather broken. # # In particular, the macros did this: # # #define min3(x, y, z) min((typeof(x))min(x, y), z) # #define max3(x, y, z) max((typeof(x))max(x, y), z) # # and that not only is a nested expansion of possibly very complex # arguments with all that involves, the typing with that "typeof()" cast # is completely wrong. # # For example, imagine what happens in max3() if 'x' happens to be a # 'unsigned char', but 'y' and 'z' are 'unsigned long'. The types are # compatible, and there's no warning - but the result is just random # garbage. # # No, I don't think we've ever hit that issue in practice, but since we # now have sane infrastructure for doing this right, let's just use it. # It fixes any excessive expansion, and also avoids these kinds of broken # type issues. # # Requested-by: David Laight # Acked-by: Arnd Bergmann # Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux-ld --version # < git log --format=%s --max-count=1 21b136cc63d2a9ddd60d4699552b69c214b32964 # make -s -j 160 ARCH=mips O=/kisskb/build/linus_ip22_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- ip22_defconfig # < make -s -j 160 ARCH=mips O=/kisskb/build/linus_ip22_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- help # make -s -j 160 ARCH=mips O=/kisskb/build/linus_ip22_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- olddefconfig # make -s -j 160 ARCH=mips O=/kisskb/build/linus_ip22_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- /kisskb/src/arch/mips/sgi-ip22/ip22-gio.c:384:14: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types] .match = gio_bus_match, ^~~~~~~~~~~~~ /kisskb/src/arch/mips/sgi-ip22/ip22-gio.c:384:14: note: (near initialization for 'gio_bus_type.match') cc1: some warnings being treated as errors make[5]: *** [/kisskb/src/scripts/Makefile.build:244: arch/mips/sgi-ip22/ip22-gio.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [/kisskb/src/scripts/Makefile.build:485: arch/mips/sgi-ip22] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [/kisskb/src/scripts/Makefile.build:485: arch/mips] Error 2 make[3]: *** Waiting for unfinished jobs.... /kisskb/src/drivers/scsi/sgiwd93.c:173:6: warning: no previous prototype for 'sgiwd93_reset' [-Wmissing-prototypes] void sgiwd93_reset(unsigned long base) ^~~~~~~~~~~~~ make[2]: *** [/kisskb/src/Makefile:1925: .] Error 2 make[1]: *** [/kisskb/src/Makefile:224: __sub-make] Error 2 make: *** [Makefile:224: __sub-make] Error 2 Command 'make -s -j 160 ARCH=mips O=/kisskb/build/linus_ip22_defconfig_mips-gcc8 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-8.5.0-nolibc/mips-linux/bin/mips-linux- ' returned non-zero exit status 2. # rm -rf /kisskb/build/linus_ip22_defconfig_mips-gcc8 # Build took: 0:01:22.811547