From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 5/8] fs: fat: rename f_size to f_len
Date: Tue, 7 Jan 2025 08:59:36 +0100 [thread overview]
Message-ID: <20250107075939.2841119-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250107075939.2841119-1-a.fatoum@pengutronix.de>
The FAT filesystem uses f_ as prefix for FAT functions and the VFS core
uses f_ as prefix for struct file members. The VFS core also defines f_
prefxed macros to shorten nested member names. Adding f_size in a
follow-up commit will thus lead to a clash, so let's work around this by
renaming the FAT f_size to f_len.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/fat/fat-pbl.c | 2 +-
fs/fat/ff.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fat/fat-pbl.c b/fs/fat/fat-pbl.c
index 6b8a807657d4..c50232424066 100644
--- a/fs/fat/fat-pbl.c
+++ b/fs/fat/fat-pbl.c
@@ -49,5 +49,5 @@ ssize_t pbl_fat_load(struct pbl_bio *bio, const char *filename, void *dest, size
return ret;
}
- return f_size(&file) <= len ? nread : -ENOSPC;
+ return f_len(&file) <= len ? nread : -ENOSPC;
}
diff --git a/fs/fat/ff.h b/fs/fat/ff.h
index e1a7d029efe8..4a1d670e75ed 100644
--- a/fs/fat/ff.h
+++ b/fs/fat/ff.h
@@ -190,7 +190,7 @@ TCHAR* f_gets (TCHAR*, int, FIL*); /* Get a string from the file */
#define f_eof(fp) (((fp)->fptr == (fp)->fsize) ? 1 : 0)
#define f_error(fp) (((fp)->flag & FA__ERROR) ? 1 : 0)
#define f_tell(fp) ((fp)->fptr)
-#define f_size(fp) ((fp)->fsize)
+#define f_len(fp) ((fp)->fsize)
/*--------------------------------------------------------------*/
/* Additional user defined functions */
--
2.39.5
next prev parent reply other threads:[~2025-01-07 8:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 7:59 [PATCH 0/8] fs: merge struct filep (FILE) and struct file Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 1/8] fs: derive file descriptor number by pointer arithmetic Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 2/8] fs: drop ifdefs in linux/fs.h Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 3/8] fs: retire FILE.in_use member Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 4/8] fs: align FILE struct member names with upstream struct file Ahmad Fatoum
2025-01-07 7:59 ` Ahmad Fatoum [this message]
2025-01-07 7:59 ` [PATCH 6/8] fs: replace FILE.size by f_inode.i_size Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 7/8] fs: merge struct file and struct filep Ahmad Fatoum
2025-01-07 7:59 ` [PATCH 8/8] fs: retire FILE typdef Ahmad Fatoum
2025-01-08 14:02 ` [PATCH 0/8] fs: merge struct filep (FILE) and struct file Sascha Hauer
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=20250107075939.2841119-6-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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