linux-brain/samples
Nathan Chancellor a509ddd2fb vfio-mdev/samples: Use u8 instead of char for handle functions
[ Upstream commit 8ba35b3a00 ]

Clang warns:

samples/vfio-mdev/mtty.c:592:39: warning: implicit conversion from 'int'
to 'char' changes value from 162 to -94 [-Wconstant-conversion]
                *buf = UART_MSR_DSR | UART_MSR_DDSR | UART_MSR_DCD;
                     ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
1 warning generated.

Turns out that all uses of buf in this function ultimately end up stored
or cast to an unsigned type. Just use u8, which has the same number of
bits but can store this larger number so Clang no longer warns.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 15:37:27 +01:00
..
auxdisplay License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
blackfin samples: move blackfin gptimers-example from Documentation 2016-10-10 07:12:02 -06:00
bpf samples/bpf: fix compilation failure 2019-11-20 18:00:25 +01:00
configfs configfs: remove old API 2015-10-13 22:17:57 -07:00
connector License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hidraw License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo: clean up example to not use page_link 2017-07-12 16:26:01 -07:00
kobject samples/kobject: be explicit in the module license 2015-03-25 13:41:42 +01:00
kprobes samples/kretprobe: fix the wrong type 2016-08-04 08:50:07 -04:00
livepatch livepatch: allow removal of a disabled patch 2017-03-08 09:38:43 +01:00
mei mei: samples: fix a signedness bug in amt_host_if_call() 2019-11-24 08:22:59 +01:00
mic/mpssd License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pktgen License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpmsg rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00
seccomp License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sockmap bpf: avoid preempt enable/disable in sockmap using tcp_skb_cb region 2017-10-20 13:01:29 +01:00
statx statx: Include a mask for stx_attributes in struct statx 2017-04-03 01:06:00 -04:00
timers License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_events License cleanup: add SPDX license identifiers to some files 2017-11-02 10:04:46 -07:00
trace_printk tracing: Add trace_printk sample code 2016-06-20 09:54:21 -04:00
uhid License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v4l media: v4l2-pci-skeleton: constify vb2_ops structures 2017-08-20 08:03:09 -04:00
vfio-mdev vfio-mdev/samples: Use u8 instead of char for handle functions 2019-12-05 15:37:27 +01:00
watchdog License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
Makefile statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00