Re: [PATCH 15/15] staging: exfat: Clean up return codes - FFS_SUCCESS

From: Joe Perches
Date: Thu Oct 24 2019 - 12:29:06 EST


On Thu, 2019-10-24 at 11:53 -0400, Valdis Kletnieks wrote:
> Just replace FFS_SUCCESS with a literal 0.

[]

> diff --git a/drivers/staging/exfat/exfat_cache.c b/drivers/staging/exfat/exfat_cache.c
[]
> @@ -214,7 +214,7 @@ static u8 *FAT_getblk(struct super_block *sb, sector_t sec)
>
> FAT_cache_insert_hash(sb, bp);
>
> - if (sector_read(sb, sec, &bp->buf_bh, 1) != FFS_SUCCESS) {
> + if (sector_read(sb, sec, &bp->buf_bh, 1) != 0) {

Probably nicer to just drop the != 0

> diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c
[]
> @@ -768,13 +768,13 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
>
> if ((offset == 0) && (oneblkread == p_bd->sector_size)) {
> if (sector_read(sb, LogSector, &tmp_bh, 1) !=
> - FFS_SUCCESS)
> + 0)

especially for these split line tests