]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
i40e: Correct mask assignment value
authorKevin Scott <kevin.c.scott@intel.com>
Wed, 4 Jun 2014 20:41:33 +0000 (20:41 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 1 Jul 2014 06:45:46 +0000 (23:45 -0700)
Make mask value of all 1s.  Value of -1 can't be used for u32 type.

Change-ID: I49d58b77639939fe7447a229dbf1f4a1bf7419ce
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c

index 5a603a5e9aa8d6280a3d0ae7ae49eb948b932f1d..0d74b46d177f5a000d680d5a7a18f33b794ea9c1 100644 (file)
@@ -858,7 +858,7 @@ static void i40e_write_dword(u8 *hmc_bits,
        if (ce_info->width < 32)
                mask = ((u32)1 << ce_info->width) - 1;
        else
-               mask = -1;
+               mask = 0xFFFFFFFF;
 
        /* don't swizzle the bits until after the mask because the mask bits
         * will be in a different bit position on big endian machines
@@ -910,7 +910,7 @@ static void i40e_write_qword(u8 *hmc_bits,
        if (ce_info->width < 64)
                mask = ((u64)1 << ce_info->width) - 1;
        else
-               mask = -1;
+               mask = 0xFFFFFFFFFFFFFFFF;
 
        /* don't swizzle the bits until after the mask because the mask bits
         * will be in a different bit position on big endian machines