Skip to contentSkip to conversation

staging: iio: adt7316: remove unused struct 'adt7316_limit_regs'

PATCH Superseded [email protected] 3 participants 5 messages May 28, 2024 – May 29, 2024

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: iio: adt7316: remove unused struct 'adt7316_limit_regs'

From: "Dr. David Alan Gilbert" <[email protected]>

'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver").

The comment above it is a copy-and-paste from a different struct.

Remove both the struct and the comment.

---
 drivers/staging/iio/addac/adt7316.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -8
index 79467f056a05..23d036d2802c 100644
@@ -209,14 +209,6 @@ struct adt7316_chip_info {
 #define ADT7316_TEMP_AIN_INT_MASK	\
 	(ADT7316_TEMP_INT_MASK)
 
-/*
- * struct adt7316_chip_info - chip specific information
- */
-
-struct adt7316_limit_regs {
-	u16	data_high;
-	u16	data_low;
-};
 
 static ssize_t adt7316_show_enabled(struct device *dev,
 				    struct device_attribute *attr,
Signature · 1 line
2.45.1
Reviewed-by Nuno Sa on v1 1/1
#1 lore raw
Quoted 6 lines · On Wed, 2024-05-29 at 00:30 +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver").

Quoted 6 lines

The comment above it is a copy-and-paste from a different struct.

Remove both the struct and the comment.

---

Quoted 23 lines

 drivers/staging/iio/addac/adt7316.c | 8 --------

 1 file changed, 8 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -0
index 79467f056a05..23d036d2802c 100644
@@ -209,14 +209,6 @@ struct adt7316_chip_info {
  #define ADT7316_TEMP_AIN_INT_MASK	\
  	(ADT7316_TEMP_INT_MASK)

drivers/staging/iio/addac/adt7316.c +0 -8
-/*
- * struct adt7316_chip_info - chip specific information
- */
-
-struct adt7316_limit_regs {
-	u16	data_high;
-	u16	data_low;
-};


 static ssize_t adt7316_show_enabled(struct device *dev, struct device_attribute *attr,

#2 lore raw
In reply to [email protected]
Quoted 22 lines · On Wed, May 29, 2024 at 12:30:08AM +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver").

The comment above it is a copy-and-paste from a different struct.

Remove both the struct and the comment.

---
 drivers/staging/iio/addac/adt7316.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -0
index 79467f056a05..23d036d2802c 100644
@@ -209,14 +209,6 @@ struct adt7316_chip_info {
 #define ADT7316_TEMP_AIN_INT_MASK	\
 	(ADT7316_TEMP_INT_MASK)

drivers/staging/iio/addac/adt7316.c struct adt7316_chip_info { · line 212

Quoted 10 lines
drivers/staging/iio/addac/adt7316.c +0 -8
 
-/*
- * struct adt7316_chip_info - chip specific information
- */
-
-struct adt7316_limit_regs {
-	u16	data_high;
-	u16	data_low;
-};
 

Could you delete the blank line as well? Otherwise we have two blank lines in a row and checkpatch will complain.

regards,
dan carpenter

#3 lore raw
Quoted 24 lines · * Dan Carpenter ([email protected]) wrote:
Quoted 23 lines · On Wed, May 29, 2024 at 12:30:08AM +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver").

The comment above it is a copy-and-paste from a different struct.

Remove both the struct and the comment.

---
 drivers/staging/iio/addac/adt7316.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -0
index 79467f056a05..23d036d2802c 100644
@@ -209,14 +209,6 @@ struct adt7316_chip_info {
 #define ADT7316_TEMP_AIN_INT_MASK	\
 	(ADT7316_TEMP_INT_MASK)
 
Quoted 12 lines

drivers/staging/iio/addac/adt7316.c struct adt7316_chip_info { · line 212

Quoted 9 lines
drivers/staging/iio/addac/adt7316.c +0 -8
-/*
- * struct adt7316_chip_info - chip specific information
- */
-
-struct adt7316_limit_regs {
-	u16	data_high;
-	u16	data_low;
-};
 

Could you delete the blank line as well? Otherwise we have two blank lines in a row and checkpatch will complain.

Sure, v2 sent.
(checkpatch didn't moan at me with or without).

Dave

Quoted 5 lines

regards,
dan carpenter

Signature · 4 lines
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#4 lore raw
Quoted 38 lines · Dr. David Alan Gilbert
Quoted 24 lines · * Dan Carpenter ([email protected]) wrote:
Quoted 23 lines · On Wed, May 29, 2024 at 12:30:08AM +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

'adt7316_limit_regs' has never been used since the original commit 35f6b6b86ede ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver").

The comment above it is a copy-and-paste from a different struct.

Remove both the struct and the comment.

---
 drivers/staging/iio/addac/adt7316.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/staging/iio/addac/adt7316.c +0 -0
index 79467f056a05..23d036d2802c 100644
@@ -209,14 +209,6 @@ struct adt7316_chip_info {
 #define ADT7316_TEMP_AIN_INT_MASK	\
 	(ADT7316_TEMP_INT_MASK)
 
Quoted 12 lines

drivers/staging/iio/addac/adt7316.c struct adt7316_chip_info { · line 212

Quoted 9 lines
drivers/staging/iio/addac/adt7316.c +0 -8
-/*
- * struct adt7316_chip_info - chip specific information
- */
-
-struct adt7316_limit_regs {
-	u16	data_high;
-	u16	data_low;
-};
 

Could you delete the blank line as well? Otherwise we have two blank lines in a row and checkpatch will complain.

Quoted 2 lines

Sure, v2 sent.
(checkpatch didn't moan at me with or without).

Thanks. You'd need to apply the patch and re-run checkpatch.pl with the -f option. It's not something that's obvious.

regards,
dan carpenter