From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308AbcGWSBh (ORCPT ); Sat, 23 Jul 2016 14:01:37 -0400 Received: from linuxhacker.ru ([217.76.32.60]:56192 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbcGWSBg convert rfc822-to-8bit (ORCPT ); Sat, 23 Jul 2016 14:01:36 -0400 Subject: Re: [PATCH 12/15] staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}' Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=US-ASCII From: Oleg Drokin In-Reply-To: <1469295072.1900.162.camel@perches.com> Date: Sat, 23 Jul 2016 14:01:14 -0400 Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Linux Kernel Mailing List , Lustre Development List , Emoly Liu Content-Transfer-Encoding: 7BIT Message-Id: <974D47D2-320C-42C0-BA73-1DA12B73737F@linuxhacker.ru> References: <1469255832-746785-1-git-send-email-green@linuxhacker.ru> <1469255832-746785-13-git-send-email-green@linuxhacker.ru> <1469295072.1900.162.camel@perches.com> To: Joe Perches X-Mailer: Apple Mail (2.1283) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Jul 23, 2016, at 1:31 PM, Joe Perches wrote: > On Sat, 2016-07-23 at 02:37 -0400, Oleg Drokin wrote: >> From: Emoly Liu > > unrelated trivial notes: > >> diff --git a/drivers/staging/lustre/lustre/obdecho/echo_internal.h b/drivers/staging/lustre/lustre/obdecho/echo_internal.h > [] >> @@ -33,9 +33,9 @@ >> >> /* The persistent object (i.e. actually stores stuff!) */ >> #define ECHO_PERSISTENT_OBJID 1ULL >> -#define ECHO_PERSISTENT_SIZE ((__u64)(1<<20)) >> +#define ECHO_PERSISTENT_SIZE ((__u64)(1 << 20)) > > This is generally an error-prone pattern as the cast is > done after the shift. Hm, indeed. > Perhaps better is using a specific type > > #define ECHO_PERSISTENT_SIZE (1ULL << 20) Yes, I guess this is a better way. > And lustre seems to use types with unnecessary __ prefixes. Need to see if this file is included in userspace where the __ is needed.