linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jan-Bernd Themann <ossthema@de.ibm.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Thomas Klein <tklein@de.ibm.com>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	netdev@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Thomas Klein <osstklei@de.ibm.com>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	Christoph Raisch <raisch@de.ibm.com>,
	Marcus Eder <meder@de.ibm.com>
Subject: Re: [2.6.19 PATCH 1/7] ehea: interface to network stack
Date: Mon, 21 Aug 2006 14:23:53 +0200	[thread overview]
Message-ID: <200608211423.54250.ossthema@de.ibm.com> (raw)
In-Reply-To: <20060818144429.GF5201@martell.zuzino.mipt.ru>

Hi

On Friday 18 August 2006 16:44, Alexey Dobriyan wrote:
> > +static int ehea_init_port_res(struct ehea_port *port, struct ehea_port_res *pr,
> > +			      struct port_res_cfg *pr_cfg, int queue_token)
> > +{
> > +	int ret = -EINVAL;
> > +	int max_rq_entries = 0;
> > +	enum ehea_eq_type eq_type = EHEA_EQ;
> > +	struct ehea_qp_init_attr *init_attr = NULL;
> > +	struct ehea_adapter *adapter = port->adapter;
> > +
> > +	memset(pr, 0, sizeof(struct ehea_port_res));
> > +
> > +	pr->skb_arr_rq3 = NULL;
> > +	pr->skb_arr_rq2 = NULL;
> > +	pr->skb_arr_rq1 = NULL;
> > +	pr->skb_arr_sq = NULL;
> > +	pr->qp = NULL;
> > +	pr->send_cq = NULL;
> > +	pr->recv_cq = NULL;
> > +	pr->send_eq = NULL;
> > +	pr->recv_eq = NULL;
> 
> After memset unneeded. ;-)
> 

Is it valid (common in the kernel environment) to treat NULL as 0 after a memset
and thus to forget about initialization?

Thanks,
Jan-Bernd

  reply	other threads:[~2006-08-21 13:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 11:29 [2.6.19 PATCH 1/7] ehea: interface to network stack Jan-Bernd Themann
2006-08-18 13:47 ` Alexey Dobriyan
2006-08-18 13:56   ` Arjan van de Ven
2006-08-18 14:44 ` Alexey Dobriyan
2006-08-21 12:23   ` Jan-Bernd Themann [this message]
2006-08-21 13:18     ` Jörn Engel
2006-08-21 14:52   ` Thomas Klein
  -- strict thread matches above, loose matches on Subject: below --
2006-08-22 12:51 Jan-Bernd Themann
2006-08-23  8:56 Jan-Bernd Themann
2006-09-04 10:37 Jan-Bernd Themann
2006-09-04 20:16 ` Francois Romieu
2006-09-04 21:11   ` Arnd Bergmann
2006-09-04 21:49     ` Francois Romieu
2006-09-06 15:22     ` Jeff Garzik
2006-09-05 15:09   ` Thomas Klein
2006-09-05 18:58     ` Francois Romieu
2006-09-06 12:53       ` Jan-Bernd Themann
2006-09-06 13:30 Jan-Bernd Themann

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=200608211423.54250.ossthema@de.ibm.com \
    --to=ossthema@de.ibm.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=osstklei@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=themann@de.ibm.com \
    --cc=tklein@de.ibm.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;
as well as URLs for NNTP newsgroup(s).