net/netvsc: replace compiler builtin overflow check
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 8 Sep 2020 10:06:42 +0000 (11:06 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:09 +0000 (18:55 +0200)
commitd73543b5f46db489c7b6fd2dfc8f905ec7304310
treebaa60316fe9729848d54a4f354001730a4e4a7d5
parent4016f0bc45c66aadfee67ab28a90599b922978cd
net/netvsc: replace compiler builtin overflow check

'__builtin_add_overflow' added to gcc in version 5, earlier versions
causing build error, like gcc 4.8.5 in RHEL7.

Replaced compiler builtin check with arithmetic check.

Fixes: 7838d3a6ae7a ("net/netvsc: check for overflow on packet info from host")

Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
Tested-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/netvsc/hn_rxtx.c