aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/cfi.h
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2010-01-15 13:09:32 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 06:29:25 -0500
commit1449c5d0e8f25af6c903797a636696901122e4e8 (patch)
tree4f23274d75966ff824c0aec983ded23e7c378d28 /include/linux/mtd/cfi.h
parent53f2b1c86a1fa1414be93571062ac4c263fa9fbc (diff)
mtd: quiet sparse noise in cfi.h
In the inline function cfi_build_cmd_addr, the cast of cmd_ofs to an uint8_t produces a sparse warning of the type: warning: cast truncates bits from constant value (2aa becomes aa) Quiet the warning by masking cmd_ofs with 0xff and remove the cast. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd/cfi.h')
-rw-r--r--include/linux/mtd/cfi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index df89f4275232..a4eefc5810dc 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -297,7 +297,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs,
297 * and 32bit devices on 16 bit busses 297 * and 32bit devices on 16 bit busses
298 * set the low bit of the alternating bit sequence of the address. 298 * set the low bit of the alternating bit sequence of the address.
299 */ 299 */
300 if (((type * interleave) > bankwidth) && ((uint8_t)cmd_ofs == 0xaa)) 300 if (((type * interleave) > bankwidth) && ((cmd_ofs & 0xff) == 0xaa))
301 addr |= (type >> 1)*interleave; 301 addr |= (type >> 1)*interleave;
302 302
303 return addr; 303 return addr;