All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] fs/fat: minor cleanup
@ 2015-02-17 19:21 Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-17 19:21 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel

Hello,

this patchset provides a couple of minor cleanup.

Alexander Kuleshov (3):
  fs/fat: remove unnecessary super_block *sb defintion
  fs/fat: use MSDOS_SB to get msdos superblock
  fs/fat: remove unnecessary includes

 fs/fat/cache.c       |  2 --
 fs/fat/dir.c         |  4 ----
 fs/fat/fat.h         |  3 ---
 fs/fat/fatent.c      |  3 ---
 fs/fat/file.c        |  4 ----
 fs/fat/inode.c       | 15 ++-------------
 fs/fat/misc.c        |  4 ----
 fs/fat/namei_msdos.c |  2 --
 fs/fat/namei_vfat.c  |  2 --
 fs/fat/nfs.c         |  1 -
 10 files changed, 2 insertions(+), 38 deletions(-)

-- 
2.3.0.401.g57a267c.dirty


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] fs/fat: remove unnecessary defintion
  2015-02-17 19:21 [PATCH 0/3] fs/fat: minor cleanup Alexander Kuleshov
@ 2015-02-17 19:22 ` Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 2/3] fs/fat: use MSDOS_SB to get msdos superblock Alexander Kuleshov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-17 19:22 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, Alexander Kuleshov

'*sb' never used, so let's remote it and pass inode->i_sb directly to
the MSDOS_SB.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 fs/fat/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 7b41a2d..e140e62 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1280,8 +1280,7 @@ out:
 
 static int fat_read_root(struct inode *inode)
 {
-	struct super_block *sb = inode->i_sb;
-	struct msdos_sb_info *sbi = MSDOS_SB(sb);
+	struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
 	int error;
 
 	MSDOS_I(inode)->i_pos = MSDOS_ROOT_INO;
-- 
2.3.0.401.g57a267c.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] fs/fat: use MSDOS_SB to get msdos superblock
  2015-02-17 19:21 [PATCH 0/3] fs/fat: minor cleanup Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
@ 2015-02-17 19:22 ` Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 3/3] fs/fat: remove unnecessary includes Alexander Kuleshov
  2015-02-17 19:45 ` [PATCH 0/3] fs/fat: minor cleanup OGAWA Hirofumi
  3 siblings, 0 replies; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-17 19:22 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, Alexander Kuleshov

Use the MSDOS_SB helper to get msdos superblock instead of coding it directly.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 fs/fat/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index e140e62..98fb64b 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -580,7 +580,7 @@ static void fat_set_state(struct super_block *sb,
 {
 	struct buffer_head *bh;
 	struct fat_boot_sector *b;
-	struct msdos_sb_info *sbi = sb->s_fs_info;
+	struct msdos_sb_info *sbi = MSDOS_SB(sb);
 
 	/* do not change any thing if mounted read only */
 	if ((sb->s_flags & MS_RDONLY) && !force)
-- 
2.3.0.401.g57a267c.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] fs/fat: remove unnecessary includes
  2015-02-17 19:21 [PATCH 0/3] fs/fat: minor cleanup Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
  2015-02-17 19:22 ` [PATCH 2/3] fs/fat: use MSDOS_SB to get msdos superblock Alexander Kuleshov
@ 2015-02-17 19:22 ` Alexander Kuleshov
  2015-02-17 19:45 ` [PATCH 0/3] fs/fat: minor cleanup OGAWA Hirofumi
  3 siblings, 0 replies; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-17 19:22 UTC (permalink / raw)
  To: hirofumi; +Cc: linux-kernel, Alexander Kuleshov

'fat.h' includes <linux/buffer_head.h> which includes <linux/fs.h>
which includes all the header files required for all *.c files fat filesystem.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 fs/fat/cache.c       |  2 --
 fs/fat/dir.c         |  4 ----
 fs/fat/fat.h         |  3 ---
 fs/fat/fatent.c      |  3 ---
 fs/fat/file.c        |  4 ----
 fs/fat/inode.c       | 10 ----------
 fs/fat/misc.c        |  4 ----
 fs/fat/namei_msdos.c |  2 --
 fs/fat/namei_vfat.c  |  2 --
 9 files changed, 34 deletions(-)

