diff options
author | Miquel Raynal | 2018-11-18 21:11:46 +0100 |
---|---|---|
committer | Jagan Teki | 2019-04-12 10:58:21 +0530 |
commit | a55036b2786919996db6dcffd5f0a86d1077184b (patch) | |
tree | 04c2db63a0594e2db86da932886d039e80a2c38b /include/linux/mtd | |
parent | 3d2f12c4a151f6a4ec54782befa2fa92bcaa558f (diff) |
mtd: fix mtd_oobavail() incoherent returned value
mtd_oobavail() returns either mtd->oovabail or mtd->oobsize. Both
values are unsigned 32-bit entities, so there is no reason to pretend
returning a signed one.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/mtd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index cd1f557a2f3..e3549f0a461 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -392,7 +392,7 @@ static inline void mtd_set_ooblayout(struct mtd_info *mtd, mtd->ooblayout = ooblayout; } -static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) +static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops) { return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize; } |