Skip to contentSkip to conversation

gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

PATCH RESEND In review William Breathitt Gray 2 participants 6 messages Mar 2, 2023 – Jul 11, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>
---
 drivers/gpio/gpio-ws16c48.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-ws16c48.c +1 -1
index e73885a4dc32..afb42a8e916f 100644
@@ -18,7 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/types.h>
 
-#define WS16C48_EXTENT 10
+#define WS16C48_EXTENT 11
 #define MAX_NUM_WS16C48 max_num_isa_dev(WS16C48_EXTENT)
 
 static unsigned int base[MAX_NUM_WS16C48];

base-commit: 4827aae061337251bb91801b316157a78b845ec7

Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · William Breathitt Gray

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Quoted 5 lines
Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>

---

Why did you need to resend this? Anything changed?

Bart

#2 lore raw
Quoted 15 lines · Bartosz Golaszewski
Quoted 7 lines · William Breathitt Gray

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Quoted 5 lines
Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>

---

Quoted 3 lines

Why did you need to resend this? Anything changed?

Bart

No changes in code, just added the [email protected] Cc tag.

William Breathitt Gray

#3 lore raw
Quoted 16 lines · William Breathitt Gray
Quoted 15 lines · Bartosz Golaszewski
Quoted 12 lines · William Breathitt Gray

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>

---

Quoted 7 lines
Quoted 3 lines

Why did you need to resend this? Anything changed?

Bart

No changes in code, just added the [email protected] Cc tag.

William Breathitt Gray

Hi Bart,

Would you take this fix through the gpio tree?

William Breathitt Gray

#4 lore raw
Quoted 23 lines · William Breathitt Gray
Quoted 22 lines · William Breathitt Gray
Quoted 15 lines · Bartosz Golaszewski
Quoted 7 lines · William Breathitt Gray

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Quoted 5 lines
Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>

---

Quoted 3 lines

Why did you need to resend this? Anything changed?

Bart

No changes in code, just added the [email protected] Cc tag.

Quoted 7 lines
Quoted 1 line

William Breathitt Gray

Hi Bart,

Would you take this fix through the gpio tree?

William Breathitt Gray

It looks like this patch was missed. Is there anything further needed or can it be queued as it is now?

William Breathitt Gray

#5 lore raw
Quoted 28 lines · William Breathitt Gray
Quoted 27 lines · William Breathitt Gray
Quoted 16 lines · William Breathitt Gray
Quoted 15 lines · Bartosz Golaszewski
Quoted 12 lines · William Breathitt Gray

The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA, which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the correct value of 11 so that access to necessary device registers is properly requested in the ws16c48_probe() callback by the devm_request_region() function call.

Fixes 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
Cc Paul Demetrotion <[email protected]>

---

Quoted 7 lines
Quoted 3 lines

Why did you need to resend this? Anything changed?

Bart

No changes in code, just added the [email protected] Cc tag.

William Breathitt Gray

Hi Bart,

Quoted 8 lines
Quoted 3 lines

Would you take this fix through the gpio tree?

William Breathitt Gray

It looks like this patch was missed. Is there anything further needed or can it be queued as it is now?

William Breathitt Gray

The fix was missed again this past cycle. Are there any particular issues with merging this patch that I should address? WS16C48 interrupt handling is still broken so that's the motivation for getting this fix into the GPIO tree.

William Breathitt Gray