* [PATCH] befs: remove unused endian functions
@ 2016-05-31 13:27 Luis de Bethencourt
2016-05-31 20:54 ` Al Viro
0 siblings, 1 reply; 7+ messages in thread
From: Luis de Bethencourt @ 2016-05-31 13:27 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, viro, Luis de Bethencourt
Remove endianness conversion functions that are declared but never used.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---
Hi,
Continuing to learn the BeFS code. Noticed some cleanup.
Thanks for the review :)
Luis
fs/befs/endian.h | 44 --------------------------------------------
1 file changed, 44 deletions(-)
diff --git a/fs/befs/endian.h b/fs/befs/endian.h
index 2722387..3163ee6 100644
--- a/fs/befs/endian.h
+++ b/fs/befs/endian.h
@@ -20,15 +20,6 @@ fs64_to_cpu(const struct super_block *sb, fs64 n)
return be64_to_cpu((__force __be64)n);
}
-static inline fs64
-cpu_to_fs64(const struct super_block *sb, u64 n)
-{
- if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
- return (__force fs64)cpu_to_le64(n);
- else
- return (__force fs64)cpu_to_be64(n);
-}
-
static inline u32
fs32_to_cpu(const struct super_block *sb, fs32 n)
{
@@ -38,15 +29,6 @@ fs32_to_cpu(const struct super_block *sb, fs32 n)
return be32_to_cpu((__force __be32)n);
}
-static inline fs32
-cpu_to_fs32(const struct super_block *sb, u32 n)
-{
- if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
- return (__force fs32)cpu_to_le32(n);
- else
- return (__force fs32)cpu_to_be32(n);
-}
-
static inline u16
fs16_to_cpu(const struct super_block *sb, fs16 n)
{
@@ -56,15 +38,6 @@ fs16_to_cpu(const struct super_block *sb, fs16 n)
return be16_to_cpu((__force __be16)n);
}
-static inline fs16
-cpu_to_fs16(const struct super_block *sb, u16 n)
-{
- if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE)
- return (__force fs16)cpu_to_le16(n);
- else
- return (__force fs16)cpu_to_be16(n);
-}
-
/* Composite types below here */
static inline befs_block_run
@@ -84,23 +57,6 @@ fsrun_to_cpu(const struct super_block *sb, befs_disk_block_run n)
return run;
}
-static inline befs_disk_block_run
-cpu_to_fsrun(const struct super_block *sb, befs_block_run n)
-{
- befs_disk_block_run run;
-
- if (BEFS_SB(sb)->byte_order == BEFS_BYTESEX_LE) {
- run.allocation_group = cpu_to_le32(n.allocation_group);
- run.start = cpu_to_le16(n.start);
- run.len = cpu_to_le16(n.len);
- } else {
- run.allocation_group = cpu_to_be32(n.allocation_group);
- run.start = cpu_to_be16(n.start);
- run.len = cpu_to_be16(n.len);
- }
- return run;
-}
-
static inline befs_data_stream
fsds_to_cpu(const struct super_block *sb, const befs_disk_data_stream *n)
{
--
2.5.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-05-31 13:27 [PATCH] befs: remove unused endian functions Luis de Bethencourt
@ 2016-05-31 20:54 ` Al Viro
2016-05-31 20:59 ` Luis de Bethencourt
0 siblings, 1 reply; 7+ messages in thread
From: Al Viro @ 2016-05-31 20:54 UTC (permalink / raw)
To: Luis de Bethencourt; +Cc: linux-kernel, akpm
On Tue, May 31, 2016 at 02:27:57PM +0100, Luis de Bethencourt wrote:
> Remove endianness conversion functions that are declared but never used.
Well... As long as it stays read-only - sure, you don't need to convert
anything to on-disk types.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-05-31 20:54 ` Al Viro
@ 2016-05-31 20:59 ` Luis de Bethencourt
2016-06-01 19:20 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Luis de Bethencourt @ 2016-05-31 20:59 UTC (permalink / raw)
To: Al Viro; +Cc: linux-kernel, akpm
On 31/05/16 21:54, Al Viro wrote:
> On Tue, May 31, 2016 at 02:27:57PM +0100, Luis de Bethencourt wrote:
>> Remove endianness conversion functions that are declared but never used.
>
> Well... As long as it stays read-only - sure, you don't need to convert
> anything to on-disk types.
>
Hello,
While reading the BeFS book "Practical Filesystems" I have gotten really
interested in this and it's why I am reading/learning the Linux
implementation.
The idea of adding write support has crossed my mind, but I wanted to know
if you would be interested in this before I start looking into it. Are you?
It would take some time and there are other things to clean in the befs code
first though.
Thanks,
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-05-31 20:59 ` Luis de Bethencourt
@ 2016-06-01 19:20 ` Andrew Morton
2016-06-01 19:31 ` Luis de Bethencourt
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2016-06-01 19:20 UTC (permalink / raw)
To: Luis de Bethencourt; +Cc: Al Viro, linux-kernel
On Tue, 31 May 2016 21:59:03 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
> On 31/05/16 21:54, Al Viro wrote:
> > On Tue, May 31, 2016 at 02:27:57PM +0100, Luis de Bethencourt wrote:
> >> Remove endianness conversion functions that are declared but never used.
> >
> > Well... As long as it stays read-only - sure, you don't need to convert
> > anything to on-disk types.
I think it would be best to leave the code as-is. The compiler will
remove it all so there's a very small amount of compile-time cost. We
could just comment the code out but then they would rot over time,
>
> Hello,
>
> While reading the BeFS book "Practical Filesystems" I have gotten really
> interested in this and it's why I am reading/learning the Linux
> implementation.
>
> The idea of adding write support has crossed my mind, but I wanted to know
> if you would be interested in this before I start looking into it. Are you?
>
> It would take some time and there are other things to clean in the befs code
> first though.
It could be a fun starter project but I have to say, befs is not a very
valuable place in which to spend your time nor is befs the best place
in which to develop familiarity. A more modest project within a more
mainstream part of the kernel would be a better investment.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-06-01 19:20 ` Andrew Morton
@ 2016-06-01 19:31 ` Luis de Bethencourt
2016-06-01 19:38 ` Andrew Morton
0 siblings, 1 reply; 7+ messages in thread
From: Luis de Bethencourt @ 2016-06-01 19:31 UTC (permalink / raw)
To: Andrew Morton; +Cc: Al Viro, linux-kernel
On 01/06/16 20:20, Andrew Morton wrote:
> On Tue, 31 May 2016 21:59:03 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>
>> On 31/05/16 21:54, Al Viro wrote:
>>> On Tue, May 31, 2016 at 02:27:57PM +0100, Luis de Bethencourt wrote:
>>>> Remove endianness conversion functions that are declared but never used.
>>>
>>> Well... As long as it stays read-only - sure, you don't need to convert
>>> anything to on-disk types.
>
> I think it would be best to leave the code as-is. The compiler will
> remove it all so there's a very small amount of compile-time cost. We
> could just comment the code out but then they would rot over time,
>
Hi Andew,
Sorry for submitting a patch that got nacked. I have two other in befs, but they
are small and trivial.
>>
>> Hello,
>>
>> While reading the BeFS book "Practical Filesystems" I have gotten really
>> interested in this and it's why I am reading/learning the Linux
>> implementation.
>>
>> The idea of adding write support has crossed my mind, but I wanted to know
>> if you would be interested in this before I start looking into it. Are you?
>>
>> It would take some time and there are other things to clean in the befs code
>> first though.
>
> It could be a fun starter project but I have to say, befs is not a very
> valuable place in which to spend your time nor is befs the best place
> in which to develop familiarity. A more modest project within a more
> mainstream part of the kernel would be a better investment.
>
That is a good point. One of the reasons I've been reading the Linux
implementation of befs is because it is unmaintained. I thought I could help, but
it also means there isn't huge interest for more support.
Do you have any suggestions of more modest projects within other file systems?
Something that would be a better time investment.
Thanks for the help,
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-06-01 19:31 ` Luis de Bethencourt
@ 2016-06-01 19:38 ` Andrew Morton
2016-06-01 19:44 ` Luis de Bethencourt
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2016-06-01 19:38 UTC (permalink / raw)
To: Luis de Bethencourt; +Cc: Al Viro, linux-kernel
On Wed, 01 Jun 2016 20:31:04 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
> Do you have any suggestions of more modest projects within other file systems?
> Something that would be a better time investment.
Nope, sorry :(. Reading the linux-fsdevel archives might be
worthwhile - look for unaddressed bug reports. Also
bugzilla.kernel.org and the various distro bugzilla archives may dredge
out issues that remain unaddressed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] befs: remove unused endian functions
2016-06-01 19:38 ` Andrew Morton
@ 2016-06-01 19:44 ` Luis de Bethencourt
0 siblings, 0 replies; 7+ messages in thread
From: Luis de Bethencourt @ 2016-06-01 19:44 UTC (permalink / raw)
To: Andrew Morton; +Cc: Al Viro, linux-kernel
On 01/06/16 20:38, Andrew Morton wrote:
> On Wed, 01 Jun 2016 20:31:04 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> wrote:
>
>> Do you have any suggestions of more modest projects within other file systems?
>> Something that would be a better time investment.
>
> Nope, sorry :(. Reading the linux-fsdevel archives might be
> worthwhile - look for unaddressed bug reports. Also
> bugzilla.kernel.org and the various distro bugzilla archives may dredge
> out issues that remain unaddressed.
>
I will do that, I had subscribed to that mailing list but it isn't very active.
Reading the archives is a good idea.
Thanks Andrew, appreciate your time.
Will finish reading the befs code, because it is fun :)
Maybe I will do some cleanup, to help the unmaintained file system. But you are
right that adding write support is too much.
Luis
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-06-01 19:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 13:27 [PATCH] befs: remove unused endian functions Luis de Bethencourt
2016-05-31 20:54 ` Al Viro
2016-05-31 20:59 ` Luis de Bethencourt
2016-06-01 19:20 ` Andrew Morton
2016-06-01 19:31 ` Luis de Bethencourt
2016-06-01 19:38 ` Andrew Morton
2016-06-01 19:44 ` Luis de Bethencourt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.