[LTP] [PATCH 1/1] checkpatch: Ignore warnings irrelevant in userspace
Petr Vorel
pvorel@suse.cz
Fri Sep 16 21:04:28 CEST 2022
> Hi!
> > * EMBEDDED_FILENAME
> > fanotify.h:15: WARNING: It's generally not useful to have the filename in the file
> > on #include <sys/fanotify.h> in fanotify.h
> > * ENOSYS
> > fanotify.h:26: WARNING: ENOSYS means 'invalid syscall nr' and nothing else
> > on if (errno == ENOSYS)
> > * NEW_TYPEDEFS
> > fanotify.h:180: WARNING: do not add new typedefs
> > on typedef struct {
> I'm not 100% sure about the NEW_TYPEDEFS check, that one is mostly
> right. The later two are fine.
FYI the error is from fanotify.h (kind of lapi file for fanotify:
#ifndef __kernel_fsid_t
typedef struct {
int val[2];
} lapi_fsid_t;
#define __kernel_fsid_t lapi_fsid_t
#endif /* __kernel_fsid_t */
which we added in b8aebc835 ("fanotify: Fix missing __kernel_fsid_t definition")
"Instead of including <asm/posix_types.h> where it's defined we just
define the missing bit." (fix for musl).
But if you prefer to keep this check, I'm ok to merge it without it.
The long term solution could be to add variable to Makefile to pass extra
parameters, e.g.:
check_fanotify.h: CHECKPATCH_IGNORE += NEW_TYPEDEFS
Kind regards,
Petr
More information about the ltp
mailing list