diff --git a/fs/fat/cache.c b/fs/fat/cache.c
index 91ad9e1..93fc622 100644
--- a/fs/fat/cache.c
+++ b/fs/fat/cache.c
@@ -8,9 +8,7 @@
  *  May 1999. AV. Fixed the bogosity with FAT32 (read "FAT28"). Fscking lusers.
  */
 
-#include <linux/fs.h>
 #include <linux/slab.h>
-#include <linux/buffer_head.h>
 #include "fat.h"
 
 /* this must be > 0. */
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index c5d6bb9..4afc4d9 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -13,13 +13,9 @@
  *  Short name translation 1999, 2001 by Wolfram Pienkoss <wp@bszh.de>
  */
 
-#include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/time.h>
-#include <linux/buffer_head.h>
 #include <linux/compat.h>
 #include <linux/uaccess.h>
-#include <linux/kernel.h>
 #include "fat.h"
 
 /*
diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 64e295e..fe65a7d 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -2,11 +2,8 @@
 #define _FAT_H
 
 #include <linux/buffer_head.h>
-#include <linux/string.h>
 #include <linux/nls.h>
-#include <linux/fs.h>
 #include <linux/hash.h>
-#include <linux/mutex.h>
 #include <linux/ratelimit.h>
 #include <linux/msdos_fs.h>
 
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c
index 260705c..8226557 100644
--- a/fs/fat/fatent.c
+++ b/fs/fat/fatent.c
@@ -3,9 +3,6 @@
  * Released under GPL v2.
  */
 
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/msdos_fs.h>
 #include <linux/blkdev.h>
 #include "fat.h"
 
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 8429c68..15ccf5e 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -10,10 +10,6 @@
 #include <linux/module.h>
 #include <linux/compat.h>
 #include <linux/mount.h>
-#include <linux/time.h>
-#include <linux/buffer_head.h>
-#include <linux/writeback.h>
-#include <linux/backing-dev.h>
 #include <linux/blkdev.h>
 #include <linux/fsnotify.h>
 #include <linux/security.h>
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 98fb64b..80c722e 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -11,21 +11,11 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
-#include <linux/time.h>
-#include <linux/slab.h>
-#include <linux/seq_file.h>
 #include <linux/pagemap.h>
 #include <linux/mpage.h>
-#include <linux/buffer_head.h>
-#include <linux/mount.h>
 #include <linux/aio.h>
 #include <linux/vfs.h>
 #include <linux/parser.h>
-#include <linux/uio.h>
-#include <linux/writeback.h>
-#include <linux/log2.h>
-#include <linux/hash.h>
 #include <linux/blkdev.h>
 #include <asm/unaligned.h>
 #include "fat.h"
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index d8da2d2..c4589e9 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -6,10 +6,6 @@
  *		 and date_dos2unix for date==0 by Igor Zhbanov(bsg@uniyar.ac.ru)
  */
 
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/buffer_head.h>
-#include <linux/time.h>
 #include "fat.h"
 
 /*
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index a783b0e..cc6a854 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -7,8 +7,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/time.h>
-#include <linux/buffer_head.h>
 #include "fat.h"
 
 /* Characters that are undesirable in an MS-DOS file name */
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index b8b92c2..7e0974e 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -16,10 +16,8 @@
  */
 
 #include <linux/module.h>
-#include <linux/jiffies.h>
 #include <linux/ctype.h>
 #include <linux/slab.h>
-#include <linux/buffer_head.h>
 #include <linux/namei.h>
 #include "fat.h"
 
-- 
2.3.0.401.g57a267c.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/3] fs/fat: minor cleanup
  2015-02-17 19:21 [PATCH 0/3] fs/fat: minor cleanup Alexander Kuleshov
                   ` (2 preceding siblings ...)
  2015-02-17 19:22 ` [PATCH 3/3] fs/fat: remove unnecessary includes Alexander Kuleshov
