]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
net: thunderx: nicvf_queues: nivc_*_intr: remove duplication
authorYury Norov <yury.norov@auriga.com>
Mon, 7 Dec 2015 05:00:32 +0000 (10:30 +0530)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:19:36 +0000 (10:19 +0100)
commitef3e9767e66e57e68204be6132b757862f70ae6c
treee42a32c11b1e70e2407ac71631960a864c88fa4a
parent79ea05ea7912bb94aaf55b2db9e59c920a0489e4
net: thunderx: nicvf_queues: nivc_*_intr: remove duplication

The same switch-case repeates for nivc_*_intr functions.
In this patch it is moved to a helper nicvf_int_type_to_mask().

By the way:
 - Unneeded write to NICVF register dropped if int_type is unknown.
 - netdev_dbg() is used instead of netdev_err().

Signed-off-by: Yury Norov <yury.norov@auriga.com>
Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>
Acked-by: Vadim Lomovtsev <Vadim.Lomovtsev@caiumnetworks.com>
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b45ceb406e4fd3045180b8d70bff60b1d43c7ff4)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/ethernet/cavium/thunder/nicvf_queues.c