staging: pi433: Fix includes, comments & macros.
v2 cover staging: pi433: Fix includes, comments & macros.
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
Signature · 1 line
2.34.1
PATCH v2 1/3 staging: pi433: Use headers in appropriate files.
Ensure rf69.c directly includes rf69_enum.h.
Move rf69_registers.h from header to the relevant source file.
--- 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(-)
drivers/staging/pi433/pi433_if.c +1 -0
@@ -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! */
drivers/staging/pi433/rf69.c +1 -0
@@ -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)
drivers/staging/pi433/rf69.h +0 -1
@@ -9,7 +9,6 @@#define RF69_H #include "rf69_enum.h" -#include "rf69_registers.h" #define FIFO_SIZE 66/* bytes */
Signature · 1 line
2.34.1
PATCH v2 2/3 staging: pi433: Remove an inaccurate comment.
In reply to Shahar AvidarThe comment specified the wrong number represented by the macro.
---
v2: Undo macro change. Remove comment instead.
drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.c +1 -1
@@ -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 */
Signature · 1 line
2.34.1
PATCH v2 3/3 staging: pi433: Make use of spi mode macro instead of magic number.
In reply to Shahar AvidarUse SPI_MODE_0 to setup spi mode.
--- drivers/staging/pi433/pi433_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/pi433/pi433_if.c +1 -1
@@ -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;
Signature · 1 line
2.34.1
Quoted 8 lines · Shahar Avidar
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.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 2 lines · Andy Shevchenko
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.
Signature · 3 lines
Regards, Shahar