diff options
author | Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org> | 2021-03-02 18:33:46 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 10:26:31 +0300 |
commit | 7b7d2261aa8dce949c08d58ed1d02e54a0fbbab5 (patch) | |
tree | c0f9573078008081aed5ffdfe3627cc4b128a9a0 /drivers/input/touchscreen/cyttsp_core.c | |
parent | ac41ae0b12c83229f2b1102c4ed9ad96bf8de946 (diff) | |
download | linux-7b7d2261aa8dce949c08d58ed1d02e54a0fbbab5.tar.xz |
vmci_host: print unexpanded names of ioctl requests in debug messages
__stringify macro function expands its arguments, but in this messages
we expect to see ioctl request name instead of it's _IOC macro
expansion.
$ cat stringify.c
#include <stdio.h>
#include <asm/ioctl.h>
#define __stringify_1(x) #x
#define __stringify(x) __stringify_1(x)
#define VMCI_DO_IOCTL(ioctl_name) \
char *name = __stringify(IOCTL_VMCI_ ## ioctl_name);
int main() {
VMCI_DO_IOCTL(INIT_CONTEXT)
printf("%s\n", name);
}
$ cc stringify.c
$ ./a.out
(((0U) << (((0+8)+8)+14)) | (((7)) << (0+8)) | (((0xa0)) << 0) | ((0) << ((0+8)+8)))
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Link: https://lore.kernel.org/r/20210302153346.300416-1-glebfm@altlinux.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/touchscreen/cyttsp_core.c')
0 files changed, 0 insertions, 0 deletions