linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valdis Kletnieks <valdis.kletnieks@vt.edu>
To: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 04/10] staging: exfat: Clean up return codes - FFS_INVALIDFID
Date: Sun,  3 Nov 2019 20:45:00 -0500	[thread overview]
Message-ID: <20191104014510.102356-5-Valdis.Kletnieks@vt.edu> (raw)
In-Reply-To: <20191104014510.102356-1-Valdis.Kletnieks@vt.edu>

Covert FFS_INVALIDFID to -EINVAL

Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
---
 drivers/staging/exfat/exfat.h       |  1 -
 drivers/staging/exfat/exfat_super.c | 10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h
index 292af85e3cd2..7a817405c624 100644
--- a/drivers/staging/exfat/exfat.h
+++ b/drivers/staging/exfat/exfat.h
@@ -214,7 +214,6 @@ static inline u16 get_row_index(u16 i)
 #define FFS_NOTMOUNTED          4
 #define FFS_ALIGNMENTERR        5
 #define FFS_SEMAPHOREERR        6
-#define FFS_INVALIDFID          8
 #define FFS_NOTOPENED           12
 #define FFS_MAXOPENED           13
 #define FFS_ERROR               19
diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c
index 7c99d1f8cba8..dd6530aef63a 100644
--- a/drivers/staging/exfat/exfat_super.c
+++ b/drivers/staging/exfat/exfat_super.c
@@ -699,7 +699,7 @@ static int ffsReadFile(struct inode *inode, struct file_id_t *fid, void *buffer,
 
 	/* check the validity of the given file id */
 	if (!fid)
-		return FFS_INVALIDFID;
+		return -EINVAL;
 
 	/* check the validity of pointer parameters */
 	if (!buffer)
@@ -831,7 +831,7 @@ static int ffsWriteFile(struct inode *inode, struct file_id_t *fid,
 
 	/* check the validity of the given file id */
 	if (!fid)
-		return FFS_INVALIDFID;
+		return -EINVAL;
 
 	/* check the validity of pointer parameters */
 	if (!buffer)
@@ -1237,7 +1237,7 @@ static int ffsMoveFile(struct inode *old_parent_inode, struct file_id_t *fid,
 
 	/* check the validity of the given file id */
 	if (!fid)
-		return FFS_INVALIDFID;
+		return -EINVAL;
 
 	/* check the validity of pointer parameters */
 	if (!new_path || (*new_path == '\0'))
@@ -1358,7 +1358,7 @@ static int ffsRemoveFile(struct inode *inode, struct file_id_t *fid)
 
 	/* check the validity of the given file id */
 	if (!fid)
-		return FFS_INVALIDFID;
+		return -EINVAL;
 
 	/* acquire the lock for file system critical section */
 	mutex_lock(&p_fs->v_mutex);
@@ -2145,7 +2145,7 @@ static int ffsRemoveDir(struct inode *inode, struct file_id_t *fid)
 
 	/* check the validity of the given file id */
 	if (!fid)
-		return FFS_INVALIDFID;
+		return -EINVAL;
 
 	dir.dir = fid->dir.dir;
 	dir.size = fid->dir.size;
-- 
2.24.0.rc1


  parent reply	other threads:[~2019-11-04  1:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04  1:44 [PATCH v2 00/10] staging: exfat: Clean up return codes, revisited Valdis Kletnieks
2019-11-04  1:44 ` [PATCH v2 01/10] staging: exfat: Clean up return codes - FFS_FORMATERR Valdis Kletnieks
2019-11-05 17:05   ` Greg Kroah-Hartman
2019-11-05 22:20     ` Valdis Klētnieks
2019-11-04  1:44 ` [PATCH v2 02/10] staging: exfat: Clean up return codes - FFS_MEDIAERR Valdis Kletnieks
2019-11-04  1:44 ` [PATCH v2 03/10] staging: exfat: Clean up return codes - FFS_EOF Valdis Kletnieks
2019-11-04  1:45 ` Valdis Kletnieks [this message]
2019-11-04  1:45 ` [PATCH v2 05/10] staging: exfat: Clean up return codes - FFS_ERROR Valdis Kletnieks
2019-11-04  1:45 ` [PATCH v2 06/10] staging: exfat: Clean up return codes - remove unused codes Valdis Kletnieks
2019-11-04  1:45 ` [PATCH v2 07/10] staging: exfat: Clean up return codes - FFS_SUCCESS Valdis Kletnieks
2019-11-04 10:04   ` Dan Carpenter
2019-11-04 10:53     ` Valdis Klētnieks
2019-11-04 10:56       ` Dan Carpenter
2019-11-04  1:45 ` [PATCH v2 08/10] staging: exfat: Collapse redundant return code translations Valdis Kletnieks
2019-11-04  1:45 ` [PATCH v2 09/10] staging: exfat: Correct return code Valdis Kletnieks
2019-11-04  1:45 ` [PATCH 10/10] errno.h: Provide EFSCORRUPTED for everybody Valdis Kletnieks
2019-11-04  2:09   ` Gao Xiang
2019-11-05  0:33   ` Christoph Hellwig
2019-11-05  0:54     ` Valdis Klētnieks
2019-11-05  3:43   ` Chao Yu
2019-11-06 21:37     ` Pavel Machek
2019-11-05 16:59 ` [PATCH v2 00/10] staging: exfat: Clean up return codes, revisited Greg Kroah-Hartman

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=20191104014510.102356-5-Valdis.Kletnieks@vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).