sparse error: got __int128

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

 



Example:

drivers/acpi/processor_core.i:6109:26: error: Expected ) at end of cast operator
drivers/acpi/processor_core.i:6109:26: error: got __int128

Passing a large list of files causes the error count to exceed 100, whereupon
sparse exits.

The offending source is in include/linux/math64.h

#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__)

#ifndef mul_u64_u32_shr
static inline u64 mul_u64_u32_shr(u64 a, u32 mul, unsigned int shift)
{
        return (u64)(((unsigned __int128)a * mul) >> shift);
}
#endif /* mul_u64_u32_shr */

Of course, disabling 64-bit kernel in .config removes the problem, but this is
an unacceptable solution.

I can't see clearly why sparse should flag this as an error.
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux