i40e: fix flow director index sign
authorJingjing Wu <jingjing.wu@intel.com>
Tue, 15 Dec 2015 16:23:07 +0000 (00:23 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 15 Dec 2015 17:06:54 +0000 (18:06 +0100)
commite34189abaff977cb20ca317ac179ab7ad49c380d
treea2f5b977f4c23e5de83eebdf13105e18f5044c5b
parent8a26a8ff829c0ad83ccbdf09162314abd04ef4eb
i40e: fix flow director index sign

Coverity issue reported like
CID 119268 (#1 of 1): Unintended sign extension
(SIGN_EXTENSION)sign_extension: Suspicious implicit sign extension:
vsi_id with type unsigned short (16 bits, unsigned) is promoted in
vsi_id << 23 to type int (32 bits, signed), then sign-extended to type
unsigned long (64 bits, unsigned). If vsi_id << 23 is greater than
0x7FFFFFFF, the upper bits of the result will all be 1.

Fixes: 88ebc2b7f976 ("i40e: extend flow director to support VF")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
drivers/net/i40e/i40e_fdir.c