Skip to contentSkip to conversation

Fix for a bug and a kernel-doc warning in Xilinx DWC3

PATCH New Manish Narani 1 participant 3 messages Apr 8, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Fix for a bug and a kernel-doc warning in Xilinx DWC3

This patch series resolves a kernel-doc warning and a clk freeing bug that was causing a crash.

This patch series is on top of:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/usb/dwc3?id=84770f028fabab4cb66188d583ed12652f30576b

Manish Narani (2):
usb: dwc3: Resolve kernel-doc warning for Xilinx DWC3 driver
usb: dwc3: xilinx: Remove the extra freeing of clocks

 drivers/usb/dwc3/dwc3-xilinx.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.1.1
#1 lore raw

PATCH 1/2 usb: dwc3: Resolve kernel-doc warning for Xilinx DWC3 driver

The kernel-doc run gave a warning for Xilinx DWC3 driver:

drivers/usb/dwc3/dwc3-xilinx.c:27: warning: expecting prototype for dwc3(). Prototype was for XLNX_USB_PHY_RST_EN() instead

Basically it was due to an extra '*' in line:2. This patch fixes the same.

---
 drivers/usb/dwc3/dwc3-xilinx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-xilinx.c +1 -1
index a59e149..f42f4cb 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * dwc3-xilinx.c - Xilinx DWC3 controller specific glue driver
  *
  * Authors: Manish Narani <[email protected]>
Signature · 1 line
2.1.1
#2 lore raw

PATCH 2/2 usb: dwc3: xilinx: Remove the extra freeing of clocks

In reply to Manish Narani

The clocks are configured by devm_clk_bulk_get_all() in this driver. In case of any error the clocks freeing will be handled automatically. There is no need to explicitly free the clocks. Fix the same.

Fixes 84770f028fab ("usb: dwc3: Add driver for Xilinx platforms")
---
 drivers/usb/dwc3/dwc3-xilinx.c | 2 --
 1 file changed, 2 deletions(-)
drivers/usb/dwc3/dwc3-xilinx.c +0 -2
index f42f4cb..9cc3ad7 100644
@@ -271,7 +271,6 @@ static int dwc3_xlnx_probe(struct platform_device *pdev)
 
 err_clk_put:
 	clk_bulk_disable_unprepare(priv_data->num_clocks, priv_data->clks);
-	clk_bulk_put_all(priv_data->num_clocks, priv_data->clks);
 
 	return ret;
 }
@@ -284,7 +283,6 @@ static int dwc3_xlnx_remove(struct platform_device *pdev)
 	of_platform_depopulate(dev);
 
 	clk_bulk_disable_unprepare(priv_data->num_clocks, priv_data->clks);
-	clk_bulk_put_all(priv_data->num_clocks, priv_data->clks);
 	priv_data->num_clocks = 0;
 
 	pm_runtime_disable(dev);
Signature · 1 line
2.1.1