linux/drivers/isdn/mISDN
Nathan Chancellor aeb5e02aca mISDN: Fix type of switch control variable in ctrl_teimanager
Clang warns (trimmed for brevity):

drivers/isdn/mISDN/tei.c:1193:7: warning: overflow converting case value
to switch condition type (2147764552 to 18446744071562348872) [-Wswitch]
        case IMHOLD_L1:
             ^
drivers/isdn/mISDN/tei.c:1187:7: warning: overflow converting case value
to switch condition type (2147764550 to 18446744071562348870) [-Wswitch]
        case IMCLEAR_L2:
             ^
2 warnings generated.

The root cause is that the _IOC macro can generate really large numbers,
which don't find into type int. My research into how GCC and Clang are
handling this at a low level didn't prove fruitful and surveying the
kernel tree shows that aside from here and a few places in the scsi
subsystem, everything that uses _IOC is at least of type 'unsigned int'.
Make that change here because as nothing in this function cares about
the signedness of the variable and it removes ambiguity, which is never
good when dealing with compilers.

While we're here, remove the unnecessary local variable ret (just return
-EINVAL and 0 directly).

Link: https://github.com/ClangBuiltLinux/linux/issues/67
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-22 19:30:24 -07:00
..
clock.c isdn: Use ktime_t instead of 'struct timeval' 2016-03-20 16:47:13 -04:00
core.c ISDN: convert class code to use dev_groups 2013-07-26 18:05:17 -07:00
core.h
dsp_audio.c isdn: Remove reverse_bits(), use revbit8() 2015-08-10 14:29:04 -07:00
dsp_biquad.h
dsp_blowfish.c
dsp_cmx.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
dsp_core.c mISDN: Convert timers to use timer_setup() 2017-10-18 12:39:39 +01:00
dsp_dtmf.c
dsp_ecdis.h
dsp_hwec.c mISDN: Remove VLAs 2018-04-12 21:46:10 -04:00
dsp_hwec.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dsp_pipeline.c mISDN: use kstrdup() in dsp_pipeline_build 2015-10-13 18:29:50 -07:00
dsp_tones.c mISDN: Convert timers to use timer_setup() 2017-10-18 12:39:39 +01:00
dsp.h mISDN: Convert timers to use timer_setup() 2017-10-18 12:39:39 +01:00
fsm.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
fsm.h mISDN: Fix null pointer dereference at mISDN_FsmNew 2017-08-11 14:56:23 -07:00
hwchannel.c Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
Kconfig treewide: Fix typo in Kconfig 2013-12-02 14:54:57 +01:00
l1oip_codec.c mISDN: Deletion of unnecessary checks before the function call "vfree" 2014-11-21 12:17:53 -05:00
l1oip_core.c mISDN: Remove VLAs 2018-04-12 21:46:10 -04:00
l1oip.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
layer1.c mISDN: Fix null pointer dereference at mISDN_FsmNew 2017-08-11 14:56:23 -07:00
layer1.h
layer2.c mISDN: Fix null pointer dereference at mISDN_FsmNew 2017-08-11 14:56:23 -07:00
layer2.h
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
socket.c mISDN: remove redundant null pointer check before kfree_skb 2018-09-21 09:09:22 -07:00
stack.c isdn: mark expected switch fall-throughs 2018-07-04 22:17:32 +09:00
tei.c mISDN: Fix type of switch control variable in ctrl_teimanager 2018-10-22 19:30:24 -07:00
timerdev.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00