lkml.org 
[lkml]   [2015]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] Staging: lustre: lnet: lnet: router.c : fix 80 char limit
On Wed, Mar 18, 2015 at 10:45:46PM +0100, Redha Gouicem wrote:
> This fixes lines longer than 80 char which are not debug or error messages.
>
> Signed-off-by: Redha Gouicem <redha.gouicem@gmail.com>
> ---
> drivers/staging/lustre/lnet/lnet/router.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
> index c0a6aeb..89a29b7 100644
> --- a/drivers/staging/lustre/lnet/lnet/router.c
> +++ b/drivers/staging/lustre/lnet/lnet/router.c
> @@ -107,7 +107,8 @@ lnet_peers_start_down(void)
> }
>
> void
> -lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, unsigned long when)
> +lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive,
> + unsigned long when)
> {
> if (time_before(when, lp->lp_timestamp)) { /* out of date information */
> CDEBUG(D_NET, "Out of date\n");
> @@ -1435,7 +1436,8 @@ int
> lnet_rtrpools_alloc(int im_a_router)
> {
> lnet_rtrbufpool_t *rtrp;
> - int large_pages = (LNET_MTU + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
> + int large_pages = (LNET_MTU + PAGE_CACHE_SIZE - 1)
> + >> PAGE_CACHE_SHIFT;

This last change doesn't really work in that it makes the code harder to
read now. Yeah, the original code is a mess, one way to fix this would
be to not do the assignment here in the variable initializer, but move
it below in the code to be something like:

int large_pages;

....

large_pages = (LNET_MTU + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;

Can you fix this patch up to look like this and resend?

thanks,

greg k-h


\
 
 \ /
  Last update: 2015-03-18 23:21    [W:4.912 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site