[PATCH 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Matthijs Kooijman
There were already macros for these, they just weren't being used in a
few places.

Signed-off-by: Matthijs Kooijman 
---
 drivers/staging/dwc2/core.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 3177db2..281ca95 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -1696,7 +1696,7 @@ u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg)
GHWCFG2_FS_PHY_TYPE_DEDICATED)
clock = 48;
 
-   if ((hprt0 & HPRT0_SPD_MASK) == 0)
+   if ((hprt0 & HPRT0_SPD_MASK) == HPRT0_SPD_HIGH_SPEED)
/* High speed case */
return 125 * clock;
else
@@ -2298,7 +2298,7 @@ int dwc2_set_param_phy_type(struct dwc2_hsotg *hsotg, int 
val)
 #ifndef NO_FS_PHY_HW_CHECKS
valid = 0;
 #else
-   val = 0;
+   val = DWC2_PHY_TYPE_PARAM_FS;
dev_dbg(hsotg->dev, "Setting phy_type to %d\n", val);
retval = -EINVAL;
 #endif
@@ -2325,7 +2325,7 @@ int dwc2_set_param_phy_type(struct dwc2_hsotg *hsotg, int 
val)
dev_err(hsotg->dev,
"%d invalid for phy_type. Check HW 
configuration.\n",
val);
-   val = 0;
+   val = DWC2_PHY_TYPE_PARAM_FS;
if (hs_phy_type != GHWCFG2_HS_PHY_TYPE_NOT_SUPPORTED) {
if (hs_phy_type == GHWCFG2_HS_PHY_TYPE_UTMI ||
hs_phy_type == GHWCFG2_HS_PHY_TYPE_UTMI_ULPI)
@@ -2360,8 +2360,8 @@ int dwc2_set_param_speed(struct dwc2_hsotg *hsotg, int 
val)
valid = 0;
}
 
-   if (val == 0 && dwc2_get_param_phy_type(hsotg) ==
-   DWC2_PHY_TYPE_PARAM_FS)
+   if (val == DWC2_SPEED_PARAM_HIGH &&
+   dwc2_get_param_phy_type(hsotg) == DWC2_PHY_TYPE_PARAM_FS)
valid = 0;
 
if (!valid) {
@@ -2370,7 +2370,7 @@ int dwc2_set_param_speed(struct dwc2_hsotg *hsotg, int 
val)
"%d invalid for speed parameter. Check HW 
configuration.\n",
val);
val = dwc2_get_param_phy_type(hsotg) == DWC2_PHY_TYPE_PARAM_FS ?
-   1 : 0;
+   DWC2_SPEED_PARAM_FULL : DWC2_SPEED_PARAM_HIGH;
dev_dbg(hsotg->dev, "Setting speed to %d\n", val);
retval = -EINVAL;
}
-- 
1.8.0

--
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


[PATCH 1/7] staging: dwc2: replace some magic numbers by constants

2013-05-13 Thread Paul Zimmerman
From: Matthijs Kooijman 

There were already macros for these, they just weren't being used in a
few places.

Signed-off-by: Matthijs Kooijman 
Acked-by: Paul Zimmerman 
---
 drivers/staging/dwc2/core.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c
index 3177db2..281ca95 100644
--- a/drivers/staging/dwc2/core.c
+++ b/drivers/staging/dwc2/core.c
@@ -1696,7 +1696,7 @@ u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg)
GHWCFG2_FS_PHY_TYPE_DEDICATED)
clock = 48;
 
-   if ((hprt0 & HPRT0_SPD_MASK) == 0)
+   if ((hprt0 & HPRT0_SPD_MASK) == HPRT0_SPD_HIGH_SPEED)
/* High speed case */
return 125 * clock;
else
@@ -2298,7 +2298,7 @@ int dwc2_set_param_phy_type(struct dwc2_hsotg *hsotg, int 
val)
 #ifndef NO_FS_PHY_HW_CHECKS
valid = 0;
 #else
-   val = 0;
+   val = DWC2_PHY_TYPE_PARAM_FS;
dev_dbg(hsotg->dev, "Setting phy_type to %d\n", val);
retval = -EINVAL;
 #endif
@@ -2325,7 +2325,7 @@ int dwc2_set_param_phy_type(struct dwc2_hsotg *hsotg, int 
val)
dev_err(hsotg->dev,
"%d invalid for phy_type. Check HW 
configuration.\n",
val);
-   val = 0;
+   val = DWC2_PHY_TYPE_PARAM_FS;
if (hs_phy_type != GHWCFG2_HS_PHY_TYPE_NOT_SUPPORTED) {
if (hs_phy_type == GHWCFG2_HS_PHY_TYPE_UTMI ||
hs_phy_type == GHWCFG2_HS_PHY_TYPE_UTMI_ULPI)
@@ -2360,8 +2360,8 @@ int dwc2_set_param_speed(struct dwc2_hsotg *hsotg, int 
val)
valid = 0;
}
 
-   if (val == 0 && dwc2_get_param_phy_type(hsotg) ==
-   DWC2_PHY_TYPE_PARAM_FS)
+   if (val == DWC2_SPEED_PARAM_HIGH &&
+   dwc2_get_param_phy_type(hsotg) == DWC2_PHY_TYPE_PARAM_FS)
valid = 0;
 
