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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 24, 2019 at 11:53:12AM -0400, Valdis Kletnieks wrote:
> Start cleaning up the odd scheme of return codes, starting with FFS_FULL

> +++ b/drivers/staging/exfat/exfat.h
> @@ -221,7 +221,6 @@ static inline u16 get_row_index(u16 i)
>  #define FFS_PERMISSIONERR       11
>  #define FFS_NOTOPENED           12
>  #define FFS_MAXOPENED           13
> -#define FFS_FULL                14
>  #define FFS_EOF                 15
>  #define FFS_DIRBUSY             16
>  #define FFS_MEMORYERR           17

Wouldn't it be better to do this as:

Patch 1: Change all these defines to -Exxx and remove the stupid errno-changing
blocks like this:

> @@ -2360,7 +2360,7 @@ static int exfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
>  			err = -EINVAL;
>  		else if (err == FFS_FILEEXIST)
>  			err = -EEXIST;
> -		else if (err == FFS_FULL)
> +		else if (err == -ENOSPC)
>  			err = -ENOSPC;
>  		else if (err == FFS_NAMETOOLONG)
>  			err = -ENAMETOOLONG;

then patches 2-n remove individual FFS error codes.

That way nobody actually needs to review patches 2-n; all of the changes
are done in patch 1.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux