[PATCH] staging: pi433: fix wrong comment

Sidong Yang posted 1 patch 3 years, 8 months ago
drivers/staging/pi433/rf69.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: pi433: fix wrong comment
Posted by Sidong Yang 3 years, 8 months ago
The comment should describe the error when user calls rf69_write_fifo()
not rf69_write_fifo().

Signed-off-by: Sidong Yang <realwakka@gmail.com>
---
 drivers/staging/pi433/rf69.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 659c8c1b38fd..8c7fab6a46bb 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -816,7 +816,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 
 	if (size > FIFO_SIZE) {
 		dev_dbg(&spi->dev,
-			"read fifo: passed in buffer bigger then internal buffer\n");
+			"write fifo: passed in buffer bigger then internal buffer\n");
 		return -EMSGSIZE;
 	}
 
-- 
2.30.2
Re: [PATCH] staging: pi433: fix wrong comment
Posted by Greg Kroah-Hartman 3 years, 8 months ago
On Fri, Jul 29, 2022 at 04:25:54PM +0100, Sidong Yang wrote:
> The comment should describe the error when user calls rf69_write_fifo()
> not rf69_write_fifo().
> 
> Signed-off-by: Sidong Yang <realwakka@gmail.com>
> ---
>  drivers/staging/pi433/rf69.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index 659c8c1b38fd..8c7fab6a46bb 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -816,7 +816,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
>  
>  	if (size > FIFO_SIZE) {
>  		dev_dbg(&spi->dev,
> -			"read fifo: passed in buffer bigger then internal buffer\n");
> +			"write fifo: passed in buffer bigger then internal buffer\n");

This is not a comment.