Message ID | 20181118201147.11257-1-miquel.raynal@bootlin.com |
---|---|
State | Accepted |
Commit | a55036b2786919996db6dcffd5f0a86d1077184b |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
Series | [U-Boot,1/2] mtd: fix mtd_oobavail() incoherent returned value | expand |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 68e5915324..0525cfd27c 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -390,7 +390,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; }
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> --- include/linux/mtd/mtd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)