summaryrefslogtreecommitdiff
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-07-25 20:39:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-30 17:44:22 +0300
commita17e74c533c1be241177c83545e3ec0a39db8a68 (patch)
tree059611b805607841c4d64bd04c9057f7bdf3b5d4 /include/linux/serial_core.h
parentbdc4704b2da9a30162d5990c1dad605828fcecdd (diff)
downloadlinux-a17e74c533c1be241177c83545e3ec0a39db8a68.tar.xz
serial: core: enforce type for upf_t when copying
upf_t is a bitwise defined type and any assignment from different, but compatible, types makes static analyzer unhappy. drivers/tty/serial/serial_core.c:793:29: warning: incorrect type in assignment (different base types) drivers/tty/serial/serial_core.c:793:29: expected int [signed] flags drivers/tty/serial/serial_core.c:793:29: got restricted upf_t [usertype] flags drivers/tty/serial/serial_core.c:867:19: warning: incorrect type in assignment (different base types) drivers/tty/serial/serial_core.c:867:19: expected restricted upf_t [usertype] new_flags drivers/tty/serial/serial_core.c:867:19: got int [signed] flags Enforce corresponding types when upf_t being assigned. Note, we need __force attribute due to the scope of variable. It's being used in user space with plain old type while kernel uses bitwise one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
0 files changed, 0 insertions, 0 deletions