2022-03-10 19:33:30

by Amit Kumar Mahapatra

[permalink] [raw]
Subject: [PATCH 2/2] spi: spi-cadence: Fix kernel-doc format for resume/suspend

From: Michal Simek <[email protected]>

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 <[email protected]>
Signed-off-by: Amit Kumar Mahapatra <[email protected]>
---
drivers/spi/spi-cadence.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

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


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

Hello Mark,

> -----Original Message-----
> From: Mark Brown <[email protected]>
> Sent: Friday, March 11, 2022 12:17 AM
> To: Amit Kumar Kumar Mahapatra <[email protected]>
> Cc: [email protected]; [email protected]; git
> <[email protected]>; Amit Kumar Kumar Mahapatra <[email protected]>;
> Michal Simek <[email protected]>
> 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 <[email protected]>
> >
> > 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

2022-03-11 22:17:55

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 2/2] spi: spi-cadence: Fix kernel-doc format for resume/suspend

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.


Attachments:
(No filename) (461.00 B)
signature.asc (499.00 B)
Download all attachments

2022-03-11 23:27:37

by Mark Brown

[permalink] [raw]
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 <[email protected]>
>
> 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.


Attachments:
(No filename) (640.00 B)
signature.asc (495.00 B)
Download all attachments