[linux-yocto] [PATCH 48/94] drivers/net: Added debug code.

Bruce Ashfield bruce.ashfield at windriver.com
Sat Nov 9 07:49:09 PST 2013


On 11/7/2013, 8:13 PM, Paul Butler wrote:
> From: John Jacques <john.jacques at lsi.com>
>
> Signed-off-by: John Jacques <john.jacques at lsi.com>
> ---
>   drivers/net/ethernet/lsi/lsi_acp_mdio.c | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/ethernet/lsi/lsi_acp_mdio.c b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
> index 04c224c..18aaba1 100644
> --- a/drivers/net/ethernet/lsi/lsi_acp_mdio.c
> +++ b/drivers/net/ethernet/lsi/lsi_acp_mdio.c
> @@ -98,6 +98,11 @@ acp_mdio_read(unsigned long address, unsigned long offset,
>   	*value = (unsigned short)(command & 0xffff);
>   	spin_unlock_irqrestore(&mdio_lock, flags);
>
> +#if 0
> +	printk("%s - Read 0x%x from 0x%x register 0x%x\n",
> +	       __FUNCTION__, *value, address, offset);
> +#endif
> +
>   	return 0;
>   }
>   EXPORT_SYMBOL(acp_mdio_read);
> @@ -150,6 +155,11 @@ acp_mdio_write(unsigned long address, unsigned long offset,
>
>   	spin_unlock_irqrestore(&mdio_lock, flags);
>
> +#if 0

These *really* need to be controlled by a define, or Kconfig that controls
a #define.

Leaving #if 0 code around the tree is bad form.

Bruce

> +	printk("%s - Wrote 0x%x to 0x%x register 0x%x\n",
> +	       __FUNCTION__, value, address, offset);
> +#endif
> +
>   	return 0;
>   }
>   EXPORT_SYMBOL(acp_mdio_write);
>




More information about the linux-yocto mailing list