From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sun, 15 Jan 2012 12:28:41 -0500 Subject: [U-Boot] [PATCH 1/5] net: ll_temac: Add LL TEMAC driver to u-boot In-Reply-To: <1326642366-22468-1-git-send-email-linz@li-pro.net> References: <1326642119.18981.190.camel@keto> <1326642366-22468-1-git-send-email-linz@li-pro.net> Message-ID: <201201151228.42149.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday 15 January 2012 10:46:02 Stephan Linz wrote: > +/* Data buffer for LL TEMAC Rx and Tx direction */ > +static unsigned char rx_buffer[PKTSIZE_ALIGN] > __attribute((aligned(DMAALIGN))); > +static unsigned char tx_buffer[PKTSIZE_ALIGN] > __attribute((aligned(DMAALIGN))); come code already declares PktBuf ... can't you use that ? > +static struct ll_temac_info ll_temac_info[] = { this looks like a struct that should get allocated on the fly based on arguments given to the driver's registration func > +int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf) > ... > + dev = calloc(1, sizeof(*dev)); > ... > + /* Tell u-boot to get the addr from the env */ > + for (i = 0; i < 6; i++) > + dev->enetaddr[i] = 0; the memory is already zero-ed by the call to calloc, so this for loop is useless (and if it wasn't, you'd still use memset()) -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: