linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/15] staging: exfat: Clean up return codes - FFS_FULL
Date: Thu, 24 Oct 2019 10:59:04 -0700	[thread overview]
Message-ID: <20191024175904.GJ2963@bombadil.infradead.org> (raw)
In-Reply-To: <20191024155327.1095907-2-Valdis.Kletnieks@vt.edu>

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.

  reply	other threads:[~2019-10-24 17:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 15:53 [PATCH 00/15] staging: exfat: Clean up return codes Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 01/15] staging: exfat: Clean up return codes - FFS_FULL Valdis Kletnieks
2019-10-24 17:59   ` Matthew Wilcox [this message]
2019-10-24 18:39     ` Valdis Klētnieks
2019-10-24 15:53 ` [PATCH 02/15] staging: exfat: Clean up return codes - FFS_NOTFOUND Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 03/15] staging: exfat: Clean up return codes - FFS_DIRBUSY Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 04/15] staging: exfat: Clean up return codes - FFS_PERMISSIONERR Valdis Kletnieks
2019-10-24 16:23   ` Joe Perches
2019-10-24 16:27     ` Valdis Klētnieks
2019-10-25 10:14       ` Dan Carpenter
2019-10-24 15:53 ` [PATCH 05/15] staging: exfat: Clean up return codes - FFS_NAMETOOLONG Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 06/15] staging: exfat: Clean up return codes - FFS_FILEEXIST Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 07/15] staging: exfat: Clean up return codes - FFS_INVALIDPATH Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 08/15] staging: exfat: Clean up return code - FFS_MEMORYERR Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 09/15] staging: exfat: Clean up return codes - FFS_FORMATERR Valdis Kletnieks
2019-10-25  2:56   ` Greg Kroah-Hartman
2019-10-24 15:53 ` [PATCH 10/15] staging: exfat: Clean up return codes - FFS_MEDIAERR Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 11/15] staging: exfat: Clean up return codes - FFS_EOF Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 12/15] staging: exfat: Clean up return codes - FFS_INVALIDFID Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 13/15] staging: exfat: Clean up return codes - FFS_ERROR Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 14/15] staging: exfat: Clean up return codes - remove unused codes Valdis Kletnieks
2019-10-24 15:53 ` [PATCH 15/15] staging: exfat: Clean up return codes - FFS_SUCCESS Valdis Kletnieks
2019-10-24 16:29   ` Joe Perches
2019-10-24 16:46     ` Valdis Klētnieks
2019-10-24 16:23 ` [PATCH 00/15] staging: exfat: Clean up return codes Joe Perches
2019-10-24 16:45   ` Valdis Klētnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191024175904.GJ2963@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=valdis.kletnieks@vt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).