mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/2] Staging: Lustre: Fixed coding style issues
@ 2016-04-17 14:11 Panos Vlachos
  2016-04-17 21:35 ` Drokin, Oleg
  0 siblings, 1 reply; 3+ messages in thread
From: Panos Vlachos @ 2016-04-17 14:11 UTC (permalink / raw)
  To: oleg.drokin; +Cc: devel, linux-kernel, andreas.dilger, Panos Vlachos

Fixed one coding style issue in the
file router_proc.c (Lustre staging driver)

Signed-off-by: Panos Vlachos <panosvlchs@gmail.com>
---
 drivers/staging/lustre/lnet/lnet/router_proc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
index 65f65a3..87afb40 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -32,7 +32,8 @@
  */
 #define LNET_PROC_CPT_BITS	(LNET_CPT_BITS + 1)
 /* change version, 16 bits or 8 bits */
-#define LNET_PROC_VER_BITS	max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
+#define LNET_PROC_VER_BITS	\
+max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
 
 #define LNET_PROC_HASH_BITS	LNET_PEER_HASH_BITS
 /*
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] Staging: Lustre: Fixed coding style issues
  2016-04-17 14:11 [PATCH 2/2] Staging: Lustre: Fixed coding style issues Panos Vlachos
@ 2016-04-17 21:35 ` Drokin, Oleg
  2016-04-18  8:47   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Drokin, Oleg @ 2016-04-17 21:35 UTC (permalink / raw)
  To: Panos Vlachos
  Cc: <devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>,
	Dilger, Andreas


On Apr 17, 2016, at 10:11 AM, Panos Vlachos wrote:

> Fixed one coding style issue in the
> file router_proc.c (Lustre staging driver)

Perhaps it's best to reference what the issue is.
I.e. "Fix too long line in …"
and then in the actual message add that you just split it?
> 
> Signed-off-by: Panos Vlachos <panosvlchs@gmail.com>
> ---
> drivers/staging/lustre/lnet/lnet/router_proc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
> index 65f65a3..87afb40 100644
> --- a/drivers/staging/lustre/lnet/lnet/router_proc.c
> +++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
> @@ -32,7 +32,8 @@
>  */
> #define LNET_PROC_CPT_BITS	(LNET_CPT_BITS + 1)
> /* change version, 16 bits or 8 bits */
> -#define LNET_PROC_VER_BITS	max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
> +#define LNET_PROC_VER_BITS	\
> +max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)

Hm, I am not sure this is an improvement, you might want to at least place a tab at the start of this
second line, so that indentation helps us better see it's a continuation of the previous one.

Thanks.

> 
> #define LNET_PROC_HASH_BITS	LNET_PEER_HASH_BITS
> /*
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] Staging: Lustre: Fixed coding style issues
  2016-04-17 21:35 ` Drokin, Oleg
@ 2016-04-18  8:47   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-04-18  8:47 UTC (permalink / raw)
  To: Drokin, Oleg, Panos Vlachos
  Cc: <devel@driverdev.osuosl.org>,
	<linux-kernel@vger.kernel.org>,
	Dilger, Andreas

On Sun, 2016-04-17 at 21:35 +0000, Drokin, Oleg wrote:
> On Apr 17, 2016, at 10:11 AM, Panos Vlachos wrote:
> > Fixed one coding style issue in the
> > file router_proc.c (Lustre staging driver)
> Perhaps it's best to reference what the issue is.
> I.e. "Fix too long line in …"
> and then in the actual message add that you just split it?
[]
> > diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
[]
> > @@ -32,7 +32,8 @@
> >  */
> > #define LNET_PROC_CPT_BITS	(LNET_CPT_BITS + 1)
> > /* change version, 16 bits or 8 bits */
> > -#define LNET_PROC_VER_BITS	max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
> > +#define LNET_PROC_VER_BITS	\
> > +max_t(size_t, min_t(size_t, LNET_LOFFT_BITS, 64) / 4, 8)
> Hm, I am not sure this is an improvement, you might want to at least place a tab at the start of this
> second line, so that indentation helps us better see it's a continuation of the previous one.

Given:
	#define LNET_LOFFT_BITS          (sizeof(loff_t) * 8)
and:
	include/linux/types.h:typedef __kernel_loff_t           loff_t;
	include/uapi/asm-generic/posix_types.h:typedef long long        __kernel_loff_t;

and this isn't going to change any time soon,
maybe this #define isn't particularly useful and

	#define LNET_PROC_VER_BITS	16

is sufficient.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-18  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-17 14:11 [PATCH 2/2] Staging: Lustre: Fixed coding style issues Panos Vlachos
2016-04-17 21:35 ` Drokin, Oleg
2016-04-18  8:47   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®