diff mbox series

[07/20] usb: dwc3-uniphier: replace <common.h> with <linux/bitops.h>

Message ID 1507890129-1543-8-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 4bb3dac77234b43ce188e2bcb6b439351bea5134
Headers show
Series ARM: uniphier: various refactoring for v2017.11-rc2 | expand

Commit Message

Masahiro Yamada Oct. 13, 2017, 10:21 a.m. UTC
Including <common.h> pulls in a lot of bloat.  What this driver needs
is BIT(), so replace it with <linux/bitops.h>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/usb/dwc3/dwc3-uniphier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut Oct. 13, 2017, 10:40 a.m. UTC | #1
On 10/13/2017 12:21 PM, Masahiro Yamada wrote:
> Including <common.h> pulls in a lot of bloat.  What this driver needs
> is BIT(), so replace it with <linux/bitops.h>
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Doesn't common.h also pull in the config macros ? Maybe they are not
needed here though ...

> ---
> 
>  drivers/usb/dwc3/dwc3-uniphier.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c
> index 0d13770..25b17a8 100644
> --- a/drivers/usb/dwc3/dwc3-uniphier.c
> +++ b/drivers/usb/dwc3/dwc3-uniphier.c
> @@ -7,8 +7,8 @@
>   * SPDX-License-Identifier:	GPL-2.0+
>   */
>  
> -#include <common.h>
>  #include <dm.h>
> +#include <linux/bitops.h>
>  #include <linux/errno.h>
>  #include <linux/io.h>
>  #include <linux/sizes.h>
>
Masahiro Yamada Oct. 13, 2017, 11:01 a.m. UTC | #2
Hi Marek,


2017-10-13 19:40 GMT+09:00 Marek Vasut <marex@denx.de>:
> On 10/13/2017 12:21 PM, Masahiro Yamada wrote:
>> Including <common.h> pulls in a lot of bloat.  What this driver needs
>> is BIT(), so replace it with <linux/bitops.h>
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Doesn't common.h also pull in the config macros ? Maybe they are not
> needed here though ...


If you need legacy CONFIG from include/configs/<board>.h,
yes, you need to include <common.h>
(or <config.h> at least)


Recent CONFIG options from Kconfig are automatically provided
via  -include $(srctree)/include/linux/kconfig.h
Marek Vasut Oct. 13, 2017, 11:10 a.m. UTC | #3
On 10/13/2017 01:01 PM, Masahiro Yamada wrote:
> Hi Marek,
> 
> 
> 2017-10-13 19:40 GMT+09:00 Marek Vasut <marex@denx.de>:
>> On 10/13/2017 12:21 PM, Masahiro Yamada wrote:
>>> Including <common.h> pulls in a lot of bloat.  What this driver needs
>>> is BIT(), so replace it with <linux/bitops.h>
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>
>> Doesn't common.h also pull in the config macros ? Maybe they are not
>> needed here though ...
> 
> 
> If you need legacy CONFIG from include/configs/<board>.h,
> yes, you need to include <common.h>
> (or <config.h> at least)
> 
> 
> Recent CONFIG options from Kconfig are automatically provided
> via  -include $(srctree)/include/linux/kconfig.h

OK, so not needed , perfect, thanks.

Acked-by: Marek Vasut <marex@denx.de>
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/dwc3-uniphier.c b/drivers/usb/dwc3/dwc3-uniphier.c
index 0d13770..25b17a8 100644
--- a/drivers/usb/dwc3/dwc3-uniphier.c
+++ b/drivers/usb/dwc3/dwc3-uniphier.c
@@ -7,8 +7,8 @@ 
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#include <common.h>
 #include <dm.h>
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/io.h>
 #include <linux/sizes.h>