From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 081A9C43331 for ; Sat, 7 Sep 2019 19:24:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF3A320854 for ; Sat, 7 Sep 2019 19:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404751AbfIGTYG (ORCPT ); Sat, 7 Sep 2019 15:24:06 -0400 Received: from smtprelay0224.hostedemail.com ([216.40.44.224]:41709 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727014AbfIGTYG (ORCPT ); Sat, 7 Sep 2019 15:24:06 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 97A12837F24A; Sat, 7 Sep 2019 19:24:04 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: clam79_2374d17e87c29 X-Filterd-Recvd-Size: 2175 Received: from XPS-9350.home (unknown [47.151.152.152]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Sat, 7 Sep 2019 19:24:03 +0000 (UTC) Message-ID: <564f4da0f0a9cf9eb91ee46bf10531ea04a37750.camel@perches.com> Subject: Re: [PATCH 2/2] staging: exfat: cleanup spacing for casts From: Joe Perches To: Valentin Vidic , Greg Kroah-Hartman Cc: Valdis Kletnieks , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sat, 07 Sep 2019 12:24:02 -0700 In-Reply-To: <20190907185833.11910-2-vvidic@valentin-vidic.from.hr> References: <20190907185833.11910-1-vvidic@valentin-vidic.from.hr> <20190907185833.11910-2-vvidic@valentin-vidic.from.hr> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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;