All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Joe Perches <joe@perches.com>
Cc: Masaru Nomura <massa.nomura@gmail.com>,
	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: Tue, 20 May 2014 08:50:46 +0000	[thread overview]
Message-ID: <537B1766.1090808@bfs.de> (raw)
In-Reply-To: <1400434032.21382.3.camel@joe-AO725>



Am 18.05.2014 19:27, schrieb Joe Perches:
> 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.
> 

for a start,
some kind soul could replace the malloc()/memset() with zalloc().

re,
 wh






WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Joe Perches <joe@perches.com>
Cc: Masaru Nomura <massa.nomura@gmail.com>,
	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: Tue, 20 May 2014 10:50:46 +0200	[thread overview]
Message-ID: <537B1766.1090808@bfs.de> (raw)
In-Reply-To: <1400434032.21382.3.camel@joe-AO725>



Am 18.05.2014 19:27, schrieb Joe Perches:
> 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.
> 

for a start,
some kind soul could replace the malloc()/memset() with zalloc().

re,
 wh






  parent reply	other threads:[~2014-05-20  8:50 UTC|newest]

Thread overview: 20+ 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 ` Masaru Nomura
2014-05-18 17:19 ` [PATCH 1/5] staging: lustre: lnet: socklnd: Remove prohibited space Masaru Nomura
2014-05-18 17:19   ` Masaru Nomura
2014-05-18 17:19 ` [PATCH 2/5] staging: lustre: lnet: socklnd: Clean up memset(...) Masaru Nomura
2014-05-18 17:19   ` Masaru Nomura
2014-05-18 17:27   ` Joe Perches
2014-05-18 17:27     ` Joe Perches
2014-05-18 19:12     ` Masaru Nomura
2014-05-18 19:12       ` Masaru Nomura
2014-05-20  8:50     ` walter harms [this message]
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   ` 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   ` Masaru Nomura
2014-05-18 17:19 ` [PATCH 5/5] staging: lustre: lnet: socklnd: Clean up ksocknal_create_conn(...) Masaru Nomura
2014-05-18 17:19   ` Masaru Nomura
2014-05-18 20:33 ` [PATCH 0/5] staging: lustre: lnet: klnds: Fix coding style in socklnd.c Dan Carpenter
2014-05-18 20:33   ` 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=537B1766.1090808@bfs.de \
    --to=wharms@bfs.de \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.