diff mbox series

[2/2] spi: spi-cadence: Fix kernel-doc format for resume/suspend

Message ID 20220310164235.32230-3-amit.kumar-mahapatra@xilinx.com (mailing list archive)
State New, archived
Headers show
Series spi: spi-cadence: Align function names and fix | expand

Commit Message

Amit Kumar Mahapatra March 10, 2022, 4:42 p.m. UTC
From: Michal Simek <michal.simek@xilinx.com>

Kernel function name don't match with function name.

Error log:
drivers/spi/spi-cadence.c:662: warning: expecting prototype for
cdns_spi_runtime_resume(). Prototype was for cnds_runtime_resume() instead
drivers/spi/spi-cadence.c:691: warning: expecting prototype for
cdns_spi_runtime_suspend(). Prototype was for cnds_runtime_suspend()
instead

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@xilinx.com>
---
 drivers/spi/spi-cadence.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown March 10, 2022, 6:46 p.m. UTC | #1
On Thu, Mar 10, 2022 at 10:12:35PM +0530, Amit Kumar Mahapatra wrote:
> From: Michal Simek <michal.simek@xilinx.com>
> 
> Kernel function name don't match with function name.
> 
> Error log:
> drivers/spi/spi-cadence.c:662: warning: expecting prototype for
> cdns_spi_runtime_resume(). Prototype was for cnds_runtime_resume() instead
> drivers/spi/spi-cadence.c:691: warning: expecting prototype for
> cdns_spi_runtime_suspend(). Prototype was for cnds_runtime_suspend()
> instead

These errors are introduced by the prior patch in the series, that patch
should be fixed to just not introduce these errors in the first place.
Amit Kumar Kumar Mahapatra March 11, 2022, 11:32 a.m. UTC | #2
Hello Mark,

> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Friday, March 11, 2022 12:17 AM
> To: Amit Kumar Kumar Mahapatra <akumarma@xilinx.com>
> Cc: linux-spi@vger.kernel.org; linux-kernel@vger.kernel.org; git
> <git@xilinx.com>; Amit Kumar Kumar Mahapatra <akumarma@xilinx.com>;
> Michal Simek <michals@xilinx.com>
> Subject: Re: [PATCH 2/2] spi: spi-cadence: Fix kernel-doc format for
> resume/suspend
> 
> On Thu, Mar 10, 2022 at 10:12:35PM +0530, Amit Kumar Mahapatra wrote:
> > From: Michal Simek <michal.simek@xilinx.com>
> >
> > Kernel function name don't match with function name.
> >
> > Error log:
> > drivers/spi/spi-cadence.c:662: warning: expecting prototype for
> > cdns_spi_runtime_resume(). Prototype was for cnds_runtime_resume()
> > instead
> > drivers/spi/spi-cadence.c:691: warning: expecting prototype for
> > cdns_spi_runtime_suspend(). Prototype was for cnds_runtime_suspend()
> > instead
> 
> These errors are introduced by the prior patch in the series, that patch
> should be fixed to just not introduce these errors in the first place.

https://github.com/torvalds/linux/commit/d36ccd9f7ea41f343391a15677b8a858376e1107
The above patch introduced two issues. as mentioned below
1) Runtime suspend/resume API had "cnds" prefix, unlike all other driver APIs 
that has "cdns" prefix
2) kernel-doc warnings in runtime suspend/resume APIs. 

So, the runtime suspend/resume kernel-doc warnings  were present prior to this 
patch series and were not introduced in the 1/2 patch of this series.

1/2 patch of this series aligns the runtime suspend/resume API prefix with the 
rest of the functions by changing it from "cnds" to "cdns".
2/2 patch of this series fixes the kernel-doc warning in runtime suspend/resume 
APIs. 

Regards,
Amit
Mark Brown March 11, 2022, 11:54 a.m. UTC | #3
On Fri, Mar 11, 2022 at 11:32:57AM +0000, Amit Kumar Kumar Mahapatra wrote:

> 1/2 patch of this series aligns the runtime suspend/resume API prefix with the 
> rest of the functions by changing it from "cnds" to "cdns".
> 2/2 patch of this series fixes the kernel-doc warning in runtime suspend/resume 
> APIs. 

The warning being fixed is that the name of the runtime suspend/resume
functions which were just renamed doesn't match the documentation.
diff mbox series

Patch

diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index aff3f4241840..87bb29ac4d7c 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -650,7 +650,7 @@  static int __maybe_unused cdns_spi_resume(struct device *dev)
 }
 
 /**
- * cdns_spi_runtime_resume - Runtime resume method for the SPI driver
+ * cdns_runtime_resume - Runtime resume method for the SPI driver
  * @dev:	Address of the platform_device structure
  *
  * This function enables the clocks
@@ -679,7 +679,7 @@  static int __maybe_unused cdns_runtime_resume(struct device *dev)
 }
 
 /**
- * cdns_spi_runtime_suspend - Runtime suspend method for the SPI driver
+ * cdns_runtime_suspend - Runtime suspend method for the SPI driver
  * @dev:	Address of the platform_device structure
  *
  * This function disables the clocks