Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

2015-04-28 Thread Felipe Balbi
Hi,

On Tue, Apr 28, 2015 at 09:09:40PM +, Kaukab, Yousaf wrote:
  -Original Message-
  From: Felipe Balbi [mailto:ba...@ti.com]
  Sent: Tuesday, April 28, 2015 10:49 PM
  To: Kaukab, Yousaf
  Cc: ba...@ti.com; linux-usb@vger.kernel.org; john.y...@synopsys.com;
  Herrero, Gregory; r.bald...@samsung.com;
  dingu...@opensource.altera.com; zhangfei@linaro.org;
  jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
  Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy
  
  On Tue, Apr 28, 2015 at 08:47:08PM +, Kaukab, Yousaf wrote:
-Original Message-
From: Felipe Balbi [mailto:ba...@ti.com]
Sent: Monday, April 27, 2015 10:43 PM
To: Kaukab, Yousaf
Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
Herrero, Gregory; r.bald...@samsung.com;
dingu...@opensource.altera.com; zhangfei@linaro.org;
jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to
the phy
   
On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
 If phy driver is present register hcd handle to it.

 Signed-off-by: Mian Yousaf Kaukab yousaf.kau...@intel.com
 ---
  drivers/usb/dwc2/hcd.c | 6 ++
  1 file changed, 6 insertions(+)

 diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
 1cca5e0..919658e 100644
 --- a/drivers/usb/dwc2/hcd.c
 +++ b/drivers/usb/dwc2/hcd.c
 @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg,
 int
irq)
   /* Don't support SG list at this point */
   hcd-self.sg_tablesize = 0;

 + if (!IS_ERR_OR_NULL(hsotg-uphy))
   
when is uphy NULL ? Aparently, only platform.c sets it to NULL in
case of error, I'd say we should just make NULL a valid PHY pointer,
then we can remove a bunch of these checks scattered around.
  
   Here we can't as we want to dereference uphy.
   However, I like the idea and I guess it entails a separate patch to
   fix where possible?
  
  yeah, I'll handle that, unless you want to. It should be pretty simple.
 
 I can do it if it can wait.

oh, no rush. But I'd like to get it in time for v4.2 :-) I can
definitely wait a couple weeks.

-- 
balbi


signature.asc
Description: Digital signature


RE: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

2015-04-28 Thread Kaukab, Yousaf
 -Original Message-
 From: Felipe Balbi [mailto:ba...@ti.com]
 Sent: Monday, April 27, 2015 10:43 PM
 To: Kaukab, Yousaf
 Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
 Herrero, Gregory; r.bald...@samsung.com;
 dingu...@opensource.altera.com; zhangfei@linaro.org;
 jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
 Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy
 
 On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
  If phy driver is present register hcd handle to it.
 
  Signed-off-by: Mian Yousaf Kaukab yousaf.kau...@intel.com
  ---
   drivers/usb/dwc2/hcd.c | 6 ++
   1 file changed, 6 insertions(+)
 
  diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
  1cca5e0..919658e 100644
  --- a/drivers/usb/dwc2/hcd.c
  +++ b/drivers/usb/dwc2/hcd.c
  @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int
 irq)
  /* Don't support SG list at this point */
  hcd-self.sg_tablesize = 0;
 
  +   if (!IS_ERR_OR_NULL(hsotg-uphy))
 
 when is uphy NULL ? Aparently, only platform.c sets it to NULL in case of 
 error,
 I'd say we should just make NULL a valid PHY pointer, then we can remove a
 bunch of these checks scattered around.

Here we can't as we want to dereference uphy.
However, I like the idea and I guess it entails a separate patch to fix where 
possible?

 
 --
 balbi

BR,
Yousaf
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

