2018-10-08 07:34:25

by Loic Tourlonias

[permalink] [raw]
Subject: [PATCH] staging: emxx_udc: remove unused code

Remove useless code inside if_0 endif

Signed-off-by: Loic Tourlonias <[email protected]>
---
drivers/staging/emxx_udc/emxx_udc.h | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
index 8337e38c238a..78fa60192a14 100644
--- a/drivers/staging/emxx_udc/emxx_udc.h
+++ b/drivers/staging/emxx_udc/emxx_udc.h
@@ -10,10 +10,6 @@

/*---------------------------------------------------------------------------*/
/*----------------- Default undef */
-#if 0
-#define DEBUG
-#define UDC_DEBUG_DUMP
-#endif

/*----------------- Default define */
#define USE_DMA 1
--
2.17.1



2018-10-08 07:58:40

by Gustavo A. R. Silva

[permalink] [raw]
Subject: Re: [PATCH] staging: emxx_udc: remove unused code

Hi,

On 10/8/18 9:33 AM, Loic Tourlonias wrote:
> Remove useless code inside if_0 endif
>
> Signed-off-by: Loic Tourlonias <[email protected]>
> ---
> drivers/staging/emxx_udc/emxx_udc.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
> index 8337e38c238a..78fa60192a14 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.h
> +++ b/drivers/staging/emxx_udc/emxx_udc.h
> @@ -10,10 +10,6 @@
>
> /*---------------------------------------------------------------------------*/
> /*----------------- Default undef */
> -#if 0
> -#define DEBUG
> -#define UDC_DEBUG_DUMP
> -#endif
>

Don't remove that code. This is a common practice for debugging.

Whenever the developer needs to debug something in the whole driver, he/she
just has to change that #if 0 to #if 1 and then all the code under DEBUG
and UDC_DEBUG_DUMP will be enabled.

Notice that UDC_DEBUG_DUMP is being used in drivers/staging/emxx_udc/emxx_udc.c

Thanks
--
Gustavo