From: Miquel Raynal Date: Sun, 18 Nov 2018 20:11:46 +0000 (+0100) Subject: mtd: fix mtd_oobavail() incoherent returned value X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a55036b2786919996db6dcffd5f0a86d1077184b;p=project%2Fbcm63xx%2Fu-boot.git 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 --- diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index cd1f557a2f..e3549f0a46 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; }