All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros.
@ 2024-03-27  6:31 Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 1/3] staging: pi433: Use headers in appropriate files Shahar Avidar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Shahar Avidar @ 2024-03-27  6:31 UTC (permalink / raw)
  To: gregkh, elder, andriy.shevchenko, robh, parthiban.veerasooran
  Cc: linux-staging, linux-kernel

This patchset continues with some cleanups:

1. Untangle include hierarchy.
2. Delete a misleading comment.
3. Make use of general macro instead of magic number.

v2->v1:
Undo macro update. Remove its inaccurate comment instead.

Shahar Avidar (3):
  staging: pi433: Use headers in appropriate files.
  staging: pi433: Remove an inaccurate comment.
  staging: pi433: Make use of spi mode macro instead of magic number.

 drivers/staging/pi433/pi433_if.c | 5 +++--
 drivers/staging/pi433/rf69.c     | 1 +
 drivers/staging/pi433/rf69.h     | 1 -
 3 files changed, 4 insertions(+), 3 deletions(-)


base-commit: 26a73b4d30d29f572163f7399e39d56677607b55
-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] staging: pi433: Use headers in appropriate files.
  2024-03-27  6:31 [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Shahar Avidar
@ 2024-03-27  6:31 ` Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 2/3] staging: pi433: Remove an inaccurate comment Shahar Avidar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Shahar Avidar @ 2024-03-27  6:31 UTC (permalink / raw)
  To: gregkh, elder, andriy.shevchenko, robh, parthiban.veerasooran
  Cc: linux-staging, linux-kernel

Ensure rf69.c directly includes rf69_enum.h.
Move rf69_registers.h from header to the relevant source file.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
---
 drivers/staging/pi433/pi433_if.c | 1 +
 drivers/staging/pi433/rf69.c     | 1 +
 drivers/staging/pi433/rf69.h     | 1 -
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 81de98c0245a..0c12b31c4642 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -45,6 +45,7 @@
 
 #include "pi433_if.h"
 #include "rf69.h"
+#include "rf69_registers.h"
 
 #define N_PI433_MINORS		BIT(MINORBITS) /*32*/	/* ... up to 256 */
 #define MAX_MSG_SIZE		900	/* min: FIFO_SIZE! */
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 5a1c362badb6..bf802f097310 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -11,6 +11,7 @@
 #include <linux/units.h>
 
 #include "rf69.h"
+#include "rf69_enum.h"
 #include "rf69_registers.h"
 
 #define F_OSC (32 * HZ_PER_MHZ)
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 76f0f9896a52..dd6fa8af9b9c 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -9,7 +9,6 @@
 #define RF69_H
 
 #include "rf69_enum.h"
-#include "rf69_registers.h"
 
 #define FIFO_SIZE	66		/* bytes */
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] staging: pi433: Remove an inaccurate comment.
  2024-03-27  6:31 [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 1/3] staging: pi433: Use headers in appropriate files Shahar Avidar
@ 2024-03-27  6:31 ` Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 3/3] staging: pi433: Make use of spi mode macro instead of magic number Shahar Avidar
  2024-03-27 13:10 ` [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Andy Shevchenko
  3 siblings, 0 replies; 6+ messages in thread
From: Shahar Avidar @ 2024-03-27  6:31 UTC (permalink / raw)
  To: gregkh, elder, andriy.shevchenko, robh, parthiban.veerasooran
  Cc: linux-staging, linux-kernel

The comment specified the wrong number represented by the macro.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
---
v2: Undo macro change. Remove comment instead.

 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 0c12b31c4642..ec9f07a4f769 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -47,7 +47,7 @@
 #include "rf69.h"
 #include "rf69_registers.h"
 
-#define N_PI433_MINORS		BIT(MINORBITS) /*32*/	/* ... up to 256 */
+#define N_PI433_MINORS		BIT(MINORBITS)
 #define MAX_MSG_SIZE		900	/* min: FIFO_SIZE! */
 #define MSG_FIFO_SIZE		65536   /* 65536 = 2^16  */
 #define FIFO_THRESHOLD	15		/* bytes */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] staging: pi433: Make use of spi mode macro instead of magic number.
  2024-03-27  6:31 [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 1/3] staging: pi433: Use headers in appropriate files Shahar Avidar
  2024-03-27  6:31 ` [PATCH v2 2/3] staging: pi433: Remove an inaccurate comment Shahar Avidar
@ 2024-03-27  6:31 ` Shahar Avidar
  2024-03-27 13:10 ` [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Andy Shevchenko
  3 siblings, 0 replies; 6+ messages in thread
From: Shahar Avidar @ 2024-03-27  6:31 UTC (permalink / raw)
  To: gregkh, elder, andriy.shevchenko, robh, parthiban.veerasooran
  Cc: linux-staging, linux-kernel

Use SPI_MODE_0 to setup spi mode.

Signed-off-by: Shahar Avidar <ikobh7@gmail.com>
---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index ec9f07a4f769..8c513ac62156 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1164,7 +1164,7 @@ static int pi433_probe(struct spi_device *spi)
 	struct dentry		*entry;
 
 	/* setup spi parameters */
-	spi->mode = 0x00;
+	spi->mode = SPI_MODE_0;
 	spi->bits_per_word = 8;
 	/*
 	 * spi->max_speed_hz = 10000000;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros.
  2024-03-27  6:31 [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Shahar Avidar
                   ` (2 preceding siblings ...)
  2024-03-27  6:31 ` [PATCH v2 3/3] staging: pi433: Make use of spi mode macro instead of magic number Shahar Avidar
@ 2024-03-27 13:10 ` Andy Shevchenko
  2024-03-27 19:13   ` Shahar Avidar
  3 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-03-27 13:10 UTC (permalink / raw)
  To: Shahar Avidar
  Cc: gregkh, elder, robh, parthiban.veerasooran, linux-staging, linux-kernel

On Wed, Mar 27, 2024 at 08:31:53AM +0200, Shahar Avidar wrote:
> This patchset continues with some cleanups:
> 
> 1. Untangle include hierarchy.
> 2. Delete a misleading comment.
> 3. Make use of general macro instead of magic number.

> v2->v1:
> Undo macro update. Remove its inaccurate comment instead.

It's your responsibility to carry on the given tags for unchanged patches.
I believe I gave a tag to two out of three patches.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros.
  2024-03-27 13:10 ` [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Andy Shevchenko
@ 2024-03-27 19:13   ` Shahar Avidar
  0 siblings, 0 replies; 6+ messages in thread
From: Shahar Avidar @ 2024-03-27 19:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: gregkh, elder, robh, parthiban.veerasooran, linux-staging, linux-kernel

On 27/03/2024 15:10, Andy Shevchenko wrote:
> It's your responsibility to carry on the given tags for unchanged patches.
> I believe I gave a tag to two out of three patches.

Sure.
Thank you again for your time.
V3 was just sent with the reviewed-by tag.

-- 
Regards,

Shahar


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-03-27 19:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27  6:31 [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Shahar Avidar
2024-03-27  6:31 ` [PATCH v2 1/3] staging: pi433: Use headers in appropriate files Shahar Avidar
2024-03-27  6:31 ` [PATCH v2 2/3] staging: pi433: Remove an inaccurate comment Shahar Avidar
2024-03-27  6:31 ` [PATCH v2 3/3] staging: pi433: Make use of spi mode macro instead of magic number Shahar Avidar
2024-03-27 13:10 ` [PATCH v2 0/3] staging: pi433: Fix includes, comments & macros Andy Shevchenko
2024-03-27 19:13   ` Shahar Avidar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.