diff mbox series

[v2] usb: dwc3: core: Fix unused variable warning in core driver

Message ID 20240506074939.1833835-1-quic_kriskura@quicinc.com
State Superseded
Headers show
Series [v2] usb: dwc3: core: Fix unused variable warning in core driver | expand

Commit Message

Krishna Kurapati May 6, 2024, 7:49 a.m. UTC
While fixing a merge conflict in linux-next, hw_mode variable
was left unused. Remove the unused variable in hs_phy_setup call.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
---
Changes in v2:
Added reported by and closes tags.

 drivers/usb/dwc3/core.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Thinh Nguyen May 8, 2024, 11:08 p.m. UTC | #1
On Mon, May 06, 2024, Krishna Kurapati wrote:
> While fixing a merge conflict in linux-next, hw_mode variable
> was left unused. Remove the unused variable in hs_phy_setup call.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$ 
> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> ---
> Changes in v2:
> Added reported by and closes tags.
> 
>  drivers/usb/dwc3/core.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 8b6f7769fcd5..7f176ba25354 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
>  
>  static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
>  {
> -	unsigned int hw_mode;
>  	u32 reg;
>  
> -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
> -
>  	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
>  
>  	/* Select the HS PHY interface */
> -- 
> 2.34.1
> 

Looks like my response reporting the merge issue to Stephen fell through
the cracks.

Thanks for the patch.

Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

BR,
Thinh
Greg Kroah-Hartman May 10, 2024, 9:28 a.m. UTC | #2
On Wed, May 08, 2024 at 11:08:43PM +0000, Thinh Nguyen wrote:
> On Mon, May 06, 2024, Krishna Kurapati wrote:
> > While fixing a merge conflict in linux-next, hw_mode variable
> > was left unused. Remove the unused variable in hs_phy_setup call.
> > 
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$ 
> > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> > ---
> > Changes in v2:
> > Added reported by and closes tags.
> > 
> >  drivers/usb/dwc3/core.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > index 8b6f7769fcd5..7f176ba25354 100644
> > --- a/drivers/usb/dwc3/core.c
> > +++ b/drivers/usb/dwc3/core.c
> > @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
> >  
> >  static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
> >  {
> > -	unsigned int hw_mode;
> >  	u32 reg;
> >  
> > -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
> > -
> >  	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
> >  
> >  	/* Select the HS PHY interface */
> > -- 
> > 2.34.1
> > 
> 
> Looks like my response reporting the merge issue to Stephen fell through
> the cracks.
> 
> Thanks for the patch.
> 
> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>

I think I already fixed this up when I did the merge a few hours ago, if
not, please let me know.

thanks,

greg k-h
Krishna Kurapati May 10, 2024, 7:26 p.m. UTC | #3
On 5/10/2024 2:58 PM, Greg Kroah-Hartman wrote:
> On Wed, May 08, 2024 at 11:08:43PM +0000, Thinh Nguyen wrote:
>> On Mon, May 06, 2024, Krishna Kurapati wrote:
>>> While fixing a merge conflict in linux-next, hw_mode variable
>>> was left unused. Remove the unused variable in hs_phy_setup call.
>>>
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$
>>> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
>>> ---
>>> Changes in v2:
>>> Added reported by and closes tags.
>>>
>>>   drivers/usb/dwc3/core.c | 3 ---
>>>   1 file changed, 3 deletions(-)
>>>
>>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>>> index 8b6f7769fcd5..7f176ba25354 100644
>>> --- a/drivers/usb/dwc3/core.c
>>> +++ b/drivers/usb/dwc3/core.c
>>> @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
>>>   
>>>   static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
>>>   {
>>> -	unsigned int hw_mode;
>>>   	u32 reg;
>>>   
>>> -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
>>> -
>>>   	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
>>>   
>>>   	/* Select the HS PHY interface */
>>> -- 
>>> 2.34.1
>>>
>>
>> Looks like my response reporting the merge issue to Stephen fell through
>> the cracks.
>>
>> Thanks for the patch.
>>
>> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> 
> I think I already fixed this up when I did the merge a few hours ago, if
> not, please let me know.
> 

Hi Greg,

  I just checked usb-next and linux-next. The unused variable is still 
there. Can you pick this change up.

Regards,
Krishna,
Thinh Nguyen May 11, 2024, 1:07 a.m. UTC | #4
On Sat, May 11, 2024, Krishna Kurapati PSSNV wrote:
> 
> 
> On 5/10/2024 2:58 PM, Greg Kroah-Hartman wrote:
> > On Wed, May 08, 2024 at 11:08:43PM +0000, Thinh Nguyen wrote:
> > > On Mon, May 06, 2024, Krishna Kurapati wrote:
> > > > While fixing a merge conflict in linux-next, hw_mode variable
> > > > was left unused. Remove the unused variable in hs_phy_setup call.
> > > > 
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$
> > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> > > > ---
> > > > Changes in v2:
> > > > Added reported by and closes tags.
> > > > 
> > > >   drivers/usb/dwc3/core.c | 3 ---
> > > >   1 file changed, 3 deletions(-)
> > > > 
> > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > > > index 8b6f7769fcd5..7f176ba25354 100644
> > > > --- a/drivers/usb/dwc3/core.c
> > > > +++ b/drivers/usb/dwc3/core.c
> > > > @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
> > > >   static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
> > > >   {
> > > > -	unsigned int hw_mode;
> > > >   	u32 reg;
> > > > -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
> > > > -
> > > >   	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
> > > >   	/* Select the HS PHY interface */
> > > > -- 
> > > > 2.34.1
> > > > 
> > > 
> > > Looks like my response reporting the merge issue to Stephen fell through
> > > the cracks.
> > > 
> > > Thanks for the patch.
> > > 
> > > Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> > 
> > I think I already fixed this up when I did the merge a few hours ago, if
> > not, please let me know.
> > 
> 
> Hi Greg,
> 
>  I just checked usb-next and linux-next. The unused variable is still there.
> Can you pick this change up.
> 

Just want to note that this new merge conflict is different than the
previous that the new fix doesn't iterate through GUSB3PIPECTL[n] and
GUSB2PHYCFG[n] base on the number of ports in dwc3_enable_susphy().

I don't think this will affect multi-port configurations. But for
consistency, we can iterate and apply the change for all ports.
I can submit a patch later.

Thanks,
Thinh
Greg Kroah-Hartman May 11, 2024, 7:40 a.m. UTC | #5
On Sat, May 11, 2024 at 01:07:41AM +0000, Thinh Nguyen wrote:
> On Sat, May 11, 2024, Krishna Kurapati PSSNV wrote:
> > 
> > 
> > On 5/10/2024 2:58 PM, Greg Kroah-Hartman wrote:
> > > On Wed, May 08, 2024 at 11:08:43PM +0000, Thinh Nguyen wrote:
> > > > On Mon, May 06, 2024, Krishna Kurapati wrote:
> > > > > While fixing a merge conflict in linux-next, hw_mode variable
> > > > > was left unused. Remove the unused variable in hs_phy_setup call.
> > > > > 
> > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$
> > > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> > > > > ---
> > > > > Changes in v2:
> > > > > Added reported by and closes tags.
> > > > > 
> > > > >   drivers/usb/dwc3/core.c | 3 ---
> > > > >   1 file changed, 3 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > > > > index 8b6f7769fcd5..7f176ba25354 100644
> > > > > --- a/drivers/usb/dwc3/core.c
> > > > > +++ b/drivers/usb/dwc3/core.c
> > > > > @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
> > > > >   static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
> > > > >   {
> > > > > -	unsigned int hw_mode;
> > > > >   	u32 reg;
> > > > > -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
> > > > > -
> > > > >   	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
> > > > >   	/* Select the HS PHY interface */
> > > > > -- 
> > > > > 2.34.1
> > > > > 
> > > > 
> > > > Looks like my response reporting the merge issue to Stephen fell through
> > > > the cracks.
> > > > 
> > > > Thanks for the patch.
> > > > 
> > > > Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> > > 
> > > I think I already fixed this up when I did the merge a few hours ago, if
> > > not, please let me know.
> > > 
> > 
> > Hi Greg,
> > 
> >  I just checked usb-next and linux-next. The unused variable is still there.
> > Can you pick this change up.
> > 
> 
> Just want to note that this new merge conflict is different than the
> previous that the new fix doesn't iterate through GUSB3PIPECTL[n] and
> GUSB2PHYCFG[n] base on the number of ports in dwc3_enable_susphy().
> 
> I don't think this will affect multi-port configurations. But for
> consistency, we can iterate and apply the change for all ports.
> I can submit a patch later.

Please do, thanks!

greg k-h
Greg Kroah-Hartman May 11, 2024, 7:40 a.m. UTC | #6
On Sat, May 11, 2024 at 12:56:29AM +0530, Krishna Kurapati PSSNV wrote:
> 
> 
> On 5/10/2024 2:58 PM, Greg Kroah-Hartman wrote:
> > On Wed, May 08, 2024 at 11:08:43PM +0000, Thinh Nguyen wrote:
> > > On Mon, May 06, 2024, Krishna Kurapati wrote:
> > > > While fixing a merge conflict in linux-next, hw_mode variable
> > > > was left unused. Remove the unused variable in hs_phy_setup call.
> > > > 
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Closes: https://urldefense.com/v3/__https://lore.kernel.org/all/202405030439.AH8NR0Mg-lkp@intel.com/__;!!A4F2R9G_pg!aXN14tvkvwnNZ9N8-EDi-Seef9jgZBKlkZRYasINRgTOU2ijWbTvFIxkZIXOThGQQHmXc0FjiJPFI1cgdCOyAafAxB-70Q$
> > > > Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
> > > > ---
> > > > Changes in v2:
> > > > Added reported by and closes tags.
> > > > 
> > > >   drivers/usb/dwc3/core.c | 3 ---
> > > >   1 file changed, 3 deletions(-)
> > > > 
> > > > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> > > > index 8b6f7769fcd5..7f176ba25354 100644
> > > > --- a/drivers/usb/dwc3/core.c
> > > > +++ b/drivers/usb/dwc3/core.c
> > > > @@ -676,11 +676,8 @@ static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
> > > >   static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
> > > >   {
> > > > -	unsigned int hw_mode;
> > > >   	u32 reg;
> > > > -	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
> > > > -
> > > >   	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
> > > >   	/* Select the HS PHY interface */
> > > > -- 
> > > > 2.34.1
> > > > 
> > > 
> > > Looks like my response reporting the merge issue to Stephen fell through
> > > the cracks.
> > > 
> > > Thanks for the patch.
> > > 
> > > Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> > 
> > I think I already fixed this up when I did the merge a few hours ago, if
> > not, please let me know.
> > 
> 
> Hi Greg,
> 
>  I just checked usb-next and linux-next. The unused variable is still there.
> Can you pick this change up.

Now applied, thanks.

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 8b6f7769fcd5..7f176ba25354 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -676,11 +676,8 @@  static int dwc3_ss_phy_setup(struct dwc3 *dwc, int index)
 
 static int dwc3_hs_phy_setup(struct dwc3 *dwc, int index)
 {
-	unsigned int hw_mode;
 	u32 reg;
 
-	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
-
 	reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(index));
 
 	/* Select the HS PHY interface */