From: Joe Perches <joe@perches.com>
To: Valentin Vidic <vvidic@valentin-vidic.from.hr>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
Valdis Kletnieks <valdis.kletnieks@vt.edu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: exfat: cleanup spacing for casts
Date: Sat, 07 Sep 2019 12:24:02 -0700 [thread overview]
Message-ID: <564f4da0f0a9cf9eb91ee46bf10531ea04a37750.camel@perches.com> (raw)
In-Reply-To: <20190907185833.11910-2-vvidic@valentin-vidic.from.hr>
On Sat, 2019-09-07 at 18:58 +0000, Valentin Vidic wrote:
> Fixes checkpatch.pl warnings:
>
> CHECK: No space is necessary after a cast
Please always try to improve the code rather
than shutup checkpatch warnings.
> diff --git a/drivers/staging/exfat/exfat_core.c b/drivers/staging/exfat/exfat_core.c
[]
> @@ -204,7 +204,7 @@ s32 fat_alloc_cluster(struct super_block *sb, s32 num_alloc,
>
> if ((--num_alloc) == 0) {
> p_fs->clu_srch_ptr = new_clu;
> - if (p_fs->used_clusters != (u32) ~0)
> + if (p_fs->used_clusters != (u32)~0)
Probably better as UINT_MAX
etc...
> @@ -3678,7 +3678,7 @@ static int parse_options(char *options, int silent, int *debug,
> opts->fs_uid = current_uid();
> opts->fs_gid = current_gid();
> opts->fs_fmask = opts->fs_dmask = current->fs->umask;
> - opts->allow_utime = (unsigned short) -1;
> + opts->allow_utime = (unsigned short)-1;
and maybe U16_MAX
> @@ -3770,7 +3770,7 @@ static int parse_options(char *options, int silent, int *debug,
> }
>
> out:
> - if (opts->allow_utime == (unsigned short) -1)
> + if (opts->allow_utime == (unsigned short)-1)
> opts->allow_utime = ~opts->fs_dmask & 0022;
>
> return 0;
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2019-09-07 19:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 18:58 [PATCH 1/2] staging: exfat: cleanup spacing for operators Valentin Vidic
2019-09-07 18:58 ` [PATCH 2/2] staging: exfat: cleanup spacing for casts Valentin Vidic
2019-09-07 19:24 ` Joe Perches [this message]
2019-09-07 21:45 ` [PATCH 2/2 v2] staging: exfat: cleanup casts Valentin Vidic
2019-09-08 13:05 ` Greg Kroah-Hartman
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=564f4da0f0a9cf9eb91ee46bf10531ea04a37750.camel@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=valdis.kletnieks@vt.edu \
--cc=vvidic@valentin-vidic.from.hr \
/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).