2015-04-28 Thread Kaukab, Yousaf
 -Original Message-
 From: Felipe Balbi [mailto:ba...@ti.com]
 Sent: Tuesday, April 28, 2015 10:49 PM
 To: Kaukab, Yousaf
 Cc: ba...@ti.com; linux-usb@vger.kernel.org; john.y...@synopsys.com;
 Herrero, Gregory; r.bald...@samsung.com;
 dingu...@opensource.altera.com; zhangfei@linaro.org;
 jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
 Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy
 
 On Tue, Apr 28, 2015 at 08:47:08PM +, Kaukab, Yousaf wrote:
   -Original Message-
   From: Felipe Balbi [mailto:ba...@ti.com]
   Sent: Monday, April 27, 2015 10:43 PM
   To: Kaukab, Yousaf
   Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
   Herrero, Gregory; r.bald...@samsung.com;
   dingu...@opensource.altera.com; zhangfei@linaro.org;
   jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
   Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to
   the phy
  
   On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
If phy driver is present register hcd handle to it.
   
Signed-off-by: Mian Yousaf Kaukab yousaf.kau...@intel.com
---
 drivers/usb/dwc2/hcd.c | 6 ++
 1 file changed, 6 insertions(+)
   
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
1cca5e0..919658e 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg,
int
   irq)
/* Don't support SG list at this point */
hcd-self.sg_tablesize = 0;
   
+   if (!IS_ERR_OR_NULL(hsotg-uphy))
  
   when is uphy NULL ? Aparently, only platform.c sets it to NULL in
   case of error, I'd say we should just make NULL a valid PHY pointer,
   then we can remove a bunch of these checks scattered around.
 
  Here we can't as we want to dereference uphy.
  However, I like the idea and I guess it entails a separate patch to
  fix where possible?
 
 yeah, I'll handle that, unless you want to. It should be pretty simple.

I can do it if it can wait.

 
 --
 balbi

BR,
Yousaf
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

2015-04-28 Thread Felipe Balbi
On Tue, Apr 28, 2015 at 08:47:08PM +, Kaukab, Yousaf wrote:
  -Original Message-
  From: Felipe Balbi [mailto:ba...@ti.com]
  Sent: Monday, April 27, 2015 10:43 PM
  To: Kaukab, Yousaf
  Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
  Herrero, Gregory; r.bald...@samsung.com;
  dingu...@opensource.altera.com; zhangfei@linaro.org;
  jwer...@chromium.org; sergei.shtyl...@cogentembedded.com
  Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy
  
  On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
   If phy driver is present register hcd handle to it.
  
   Signed-off-by: Mian Yousaf Kaukab yousaf.kau...@intel.com
   ---
drivers/usb/dwc2/hcd.c | 6 ++
1 file changed, 6 insertions(+)
  
   diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
   1cca5e0..919658e 100644
   --- a/drivers/usb/dwc2/hcd.c
   +++ b/drivers/usb/dwc2/hcd.c
   @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int
  irq)
 /* Don't support SG list at this point */
 hcd-self.sg_tablesize = 0;
  
   + if (!IS_ERR_OR_NULL(hsotg-uphy))
  
  when is uphy NULL ? Aparently, only platform.c sets it to NULL in case of 
  error,
  I'd say we should just make NULL a valid PHY pointer, then we can remove a
  bunch of these checks scattered around.
 
 Here we can't as we want to dereference uphy.
 However, I like the idea and I guess it entails a separate patch to
 fix where possible?

yeah, I'll handle that, unless you want to. It should be pretty simple.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

2015-04-27 Thread Felipe Balbi
On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
 If phy driver is present register hcd handle to it.
 
 Signed-off-by: Mian Yousaf Kaukab yousaf.kau...@intel.com
 ---
  drivers/usb/dwc2/hcd.c | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
 index 1cca5e0..919658e 100644
 --- a/drivers/usb/dwc2/hcd.c
 +++ b/drivers/usb/dwc2/hcd.c
 @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq)
   /* Don't support SG list at this point */
   hcd-self.sg_tablesize = 0;
  
 + if (!IS_ERR_OR_NULL(hsotg-uphy))

when is uphy NULL ? Aparently, only platform.c sets it to NULL in case
of error, I'd say we should just make NULL a valid PHY pointer, then we
can remove a bunch of these checks scattered around.

-- 
balbi


signature.asc
Description: Digital signature