* [PATCH v1 1/1] zorro: Use helpers from ioport.h
@ 2023-08-31 12:16 Andy Shevchenko
2023-09-04 9:31 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2023-08-31 12:16 UTC (permalink / raw)
To: Andy Shevchenko, linux-m68k, linux-kernel; +Cc: Geert Uytterhoeven
We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains() helper
instead of reimplementing them in the code. No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/zorro/zorro.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index 1b9928648583..7d29586c7db5 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
int i;
for (i = 0; i < bridge->num_resources; i++) {
- struct resource *r = &bridge->resource[i];
-
- if (zorro_resource_start(z) >= r->start &&
- zorro_resource_end(z) <= r->end)
- return r;
+ if (resource_contains(&bridge->resource[i], &z->resource)
+ return &bridge->resource[i];
}
+
return &iomem_resource;
}
-
-
static int __init amiga_zorro_probe(struct platform_device *pdev)
{
struct zorro_bus *bus;
@@ -176,9 +172,7 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
z->slotsize = zi->slotsize;
sprintf(z->name, "Zorro device %08x", z->id);
zorro_name_device(z);
- z->resource.start = zi->boardaddr;
- z->resource.end = zi->boardaddr + zi->boardsize - 1;
- z->resource.name = z->name;
+ z->resource = DEFINE_RES_MEM_NAMED(zi->boardaddr, zi->boardsize, z->name);
r = zorro_find_parent_resource(pdev, z);
error = request_resource(r, &z->resource);
if (error && !(z->rom.er_Type & ERTF_MEMLIST))
--
2.40.0.1.gaa8946217a0b
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] zorro: Use helpers from ioport.h
2023-08-31 12:16 [PATCH v1 1/1] zorro: Use helpers from ioport.h Andy Shevchenko
@ 2023-09-04 9:31 ` Geert Uytterhoeven
2023-09-04 9:54 ` Andy Shevchenko
2024-04-26 15:32 ` Andy Shevchenko
0 siblings, 2 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2023-09-04 9:31 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-m68k, linux-kernel
Hi Andy,
On Thu, Aug 31, 2023 at 2:16 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains() helper
> instead of reimplementing them in the code. No functional change intended.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks for your patch!
> --- a/drivers/zorro/zorro.c
> +++ b/drivers/zorro/zorro.c
> @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
> int i;
>
> for (i = 0; i < bridge->num_resources; i++) {
> - struct resource *r = &bridge->resource[i];
> -
> - if (zorro_resource_start(z) >= r->start &&
> - zorro_resource_end(z) <= r->end)
> - return r;
> + if (resource_contains(&bridge->resource[i], &z->resource)
Missing closing parenthesis. What happened to your cross-compiler?
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k for-v6.7 branch, with the above fixed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] zorro: Use helpers from ioport.h
2023-09-04 9:31 ` Geert Uytterhoeven
@ 2023-09-04 9:54 ` Andy Shevchenko
2024-04-26 15:32 ` Andy Shevchenko
1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2023-09-04 9:54 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On Mon, Sep 04, 2023 at 11:31:03AM +0200, Geert Uytterhoeven wrote:
> Hi Andy,
>
> On Thu, Aug 31, 2023 at 2:16 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains() helper
> > instead of reimplementing them in the code. No functional change intended.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks for your patch!
>
> > --- a/drivers/zorro/zorro.c
> > +++ b/drivers/zorro/zorro.c
> > @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
> > int i;
> >
> > for (i = 0; i < bridge->num_resources; i++) {
> > - struct resource *r = &bridge->resource[i];
> > -
> > - if (zorro_resource_start(z) >= r->start &&
> > - zorro_resource_end(z) <= r->end)
> > - return r;
> > + if (resource_contains(&bridge->resource[i], &z->resource)
>
> Missing closing parenthesis. What happened to your cross-compiler?
>
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> i.e. will queue in the m68k for-v6.7 branch, with the above fixed.
I have usually three problems with it:
1) wrong branch to test;
2) no proper config is enabled;
3) other things due to my stupidity.
Choose one for this on your taste :-)
AFAIU you fixed that locally and applied (or going to). Thank you!
Otherwise tell me if I need to resend.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] zorro: Use helpers from ioport.h
2023-09-04 9:31 ` Geert Uytterhoeven
2023-09-04 9:54 ` Andy Shevchenko
@ 2024-04-26 15:32 ` Andy Shevchenko
2024-04-26 15:42 ` Geert Uytterhoeven
1 sibling, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2024-04-26 15:32 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On Mon, Sep 04, 2023 at 11:31:03AM +0200, Geert Uytterhoeven wrote:
> On Thu, Aug 31, 2023 at 2:16 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains() helper
> > instead of reimplementing them in the code. No functional change intended.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Thanks for your patch!
>
> > --- a/drivers/zorro/zorro.c
> > +++ b/drivers/zorro/zorro.c
> > @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
> > int i;
> >
> > for (i = 0; i < bridge->num_resources; i++) {
> > - struct resource *r = &bridge->resource[i];
> > -
> > - if (zorro_resource_start(z) >= r->start &&
> > - zorro_resource_end(z) <= r->end)
> > - return r;
> > + if (resource_contains(&bridge->resource[i], &z->resource)
>
> Missing closing parenthesis. What happened to your cross-compiler?
>
> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> i.e. will queue in the m68k for-v6.7 branch, with the above fixed.
Seems never got queued, should I send a v2 with the above fixed?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] zorro: Use helpers from ioport.h
2024-04-26 15:32 ` Andy Shevchenko
@ 2024-04-26 15:42 ` Geert Uytterhoeven
2024-04-26 15:49 ` Andy Shevchenko
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-04-26 15:42 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-m68k, linux-kernel
Hi Andy,
On Fri, Apr 26, 2024 at 5:33 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Mon, Sep 04, 2023 at 11:31:03AM +0200, Geert Uytterhoeven wrote:
> > On Thu, Aug 31, 2023 at 2:16 PM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > We can use the DEFINE_RES_MEM_NAMED() macro and resource_contains() helper
> > > instead of reimplementing them in the code. No functional change intended.
> > >
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/zorro/zorro.c
> > > +++ b/drivers/zorro/zorro.c
> > > @@ -117,17 +117,13 @@ static struct resource __init *zorro_find_parent_resource(
> > > int i;
> > >
> > > for (i = 0; i < bridge->num_resources; i++) {
> > > - struct resource *r = &bridge->resource[i];
> > > -
> > > - if (zorro_resource_start(z) >= r->start &&
> > > - zorro_resource_end(z) <= r->end)
> > > - return r;
> > > + if (resource_contains(&bridge->resource[i], &z->resource)
> >
> > Missing closing parenthesis. What happened to your cross-compiler?
> >
> > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > i.e. will queue in the m68k for-v6.7 branch, with the above fixed.
>
> Seems never got queued, should I send a v2 with the above fixed?
Oops, will queue in the m68k tree for v6.10.
No need to resend, I still have a fixed copy in my local tree.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1 1/1] zorro: Use helpers from ioport.h
2024-04-26 15:42 ` Geert Uytterhoeven
@ 2024-04-26 15:49 ` Andy Shevchenko
0 siblings, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2024-04-26 15:49 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On Fri, Apr 26, 2024 at 05:42:21PM +0200, Geert Uytterhoeven wrote:
> On Fri, Apr 26, 2024 at 5:33 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, Sep 04, 2023 at 11:31:03AM +0200, Geert Uytterhoeven wrote:
> > > On Thu, Aug 31, 2023 at 2:16 PM Andy Shevchenko
> > > <andriy.shevchenko@linux.intel.com> wrote:
...
> > > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > > i.e. will queue in the m68k for-v6.7 branch, with the above fixed.
> >
> > Seems never got queued, should I send a v2 with the above fixed?
>
> Oops, will queue in the m68k tree for v6.10.
> No need to resend, I still have a fixed copy in my local tree.
Thank you!
It's far from (my personal experience) the record of the time
from publishing in the mailing list and getting it in upstream,
so we are all fine :-)
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-26 15:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 12:16 [PATCH v1 1/1] zorro: Use helpers from ioport.h Andy Shevchenko
2023-09-04 9:31 ` Geert Uytterhoeven
2023-09-04 9:54 ` Andy Shevchenko
2024-04-26 15:32 ` Andy Shevchenko
2024-04-26 15:42 ` Geert Uytterhoeven
2024-04-26 15:49 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox