net: thunderx: nicvf_queues: nivc_*_intr: remove duplication
commitb45ceb406e4fd3045180b8d70bff60b1d43c7ff4
authorYury Norov <yury.norov@auriga.com>
Mon, 7 Dec 2015 05:00:32 +0000 (7 10:30 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Dec 2015 18:40:01 +0000 (7 13:40 -0500)
treebff8fad79b5e452ebceea344b38c6f84905fb557
parent64874280889e7c0b2c9266705363627d4c92cf01
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>
drivers/net/ethernet/cavium/thunder/nicvf_queues.c