2023-03-02 22:30:50

by William Breathitt Gray

[permalink] [raw]
Subject: [RESEND] 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: [email protected]
Cc: Paul Demetrotion <[email protected]>
Signed-off-by: William Breathitt Gray <[email protected]>
---
drivers/gpio/gpio-ws16c48.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-ws16c48.c b/drivers/gpio/gpio-ws16c48.c
index e73885a4dc32..afb42a8e916f 100644
--- a/drivers/gpio/gpio-ws16c48.c
+++ b/drivers/gpio/gpio-ws16c48.c
@@ -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
--
2.39.2



2023-03-06 09:23:53

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [RESEND] gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

On Thu, Mar 2, 2023 at 11:30 PM William Breathitt Gray
<[email protected]> wrote:
>
> 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: [email protected]
> Cc: Paul Demetrotion <[email protected]>
> Signed-off-by: William Breathitt Gray <[email protected]>
> ---

Why did you need to resend this? Anything changed?

Bart

2023-03-06 12:41:18

by William Breathitt Gray

[permalink] [raw]
Subject: Re: [RESEND] gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

On Mon, Mar 06, 2023 at 10:23:30AM +0100, Bartosz Golaszewski wrote:
> On Thu, Mar 2, 2023 at 11:30 PM William Breathitt Gray
> <[email protected]> wrote:
> >
> > 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: [email protected]
> > Cc: Paul Demetrotion <[email protected]>
> > Signed-off-by: William Breathitt Gray <[email protected]>
> > ---
>
> Why did you need to resend this? Anything changed?
>
> Bart

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

William Breathitt Gray


Attachments:
(No filename) (897.00 B)
signature.asc (228.00 B)
Download all attachments

2023-04-05 14:49:10

by William Breathitt Gray

[permalink] [raw]
Subject: Re: [RESEND] gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

On Mon, Mar 06, 2023 at 07:41:09AM -0500, William Breathitt Gray wrote:
> On Mon, Mar 06, 2023 at 10:23:30AM +0100, Bartosz Golaszewski wrote:
> > On Thu, Mar 2, 2023 at 11:30 PM William Breathitt Gray
> > <[email protected]> wrote:
> > >
> > > 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: [email protected]
> > > Cc: Paul Demetrotion <[email protected]>
> > > Signed-off-by: William Breathitt Gray <[email protected]>
> > > ---
> >
> > 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


Attachments:
(No filename) (1.10 kB)
signature.asc (235.00 B)
Download all attachments

2023-06-05 13:58:31

by William Breathitt Gray

[permalink] [raw]
Subject: Re: [RESEND] gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

On Wed, Apr 05, 2023 at 10:47:18AM -0400, William Breathitt Gray wrote:
> On Mon, Mar 06, 2023 at 07:41:09AM -0500, William Breathitt Gray wrote:
> > On Mon, Mar 06, 2023 at 10:23:30AM +0100, Bartosz Golaszewski wrote:
> > > On Thu, Mar 2, 2023 at 11:30 PM William Breathitt Gray
> > > <[email protected]> wrote:
> > > >
> > > > 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: [email protected]
> > > > Cc: Paul Demetrotion <[email protected]>
> > > > Signed-off-by: William Breathitt Gray <[email protected]>
> > > > ---
> > >
> > > 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

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

William Breathitt Gray


Attachments:
(No filename) (1.36 kB)
signature.asc (235.00 B)
Download all attachments

2023-07-11 21:11:20

by William Breathitt Gray

[permalink] [raw]
Subject: Re: [RESEND] gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent

On Mon, Jun 05, 2023 at 09:44:38AM -0400, William Breathitt Gray wrote:
> On Wed, Apr 05, 2023 at 10:47:18AM -0400, William Breathitt Gray wrote:
> > On Mon, Mar 06, 2023 at 07:41:09AM -0500, William Breathitt Gray wrote:
> > > On Mon, Mar 06, 2023 at 10:23:30AM +0100, Bartosz Golaszewski wrote:
> > > > On Thu, Mar 2, 2023 at 11:30 PM William Breathitt Gray
> > > > <[email protected]> wrote:
> > > > >
> > > > > 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: [email protected]
> > > > > Cc: Paul Demetrotion <[email protected]>
> > > > > Signed-off-by: William Breathitt Gray <[email protected]>
> > > > > ---
> > > >
> > > > 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
>
> 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


Attachments:
(No filename) (1.76 kB)
signature.asc (235.00 B)
Download all attachments