lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 07 Sep 2019 12:24:02 -0700
From:   Joe Perches <joe@...ches.com>
To:     Valentin Vidic <vvidic@...entin-vidic.from.hr>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Valdis Kletnieks <valdis.kletnieks@...edu>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] staging: exfat: cleanup spacing for casts

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;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