Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1519431pxb; Thu, 4 Feb 2021 15:30:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/ooGX/5ouaNIPY3AnHV39KXmhFgJiIcgDknhwYUn3ftoXPdc48O/sxv2XmeoZNuteiw8+ X-Received: by 2002:aa7:c981:: with SMTP id c1mr966257edt.90.1612481425115; Thu, 04 Feb 2021 15:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481425; cv=none; d=google.com; s=arc-20160816; b=ZMBB5lJqFdD5trD7FNk3VKer3EDn6pbGYXGjTG/7PIQVn45VOu9aG7uveA9lVqHy1O jmJxWyPdcUUO8qwpl+vK+smiU/BSei2ZNWRAhOifLguR8kr3XhMQiWqiGXP5fOarnsC9 6Rk9sOj+sJx/COFtggG7eMS+CgLa9GCXOTgMlnzqq5tayJ2M3Clu4w2oW8VEURvPx345 dIbCPIsECuOdvugP+jBpWt6NzskNrVcpIoonBvFHR4m0ZAwAVSxyw06ux9v7rmiybOp0 tjWuIJFL0J466DhRsGbP8TwIkgcwP7+kqU0IEL91A1YmKc/i6/XnTv2rV0w5NhE/kjLZ kygQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=TL69aNKGT4AgARtMCPDTDcTnvcF87XSM6dGzEFOhRis=; b=Znnnb5qsgQwfe5g9QSAyU+WA0W4oU7qzCHLk3v8tJdXlGdq+8ka79KtCWVo4uFSiAG w7FXsCKr+YwqlYCXLSW7PhL4ITWuAk0O1wQtav10YUnX/YDMHlrE6ueaw8YQInBFiIce sctoic81y+Ud16SwcfQqAh6ZnDyBu6B9WCHvdAw8Agu7UzAPl/1xOP0Bbb9KMtF21Poy gfl5X2LmAv2bXzXTIFn21gLlTG4mZjE1iAxI1mmy9eLWcKu+Hb+KPHSG1npnp09dag1d s9pD8Hhgrvc12+IgNwx3VA4gX/bn0gCY87WDJi4OHQIuA1Gm8CwRbJvmP4fD6p5iklLG XfPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o26si4195528edw.74.2021.02.04.15.30.00; Thu, 04 Feb 2021 15:30:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234533AbhBDHe7 (ORCPT + 99 others); Thu, 4 Feb 2021 02:34:59 -0500 Received: from smtprelay0125.hostedemail.com ([216.40.44.125]:47400 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234579AbhBDHex (ORCPT ); Thu, 4 Feb 2021 02:34:53 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 98740180A7FC7; Thu, 4 Feb 2021 07:34:07 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3150:3352:3590:3622:3865:3867:3868:3872:4321:5007:7652:10004:10400:10848:11026:11232:11658:11914:12043:12297:12438:12740:12895:13069:13161:13229:13311:13357:13439:13894:14659:21080:21451:21611:21627:21740:21809:21990:30012:30025:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: game57_2706cde275da X-Filterd-Recvd-Size: 1955 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Thu, 4 Feb 2021 07:34:06 +0000 (UTC) Message-ID: <599ba2c6cebb8d8079d6af61d5987b958b2732f8.camel@perches.com> Subject: Re: [PATCH] ceph: minor coding style tweaks From: Joe Perches To: Zhiyuan Dai , jlayton@kernel.org, idryomov@gmail.com Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 03 Feb 2021 23:34:05 -0800 In-Reply-To: <1612420334-1112-1-git-send-email-daizhiyuan@phytium.com.cn> References: <1612420334-1112-1-git-send-email-daizhiyuan@phytium.com.cn> 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 14:32 +0800, Zhiyuan Dai wrote: > Fixed some coding style issues, improve code reading. Might describe the patch does 3 things: o Move the pointer location struct foo* bar; -> struct foo *bar; o Move brace position from struct foo { to struct foo { o Alignment to open parenthesis And one more comment: > diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c [] > @@ -309,8 +309,8 @@ static int ceph_fill_dirfrag(struct inode *inode, > ? > ?static int frag_tree_split_cmp(const void *l, const void *r) > ?{ > - struct ceph_frag_tree_split *ls = (struct ceph_frag_tree_split*)l; > - struct ceph_frag_tree_split *rs = (struct ceph_frag_tree_split*)r; > + struct ceph_frag_tree_split *ls = (struct ceph_frag_tree_split *)l; > + struct ceph_frag_tree_split *rs = (struct ceph_frag_tree_split *)r; It's unnecessary to cast void pointers and it's bad form to lose the const qualifier. const struct ceph_frag_tree_split *ls = l; const struct ceph_frag_tree_split *rs = r; > ? return ceph_frag_compare(le32_to_cpu(ls->frag), > ? le32_to_cpu(rs->frag)); > ?}