linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB
@ 2019-03-19 13:51 Paul Cercueil
  2019-04-01 15:43 ` Bin Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Cercueil @ 2019-03-19 13:51 UTC (permalink / raw)
  To: Bin Liu; +Cc: linux-usb, linux-kernel, Paul Cercueil

Some drivers, like jz4740-musb, don't depend on CONFIG_USB.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/usb/musb/musb_core.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index b7d56272f9d1..9f5a4819a744 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1497,10 +1497,11 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
 	} else {
 		musb->is_multipoint = 0;
 		type = "";
-#ifndef	CONFIG_USB_OTG_BLACKLIST_HUB
-		pr_err("%s: kernel must blacklist external hubs\n",
-		       musb_driver_name);
-#endif
+		if (IS_ENABLED(CONFIG_USB) &&
+		    !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) {
+			pr_err("%s: kernel must blacklist external hubs\n",
+			       musb_driver_name);
+		}
 	}
 
 	/* log release info */
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB
  2019-03-19 13:51 [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB Paul Cercueil
@ 2019-04-01 15:43 ` Bin Liu
  2019-04-01 17:51   ` Paul Cercueil
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Liu @ 2019-04-01 15:43 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: linux-usb, linux-kernel

On Tue, Mar 19, 2019 at 02:51:46PM +0100, Paul Cercueil wrote:
> Some drivers, like jz4740-musb, don't depend on CONFIG_USB.

CONFIG_USB_OTG_BLACKLIST_HUB is about hub, so should it depend on
CONFIG_USB instead in drivers/usb/core/Kconfig?

> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  drivers/usb/musb/musb_core.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index b7d56272f9d1..9f5a4819a744 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1497,10 +1497,11 @@ static int musb_core_init(u16 musb_type, struct musb *musb)
>  	} else {
>  		musb->is_multipoint = 0;
>  		type = "";
> -#ifndef	CONFIG_USB_OTG_BLACKLIST_HUB
> -		pr_err("%s: kernel must blacklist external hubs\n",
> -		       musb_driver_name);
> -#endif
> +		if (IS_ENABLED(CONFIG_USB) &&
> +		    !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) {
> +			pr_err("%s: kernel must blacklist external hubs\n",
> +			       musb_driver_name);
> +		}
>  	}
>  
>  	/* log release info */

Regards,
-Bin.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB
  2019-04-01 15:43 ` Bin Liu
@ 2019-04-01 17:51   ` Paul Cercueil
  2019-04-01 18:34     ` Bin Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Cercueil @ 2019-04-01 17:51 UTC (permalink / raw)
  To: Bin Liu; +Cc: linux-usb, linux-kernel



Le lun. 1 avril 2019 à 17:43, Bin Liu <b-liu@ti.com> a écrit :
> On Tue, Mar 19, 2019 at 02:51:46PM +0100, Paul Cercueil wrote:
>>  Some drivers, like jz4740-musb, don't depend on CONFIG_USB.
> 
> CONFIG_USB_OTG_BLACKLIST_HUB is about hub, so should it depend on
> CONFIG_USB instead in drivers/usb/core/Kconfig?

It's already the case, indirectly - it depends on CONFIG_USB_OTG,
which only exists if CONFIG_USB is set.

>> 
>>  Signed-off-by: Paul Cercueil <paul@crapouillou.net>
>>  ---
>>   drivers/usb/musb/musb_core.c | 9 +++++----
>>   1 file changed, 5 insertions(+), 4 deletions(-)
>> 
>>  diff --git a/drivers/usb/musb/musb_core.c 
>> b/drivers/usb/musb/musb_core.c
>>  index b7d56272f9d1..9f5a4819a744 100644
>>  --- a/drivers/usb/musb/musb_core.c
>>  +++ b/drivers/usb/musb/musb_core.c
>>  @@ -1497,10 +1497,11 @@ static int musb_core_init(u16 musb_type, 
>> struct musb *musb)
>>   	} else {
>>   		musb->is_multipoint = 0;
>>   		type = "";
>>  -#ifndef	CONFIG_USB_OTG_BLACKLIST_HUB
>>  -		pr_err("%s: kernel must blacklist external hubs\n",
>>  -		       musb_driver_name);
>>  -#endif
>>  +		if (IS_ENABLED(CONFIG_USB) &&
>>  +		    !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) {
>>  +			pr_err("%s: kernel must blacklist external hubs\n",
>>  +			       musb_driver_name);
>>  +		}
>>   	}
>> 
>>   	/* log release info */
> 
> Regards,
> -Bin.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB
  2019-04-01 17:51   ` Paul Cercueil
@ 2019-04-01 18:34     ` Bin Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Bin Liu @ 2019-04-01 18:34 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: linux-usb, linux-kernel

On Mon, Apr 01, 2019 at 07:51:59PM +0200, Paul Cercueil wrote:
> 
> 
> Le lun. 1 avril 2019 à 17:43, Bin Liu <b-liu@ti.com> a écrit :
> >On Tue, Mar 19, 2019 at 02:51:46PM +0100, Paul Cercueil wrote:
> >> Some drivers, like jz4740-musb, don't depend on CONFIG_USB.
> >
> >CONFIG_USB_OTG_BLACKLIST_HUB is about hub, so should it depend on
> >CONFIG_USB instead in drivers/usb/core/Kconfig?
> 
> It's already the case, indirectly - it depends on CONFIG_USB_OTG,
> which only exists if CONFIG_USB is set.

Never mind, my bad, I misunderstood the logic.

> >>
> >> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> >> ---
> >>  drivers/usb/musb/musb_core.c | 9 +++++----
> >>  1 file changed, 5 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/usb/musb/musb_core.c
> >>b/drivers/usb/musb/musb_core.c
> >> index b7d56272f9d1..9f5a4819a744 100644
> >> --- a/drivers/usb/musb/musb_core.c
> >> +++ b/drivers/usb/musb/musb_core.c
> >> @@ -1497,10 +1497,11 @@ static int musb_core_init(u16
> >>musb_type, struct musb *musb)
> >>  	} else {
> >>  		musb->is_multipoint = 0;
> >>  		type = "";
> >> -#ifndef	CONFIG_USB_OTG_BLACKLIST_HUB
> >> -		pr_err("%s: kernel must blacklist external hubs\n",
> >> -		       musb_driver_name);
> >> -#endif
> >> +		if (IS_ENABLED(CONFIG_USB) &&
> >> +		    !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) {
> >> +			pr_err("%s: kernel must blacklist external hubs\n",
> >> +			       musb_driver_name);
> >> +		}
> >>  	}
> >>
> >>  	/* log release info */

The patch is applied.

Thanks,
-Bin.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-01 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 13:51 [PATCH] usb: musb: Silence error about blacklisting hubs if !CONFIG_USB Paul Cercueil
2019-04-01 15:43 ` Bin Liu
2019-04-01 17:51   ` Paul Cercueil
2019-04-01 18:34     ` Bin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).