linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	Luis de Bethencourt <luisbg@osg.samsung.com>
Subject: [PATCH] befs: remove unused endian functions
Date: Tue, 31 May 2016 14:27:57 +0100	[thread overview]
Message-ID: <1464701277-29962-1-git-send-email-luisbg@osg.samsung.com> (raw)

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

             reply	other threads:[~2016-05-31 13:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 13:27 Luis de Bethencourt [this message]
2016-05-31 20:54 ` [PATCH] befs: remove unused endian functions 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

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=1464701277-29962-1-git-send-email-luisbg@osg.samsung.com \
    --to=luisbg@osg.samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).