From patchwork Wed Jun 20 15:41:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 10477787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C66D360210 for ; Wed, 20 Jun 2018 15:41:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B618A28DED for ; Wed, 20 Jun 2018 15:41:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA9E028E70; Wed, 20 Jun 2018 15:41:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C45328DED for ; Wed, 20 Jun 2018 15:41:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbeFTPlR (ORCPT ); Wed, 20 Jun 2018 11:41:17 -0400 Received: from smtprelay0140.hostedemail.com ([216.40.44.140]:60392 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754085AbeFTPlR (ORCPT ); Wed, 20 Jun 2018 11:41:17 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 521C7182CF671; Wed, 20 Jun 2018 15:41:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: offer19_280c35e2ed642 X-Filterd-Recvd-Size: 3562 Received: from XPS-9350.home (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Wed, 20 Jun 2018 15:41:15 +0000 (UTC) Message-ID: <87e66800d9e991499c43c2bcd5b0772f2dfa8ba8.camel@perches.com> Subject: Re: [PATCH 4.17.0-rc3 1/1]partition: Remove trailing spaces and correct indenting From: Joe Perches To: kidega , axboe@kernel.dk Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Date: Wed, 20 Jun 2018 08:41:13 -0700 In-Reply-To: <20180620161434.GA3513@kidega-PC> References: <20180620161434.GA3513@kidega-PC> X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2018-06-20 at 19:14 +0300, kidega wrote: > Reply-To: It seems this is your first attempt to patch something in the linux kernel. You should read https://kernelnewbies.org/ and you should start with files in drivers/staging. The Reply-To: line should not exist here > > remove trailing spaces > > correct indenting The leading "> " uses should not exist here. > Signed-off-by: kidega You need your full legal name here. > diff --git a/block/partitions/mac.c b/block/partitions/mac.c This file probably does not need style changes as it's pretty old and unlikely to change. But if it did: > @@ -97,16 +97,14 @@ int mac_partition(struct parsed_partitions *state) > int goodness = 0; > > mac_fix_string(part->processor, 16); > - mac_fix_string(part->name, 32); > - mac_fix_string(part->type, 32); > - > + mac_fix_string(part->name, 32); mac_fix_string(part->type, 32); This needs separate lines for each single statement. > if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE) > && strcasecmp(part->processor, "powerpc") == 0) > goodness++; > > if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0 > - || (strncasecmp(part->type, "Linux", 5) == 0 > - && strcasecmp(part->type, "Linux_swap") != 0)) { > + || (strncasecmp(part->type, "Linux", 5) == 0 > + && strcasecmp(part->type, "Linux_swap") != 0)) { This is making the indentation worse as the parenthesized sub-test block is now unaligned. And some would prefer moving the && || to the end of the previous line like: --- block/partitions/mac.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/block/partitions/mac.c b/block/partitions/mac.c index b6095335636c..897da77e5379 100644 --- a/block/partitions/mac.c +++ b/block/partitions/mac.c @@ -98,15 +98,15 @@ int mac_partition(struct parsed_partitions *state) mac_fix_string(part->processor, 16); mac_fix_string(part->name, 32); - mac_fix_string(part->type, 32); - - if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE) - && strcasecmp(part->processor, "powerpc") == 0) + mac_fix_string(part->type, 32); + + if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE) && + strcasecmp(part->processor, "powerpc") == 0) goodness++; - if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0 - || (strncasecmp(part->type, "Linux", 5) == 0 - && strcasecmp(part->type, "Linux_swap") != 0)) { + if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0 || + (strncasecmp(part->type, "Linux", 5) == 0 && + strcasecmp(part->type, "Linux_swap") != 0)) { int i, l; goodness++;