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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 4880BC433E6 for ; Fri, 5 Feb 2021 06:08:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2870064F9B for ; Fri, 5 Feb 2021 06:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230486AbhBEGIs (ORCPT ); Fri, 5 Feb 2021 01:08:48 -0500 Received: from smtprelay0046.hostedemail.com ([216.40.44.46]:50744 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229586AbhBEGIi (ORCPT ); Fri, 5 Feb 2021 01:08:38 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id E4A561E0B; Fri, 5 Feb 2021 06:07:54 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: fowl10_5b09907275e2 X-Filterd-Recvd-Size: 2146 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Fri, 5 Feb 2021 06:07:54 +0000 (UTC) Message-ID: <1055f62a90a03d6f9c8092d17b7a03c0dd3cbc69.camel@perches.com> Subject: Re: [PATCH v2 2/3] fs/efs: Correct spacing after C keywords From: Joe Perches To: Amy Parker , linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Date: Thu, 04 Feb 2021 22:07:52 -0800 In-Reply-To: <20210205051429.553657-3-enbyamy@gmail.com> References: <20210205051429.553657-1-enbyamy@gmail.com> <20210205051429.553657-3-enbyamy@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-02-04 at 21:14 -0800, Amy Parker wrote: > In EFS code, some C keywords (most commonly 'for') do not have spaces > before their instructions, such as for() vs for (). The kernel style > guide indicates that these should be of the latter variant. This patch > updates them accordingly. ok but: > diff --git a/fs/efs/super.c b/fs/efs/super.c [] > @@ -169,7 +169,7 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) { >   return 0; >   > >   ui = ((__be32 *) (vh + 1)) - 1; > - for(csum = 0; ui >= ((__be32 *) vh);) { > + for (csum = 0; ui >= ((__be32 *) vh);) { >   cs = *ui--; >   csum += be32_to_cpu(cs); >   } I think this loop is atypical. More common would be: csum = 0; for (ui = ((__be32 *)(vh + 1)) - 1; ui >= (__be32 *)vh; ui--) csum += be32_to_cpu(*ui); > @@ -198,9 +198,9 @@ static efs_block_t efs_validate_vh(struct volume_header *vh) { >   } >  #endif >   > > - for(i = 0; i < NPARTAB; i++) { > + for (i = 0; i < NPARTAB; i++) { >   pt_type = (int) be32_to_cpu(vh->vh_pt[i].pt_type); > - for(pt_entry = sgi_pt_types; pt_entry->pt_name; pt_entry++) { > + for (pt_entry = sgi_pt_types; pt_entry->pt_name; pt_entry++) { >   if (pt_type == pt_entry->pt_type) break; Also atypical is the break location, it should be on a separate line.