Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1687711 > unrolled thread

[PATCH 3/3] fat: fix quoted string splits

Started byCarlos Palminha <CARLOS.PALMINHA@synopsys.com>
First post2017-07-15 01:10 +0200
Last post2017-07-16 17:40 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/3] fat: fix quoted string splits Carlos Palminha <CARLOS.PALMINHA@synopsys.com> - 2017-07-15 01:10 +0200
    Re: [PATCH 3/3] fat: fix quoted string splits Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-15 03:30 +0200
      Re: [PATCH 3/3] fat: fix quoted string splits Joe Perches <joe@perches.com> - 2017-07-15 06:20 +0200
        Re: [PATCH 3/3] fat: fix quoted string splits Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-16 15:50 +0200
          Re: [PATCH 3/3] fat: fix quoted string splits Joe Perches <joe@perches.com> - 2017-07-16 17:10 +0200
            Re: [PATCH 3/3] fat: fix quoted string splits Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-16 17:40 +0200

#1687711 — [PATCH 3/3] fat: fix quoted string splits

FromCarlos Palminha <CARLOS.PALMINHA@synopsys.com>
Date2017-07-15 01:10 +0200
Subject[PATCH 3/3] fat: fix quoted string splits
Message-ID<u3hSG-1OU-7@gated-at.bofh.it>
corrects quoted string split across lines, based on checkpatch.

Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
 fs/fat/cache.c |  4 ++--
 fs/fat/inode.c | 18 ++++++++++--------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/fs/fat/cache.c b/fs/fat/cache.c
