Sparse errors

Bharath Vedartham linux.bhar at gmail.com
Thu Mar 28 15:24:21 EDT 2019


On Thu, Mar 28, 2019 at 10:57:34PM +0400, Ozgur Kara wrote:
> 
> 
> 28.03.2019, 22:34, "Bharath Vedartham" <linux.bhar at gmail.com>:
> > Hey all,
> >
> > When I run sparse, I get sparse errors. Sparse says "too many errors".
> > For example when I run: make C=2 fs/ext4/
> > This is the error messages I get for one of the files.
> >   CHECK fs/ext4/ioctl.c
> >   ./arch/x86/include/asm/nospec-branch.h:146:38: warning: Unknown escape
> >   '@'
> >   ./include/linux/compiler.h:190:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/compiler.h:208:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/compiler.h:214:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./arch/x86/include/asm/barrier.h:36:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/kasan-checks.h:9:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/kasan-checks.h:11:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/compiler.h:271:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/compiler.h:302:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./arch/x86/include/asm/bitops.h:66:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:89:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:104:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:126:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:132:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:137:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:162:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:177:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:191:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:212:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:224:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:239:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:258:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:279:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:291:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:311:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:316:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:322:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:354:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:368:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:382:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:404:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:445:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/bitops.h:487:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/sched.h:13:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/arch_hweight.h:17:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/arch_hweight.h:28:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/arch_hweight.h:33:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/asm/arch_hweight.h:45:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/uapi/asm/swab.h:8:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./arch/x86/include/uapi/asm/swab.h:15:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/swab.h:47:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:56:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:65:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:78:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:87:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:161:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:174:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:187:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:202:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:217:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:230:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:242:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:255:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:270:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/swab.h:285:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:44:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:48:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:52:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:56:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:60:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:64:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:68:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:72:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:76:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:80:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:84:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/uapi/linux/byteorder/little_endian.h:88:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:144:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:149:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:154:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:160:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:168:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:176:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:181:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:186:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:191:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/byteorder/generic.h:199:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:12:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:18:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:24:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:53:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:58:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:63:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:68:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:73:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:78:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:83:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:88:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/asm-generic/bitops/le.h:93:8: error: attribute
> >   '__gnu_inline__': unknown attribute
> >   ./include/linux/bitops.h:43:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:51:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:61:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:71:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:81:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:91:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:101:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:111:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:121:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:131:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:143:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:154:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:160:8: error: attribute '__gnu_inline__':
> >   unknown attribute
> >   ./include/linux/bitops.h:167:8: error: too many errors
> >
> > I am using gcc 5.4.
> 
> 
> Hello,
> 
> what is your sparse version?
> the latest version 0.6.0 has been released.
> 
> git://git.kernel.org/pub/scm/devel/sparse/sparse.git
> 
> Regards
>
I am running sparse 0.5.0. Everything is fine after 0.6.0! Thanks!
> > I am unable to debug this issue and am not finding much help on the
> > internet.
> >
> > Please do ask if more info is required.
> >
> > Thank you
> >



More information about the Kernelnewbies mailing list