public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Masaru Nomura <massa.nomura@gmail.com>
Cc: gregkh@linuxfoundation.org, andreas.dilger@intel.com,
	oleg.drokin@intel.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/5] staging: lustre: lnet: socklnd: Clean up memset(...)
Date: Sun, 18 May 2014 17:27:12 +0000	[thread overview]
Message-ID: <1400434032.21382.3.camel@joe-AO725> (raw)
In-Reply-To: <1400433557-24985-3-git-send-email-massa.nomura@gmail.com>

On Sun, 2014-05-18 at 18:19 +0100, Masaru Nomura wrote:
> Remove prohibited space and fix line over 80 characters of
> memset(...) to meet kernel coding style.
[]
> diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
[]
> @@ -113,7 +113,7 @@ ksocknal_create_peer(ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id)
>  	if (peer = NULL)
>  		return -ENOMEM;
>  
> -	memset (peer, 0, sizeof (*peer));       /* NULL pointers/clear flags etc */
> +	memset(peer, 0, sizeof(*peer));     /* NULL pointers/clear flags etc */

It looks like this memset is unnecessary
as it's already zeroed by LIBCFS_ALLOC->
LIBCFS_ALLOC_GFP->LIBCFS_ALLOC_POST->memset.

It seems as if all these ALLOC macros could
use quite a bit of cleaning/sorting out.



  reply	other threads:[~2014-05-18 17:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 17:19 [PATCH 0/5] staging: lustre: lnet: klnds: Fix coding style in socklnd.c Masaru Nomura
2014-05-18 17:19 ` [PATCH 1/5] staging: lustre: lnet: socklnd: Remove prohibited space Masaru Nomura
2014-05-18 17:19 ` [PATCH 2/5] staging: lustre: lnet: socklnd: Clean up memset(...) Masaru Nomura
2014-05-18 17:27   ` Joe Perches [this message]
2014-05-18 19:12     ` Masaru Nomura
2014-05-20  8:50     ` walter harms
2014-05-18 17:19 ` [PATCH 3/5] staging: lustre: lnet: socklnd: Clean up CDEBUG(...) Masaru Nomura
2014-05-18 17:19 ` [PATCH 4/5] staging: lustre: lnet: socklnd: Clean up ksocknal_get_peer_info(...) Masaru Nomura
2014-05-18 17:19 ` [PATCH 5/5] staging: lustre: lnet: socklnd: Clean up ksocknal_create_conn(...) Masaru Nomura
2014-05-18 20:33 ` [PATCH 0/5] staging: lustre: lnet: klnds: Fix coding style in socklnd.c Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1400434032.21382.3.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=massa.nomura@gmail.com \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox