From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mtagate6.uk.ibm.com (mtagate6.uk.ibm.com [195.212.29.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mtagate6.uk.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTP id 67F4B67B96 for ; Mon, 21 Aug 2006 23:03:56 +1000 (EST) Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate6.uk.ibm.com (8.13.7/8.13.7) with ESMTP id k7LD3pCd118716 for ; Mon, 21 Aug 2006 13:03:51 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k7LD5kt7131986 for ; Mon, 21 Aug 2006 14:05:46 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k7LD3o2G010308 for ; Mon, 21 Aug 2006 14:03:51 +0100 From: Jan-Bernd Themann To: Alexey Dobriyan Subject: Re: [2.6.19 PATCH 1/7] ehea: interface to network stack Date: Mon, 21 Aug 2006 14:23:53 +0200 References: <200608181329.02042.ossthema@de.ibm.com> <20060818144429.GF5201@martell.zuzino.mipt.ru> In-Reply-To: <20060818144429.GF5201@martell.zuzino.mipt.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200608211423.54250.ossthema@de.ibm.com> Cc: Thomas Klein , Jan-Bernd Themann , netdev@vger.kernel.org, linux-kernel , Thomas Klein , linux-ppc , Christoph Raisch , Marcus Eder List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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