]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
n_gsm: introduce enum gsm_dlci_state
authorJiri Slaby <jslaby@suse.cz>
Wed, 19 Feb 2020 08:49:41 +0000 (09:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 11:46:47 +0000 (12:46 +0100)
commit72ae8cc192a312aa6a3cd643434a8992ea878737
tree107d3290de573fd42d027ebccb264a8b6d300e0a
parent036bca1fcce80fcf90bcfbff6ab3534ad575eb46
n_gsm: introduce enum gsm_dlci_state

gsm_dlci->state is clearly an enumeration. So introduce one and use it
-- compiler now checks if valid values are assigned to the field.

Note that a compiler warns about unhandled cases in switch. Add default
cases with a pr_debug (which is not printed by default).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219084949.28074-2-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c