From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 17 Feb 2014 21:57:04 +0100 Subject: [U-Boot] [PATCH v2 3/7] usb: eth: introduce support for Moschip USB ethernet In-Reply-To: <1392665727-5734-4-git-send-email-gsi@denx.de> References: <1392665727-5734-1-git-send-email-gsi@denx.de> <1392665727-5734-4-git-send-email-gsi@denx.de> Message-ID: <201402172157.04438.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, February 17, 2014 at 08:35:23 PM, Gerhard Sittig wrote: [...] > +int mcs7830_eth_get_info(struct usb_device *dev, struct ueth_data *ss, > + struct eth_device *eth) > +{ > + debug("%s()\n", __func__); > + if (!eth) { > + debug("%s: missing parameter.\n", __func__); > + return 0; > + } > + > + snprintf(eth->name, sizeof(eth->name), "%s%d", > + MCS7830_BASE_NAME, mcs7830_iface_idx++); > + eth->init = mcs7830_init; > + eth->send = mcs7830_send; > + eth->recv = mcs7830_recv; > + eth->halt = mcs7830_halt; > + eth->write_hwaddr = mcs7830_write_mac; > + eth->priv = ss; > + > + if (mcs7830_basic_reset(ss)) > + return 0; > + > +#ifdef DEBUG > + (void)mcs7830_read_config(eth); So this is debug-only function? You might want to put the entire function into #ifdef DEBUG and then have an #else , where you define the function as an empty one. The GCC shall handle the rest then as well, but you won't have this ugly ifdef in a function. [...] Best regards, Marek Vasut