index 470b4831079e..1fa1fd72bcfb 100644
--- a/fs/fat/cache.c
+++ b/fs/fat/cache.c
@@ -250,8 +250,8 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
 		/* prevent the infinite loop of cluster chain */
 		if (*fclus > limit) {
 			fat_fs_error_ratelimit(sb,
-					"%s: detected the cluster chain loop"
-					" (i_pos %lld)", __func__,
+					"%s: detected the cluster chain loop (i_pos %lld)",
+					__func__,
 					MSDOS_I(inode)->i_pos);
 			nr = -EIO;
 			goto out;
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 8d65174b7d75..23ffac04ec7b 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1673,8 +1673,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 		/* Verify that the larger boot sector is fully readable */
 		bh_resize = sb_bread(sb, 0);
 		if (bh_resize == NULL) {
-			fat_msg(sb, KERN_ERR, "unable to read boot sector"
-			       " (logical sector size = %lu)",
+			fat_msg(sb, KERN_ERR,
+				"unable to read boot sector (logical sector size = %lu)",
 			       sb->s_blocksize);
 			goto out_fail;
 		}
@@ -1710,15 +1710,16 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 
 		fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector);
 		if (fsinfo_bh == NULL) {
-			fat_msg(sb, KERN_ERR, "bread failed, FSINFO block"
-			       " (sector = %lu)", sbi->fsinfo_sector);
+			fat_msg(sb, KERN_ERR,
+				"bread failed, FSINFO block (sector = %lu)",
+				sbi->fsinfo_sector);
 			goto out_fail;
 		}
 
 		fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
 		if (!IS_FSINFO(fsinfo)) {
-			fat_msg(sb, KERN_WARNING, "Invalid FSINFO signature: "
-			       "0x%08x, 0x%08x (sector = %lu)",
+			fat_msg(sb, KERN_WARNING,
+				"Invalid FSINFO signature: 0x%08x, 0x%08x (sector = %lu)",
 			       le32_to_cpu(fsinfo->signature1),
 			       le32_to_cpu(fsinfo->signature2),
 			       sbi->fsinfo_sector);
@@ -1745,8 +1746,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
 	sbi->dir_entries = bpb.fat_dir_entries;
 	if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
 		if (!silent)
-			fat_msg(sb, KERN_ERR, "bogus number of directory entries"
-			       " (%u)", sbi->dir_entries);
+			fat_msg(sb, KERN_ERR,
+				"bogus number of directory entries (%u)",
+				sbi->dir_entries);
 		goto out_invalid;
 	}
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1687758

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-07-15 03:30 +0200
Message-ID<u3k4b-3a5-31@gated-at.bofh.it>
In reply to#1687711
On Sat, Jul 15, 2017 at 2:05 AM, Carlos Palminha
<CARLOS.PALMINHA@synopsys.com> wrote:
> corrects quoted string split across lines, based on checkpatch.

At some point you may switch

fat_msg(sb, KERN_ERR, ...)

to

fat_fs_error(sb, ...)

>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> ---
>  fs/fat/cache.c |  4 ++--
>  fs/fat/inode.c | 18 ++++++++++--------
>  2 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/fs/fat/cache.c b/fs/fat/cache.c
> index 470b4831079e..1fa1fd72bcfb 100644
> --- a/fs/fat/cache.c
> +++ b/fs/fat/cache.c
> @@ -250,8 +250,8 @@ int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus)
>                 /* prevent the infinite loop of cluster chain */
>                 if (*fclus > limit) {
>                         fat_fs_error_ratelimit(sb,
> -                                       "%s: detected the cluster chain loop"
> -                                       " (i_pos %lld)", __func__,
> +                                       "%s: detected the cluster chain loop (i_pos %lld)",
> +                                       __func__,
>                                         MSDOS_I(inode)->i_pos);
>                         nr = -EIO;
>                         goto out;
> diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> index 8d65174b7d75..23ffac04ec7b 100644
> --- a/fs/fat/inode.c
> +++ b/fs/fat/inode.c
> @@ -1673,8 +1673,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
>                 /* Verify that the larger boot sector is fully readable */
>                 bh_resize = sb_bread(sb, 0);
>                 if (bh_resize == NULL) {
> -                       fat_msg(sb, KERN_ERR, "unable to read boot sector"
> -                              " (logical sector size = %lu)",
> +                       fat_msg(sb, KERN_ERR,
> +                               "unable to read boot sector (logical sector size = %lu)",
>                                sb->s_blocksize);
>                         goto out_fail;
>                 }
> @@ -1710,15 +1710,16 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
>
>                 fsinfo_bh = sb_bread(sb, sbi->fsinfo_sector);
>                 if (fsinfo_bh == NULL) {
> -                       fat_msg(sb, KERN_ERR, "bread failed, FSINFO block"
> -                              " (sector = %lu)", sbi->fsinfo_sector);
> +                       fat_msg(sb, KERN_ERR,
> +                               "bread failed, FSINFO block (sector = %lu)",
> +                               sbi->fsinfo_sector);
>                         goto out_fail;
>                 }
>
>                 fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
>                 if (!IS_FSINFO(fsinfo)) {
> -                       fat_msg(sb, KERN_WARNING, "Invalid FSINFO signature: "
> -                              "0x%08x, 0x%08x (sector = %lu)",
> +                       fat_msg(sb, KERN_WARNING,
> +                               "Invalid FSINFO signature: 0x%08x, 0x%08x (sector = %lu)",
>                                le32_to_cpu(fsinfo->signature1),
>                                le32_to_cpu(fsinfo->signature2),
>                                sbi->fsinfo_sector);
> @@ -1745,8 +1746,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat,
>         sbi->dir_entries = bpb.fat_dir_entries;
>         if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
>                 if (!silent)
> -                       fat_msg(sb, KERN_ERR, "bogus number of directory entries"
> -                              " (%u)", sbi->dir_entries);
> +                       fat_msg(sb, KERN_ERR,
> +                               "bogus number of directory entries (%u)",
> +                               sbi->dir_entries);
>                 goto out_invalid;
>         }
>
> --
> 2.11.0
>



-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [next] | [standalone]


#1687843

FromJoe Perches <joe@perches.com>
Date2017-07-15 06:20 +0200
Message-ID<u3mIF-56P-1@gated-at.bofh.it>
In reply to#1687758
On Sat, 2017-07-15 at 04:20 +0300, Andy Shevchenko wrote:
> On Sat, Jul 15, 2017 at 2:05 AM, Carlos Palminha
> <CARLOS.PALMINHA@synopsys.com> wrote:
> > corrects quoted string split across lines, based on checkpatch.
> 
> At some point you may switch
> 
> fat_msg(sb, KERN_ERR, ...)
> 
> to
> 
> fat_fs_error(sb, ...)

The output would be different.

[toc] | [prev] | [next] | [standalone]


#1688201

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-07-16 15:50 +0200
Message-ID<u3S5Q-86e-5@gated-at.bofh.it>
In reply to#1687843
On Sat, Jul 15, 2017 at 7:18 AM, Joe Perches <joe@perches.com> wrote:
> On Sat, 2017-07-15 at 04:20 +0300, Andy Shevchenko wrote:
>> On Sat, Jul 15, 2017 at 2:05 AM, Carlos Palminha
>> <CARLOS.PALMINHA@synopsys.com> wrote:
>> > corrects quoted string split across lines, based on checkpatch.
>>
>> At some point you may switch
>>
>> fat_msg(sb, KERN_ERR, ...)
>>
>> to
>>
>> fat_fs_error(sb, ...)
>
> The output would be different.

As much as it adds 'error, ' at the beginning of message. I can't
consider this a bad idea.

-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [next] | [standalone]


#1688487

FromJoe Perches <joe@perches.com>
Date2017-07-16 17:10 +0200
Message-ID<u3Tlh-Ga-61@gated-at.bofh.it>
In reply to#1688201
On Sun, 2017-07-16 at 16:46 +0300, Andy Shevchenko wrote:
> On Sat, Jul 15, 2017 at 7:18 AM, Joe Perches <joe@perches.com> wrote:
> > On Sat, 2017-07-15 at 04:20 +0300, Andy Shevchenko wrote:
> > > On Sat, Jul 15, 2017 at 2:05 AM, Carlos Palminha
> > > <CARLOS.PALMINHA@synopsys.com> wrote:
> > > > corrects quoted string split across lines, based on checkpatch.
> > > 
> > > At some point you may switch
> > > 
> > > fat_msg(sb, KERN_ERR, ...)
> > > 
> > > to
> > > 
> > > fat_fs_error(sb, ...)
> > 
> > The output would be different.
> 
> As much as it adds 'error, ' at the beginning of message. I can't
> consider this a bad idea.

Adding "error" to KERN_ERR output is unnecessary
and if really desired, should be done by dmesg
or equivalent.

[toc] | [prev] | [next] | [standalone]


#1688495

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-07-16 17:40 +0200
Message-ID<u3TOi-SL-11@gated-at.bofh.it>
In reply to#1688487
On Sun, Jul 16, 2017 at 6:06 PM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2017-07-16 at 16:46 +0300, Andy Shevchenko wrote:
>> On Sat, Jul 15, 2017 at 7:18 AM, Joe Perches <joe@perches.com> wrote:

>> As much as it adds 'error, ' at the beginning of message. I can't
>> consider this a bad idea.
>
> Adding "error" to KERN_ERR output is unnecessary
> and if really desired, should be done by dmesg
> or equivalent.

Shouldn't be fixed in the function itself (__fat_fs_error())?

Anyway, this discussion is obviously for a separate change. The
original patch looks okay.

-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web