if (!valid) {
@@ -2370,7 +2370,7 @@ int dwc2_set_param_speed(struct dwc2_hsotg *hsotg, int 
val)
"%d invalid for speed parameter. Check HW 
configuration.\n",
val);
val = dwc2_get_param_phy_type(hsotg) == DWC2_PHY_TYPE_PARAM_FS ?
-   1 : 0;
+   DWC2_SPEED_PARAM_FULL : DWC2_SPEED_PARAM_HIGH;
dev_dbg(hsotg->dev, "Setting speed to %d\n", val);
retval = -EINVAL;
}
-- 
1.8.0
--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Paul Zimmerman
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Monday, April 29, 2013 8:06 AM
> 
> There were already macros for these, they just weren't being used in a
> few places.
> 
> Signed-off-by: Matthijs Kooijman 
> ---
>  drivers/staging/dwc2/core.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)

Acked-by: Paul Zimmerman 

--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Greg KH
On Mon, Apr 29, 2013 at 06:24:18PM +, Paul Zimmerman wrote:
> > From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> > Sent: Monday, April 29, 2013 8:06 AM
> > 
> > There were already macros for these, they just weren't being used in a
> > few places.
> > 
> > Signed-off-by: Matthijs Kooijman 
> > ---
> >  drivers/staging/dwc2/core.c | 12 ++--
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Acked-by: Paul Zimmerman 

So does this mean you are going to resend these to me with your ack?  If
I'm not cc:ed on a patch, I usually will not pick it up...

thanks,

greg k-h
--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Paul Zimmerman
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> 
> On Mon, Apr 29, 2013 at 06:24:18PM +, Paul Zimmerman wrote:
> > > From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> > > Sent: Monday, April 29, 2013 8:06 AM
> > >
> > > There were already macros for these, they just weren't being used in a
> > > few places.
> > >
> > > Signed-off-by: Matthijs Kooijman 
> > > ---
> > >  drivers/staging/dwc2/core.c | 12 ++--
> > >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > Acked-by: Paul Zimmerman 
> 
> So does this mean you are going to resend these to me with your ack?  If
> I'm not cc:ed on a patch, I usually will not pick it up...

Whups, I didn't notice that Matthijs hadn't CC:ed you on these. Can you
pick them up anyway? If not I can resend them. And I'll make sure you're
on CC on all future patches.

-- 
Paul

--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Greg KH
On Mon, Apr 29, 2013 at 06:48:50PM +, Paul Zimmerman wrote:
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, April 29, 2013 11:40 AM
> >
> > On Mon, Apr 29, 2013 at 06:24:18PM +, Paul Zimmerman wrote:
> > > > From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> > > > Sent: Monday, April 29, 2013 8:06 AM
> > > >
> > > > There were already macros for these, they just weren't being used in a
> > > > few places.
> > > >
> > > > Signed-off-by: Matthijs Kooijman 
> > > > ---
> > > >  drivers/staging/dwc2/core.c | 12 ++--
> > > >  1 file changed, 6 insertions(+), 6 deletions(-)
> > >
> > > Acked-by: Paul Zimmerman 
> >
> > So does this mean you are going to resend these to me with your ack?  If
> > I'm not cc:ed on a patch, I usually will not pick it up...
>  
> Whups, I didn't notice that Matthijs hadn't CC:ed you on these. Can you
> pick them up anyway? If not I can resend them. And I'll make sure you're
> on CC on all future patches.

Please resend these, I don't have them in my inbox anymore.

thanks,

greg k-h
--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-29 Thread Paul Zimmerman
> From: Matthijs Kooijman [mailto:matth...@stdin.nl]
> Sent: Monday, April 29, 2013 8:06 AM
> 
> There were already macros for these, they just weren't being used in a
> few places.
> 
> Signed-off-by: Matthijs Kooijman 
> ---
>  drivers/staging/dwc2/core.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)

Acked-by: Paul Zimmerman 

--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-30 Thread Matthijs Kooijman
Hi Greg & Paul,

> Whups, I didn't notice that Matthijs hadn't CC:ed you on these. Can you
> pick them up anyway? If not I can resend them. And I'll make sure you're
> on CC on all future patches.
What's the best way to handle this for future patches? Should I CC Greg
when submitting a patch, or is it better to let Paul add the CC when he
acks the patch (to prevent noise for greg on patches that need further
discussion)?

Gr.

Matthijs
--
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 1/7] staging: dwc2: replace some magic numbers by constants

2013-04-30 Thread Greg KH
On Tue, Apr 30, 2013 at 05:20:14PM +0200, Matthijs Kooijman wrote:
> Hi Greg & Paul,
> 
> > Whups, I didn't notice that Matthijs hadn't CC:ed you on these. Can you
> > pick them up anyway? If not I can resend them. And I'll make sure you're
> > on CC on all future patches.
> What's the best way to handle this for future patches? Should I CC Greg
> when submitting a patch, or is it better to let Paul add the CC when he
> acks the patch (to prevent noise for greg on patches that need further
> discussion)?

I'd prefer to just get the patches from Paul, as he is the maintainer of
the code, so I want to see his ack on them before I can take them.

thanks,

greg k-h
--
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