@ 2015-02-17 19:45 ` OGAWA Hirofumi
  3 siblings, 0 replies; 7+ messages in thread
From: OGAWA Hirofumi @ 2015-02-17 19:45 UTC (permalink / raw)
  To: Alexander Kuleshov, Andrew Morton; +Cc: linux-kernel

Alexander Kuleshov <kuleshovmail@gmail.com> writes:

> Hello,

Hi,

> this patchset provides a couple of minor cleanup.

Looks good to me. Ack for all 3 patches.

Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

Thanks.

> Alexander Kuleshov (3):
>   fs/fat: remove unnecessary super_block *sb defintion
>   fs/fat: use MSDOS_SB to get msdos superblock
>   fs/fat: remove unnecessary includes
>
>  fs/fat/cache.c       |  2 --
>  fs/fat/dir.c         |  4 ----
>  fs/fat/fat.h         |  3 ---
>  fs/fat/fatent.c      |  3 ---
>  fs/fat/file.c        |  4 ----
>  fs/fat/inode.c       | 15 ++-------------
>  fs/fat/misc.c        |  4 ----
>  fs/fat/namei_msdos.c |  2 --
>  fs/fat/namei_vfat.c  |  2 --
>  fs/fat/nfs.c         |  1 -
>  10 files changed, 2 insertions(+), 38 deletions(-)

-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] fs/fat: remove unnecessary defintion
  2015-02-18 19:10 [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
@ 2015-02-18 19:11 ` Alexander Kuleshov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-18 19:11 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel, Alexander Kuleshov

Sorry for noise. Sent wrong patch.

2015-02-19 1:10 GMT+06:00 Alexander Kuleshov <kuleshovmail@gmail.com>:
> '*sb' never used, so let's remote it and pass inode->i_sb directly to
> the MSDOS_SB.
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> ---
>  fs/fat/inode.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 7b41a2d..e140e62 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -1280,8 +1280,7 @@ out:
>
>  static int fat_read_root(struct inode *inode)
>  {
> -       struct super_block *sb = inode->i_sb;
> -       struct msdos_sb_info *sbi = MSDOS_SB(sb);
> +       struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
>         int error;
>
>         MSDOS_I(inode)->i_pos = MSDOS_ROOT_INO;
> --
> 2.3.0.401.g57a267c.dirty
>



-- 
_________________________
0xAX

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] fs/fat: remove unnecessary defintion
@ 2015-02-18 19:10 Alexander Kuleshov
  2015-02-18 19:11 ` Alexander Kuleshov
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Kuleshov @ 2015-02-18 19:10 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel, Alexander Kuleshov

'*sb' never used, so let's remote it and pass inode->i_sb directly to
the MSDOS_SB.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 fs/fat/inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 7b41a2d..e140e62 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1280,8 +1280,7 @@ out:
 
 static int fat_read_root(struct inode *inode)
 {
-	struct super_block *sb = inode->i_sb;
-	struct msdos_sb_info *sbi = MSDOS_SB(sb);
+	struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
 	int error;
 
 	MSDOS_I(inode)->i_pos = MSDOS_ROOT_INO;
-- 
2.3.0.401.g57a267c.dirty


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-18 19:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17 19:21 [PATCH 0/3] fs/fat: minor cleanup Alexander Kuleshov
2015-02-17 19:22 ` [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
2015-02-17 19:22 ` [PATCH 2/3] fs/fat: use MSDOS_SB to get msdos superblock Alexander Kuleshov
2015-02-17 19:22 ` [PATCH 3/3] fs/fat: remove unnecessary includes Alexander Kuleshov
2015-02-17 19:45 ` [PATCH 0/3] fs/fat: minor cleanup OGAWA Hirofumi
2015-02-18 19:10 [PATCH 1/3] fs/fat: remove unnecessary defintion Alexander Kuleshov
2015-02-18 19:11 ` Alexander Kuleshov

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.