2003-01-04 11:56:38

by Andrey Panin

[permalink] [raw]
Subject: [RFC] irq handling code consolidation, second try (v850 part)


Hi all,

attached patch is a second try of IRQ handling code consolidation.
This is a v850 specific patch (untested).

Best regards.

--
Andrey Panin | Embedded systems software developer
[email protected] | PGP key: wwwkeys.pgp.net


Attachments:
(No filename) (236.00 B)
patch-irq-v850-2.5.53 (15.42 kB)
Download all attachments

2003-01-04 12:52:21

by Miles Bader

[permalink] [raw]
Subject: Re: [RFC] irq handling code consolidation, second try (v850 part)

Can't test it, but the v850 part looks great, ah, it's lovely to see all
that code being deleted...

One comment: `arch_check_irq' is a bad name, it doesn't make it at all
clear what it does.

I might suggest inverting the sense, and using `irq_valid' -- the `arch_'
prefix seems unnecessary (as with `irq_desc') since it's not a
arch-specific version of a more general wrapper.

Thanks,

-Miles

--
Quidquid latine dictum sit, altum viditur.

2003-01-04 12:59:58

by Andrey Panin

[permalink] [raw]
Subject: Re: [RFC] irq handling code consolidation, second try (v850 part)

On Sat, Jan 04, 2003 at 10:00:29PM +0900, Miles Bader wrote:
> Can't test it, but the v850 part looks great, ah, it's lovely to see all
> that code being deleted...
>
> One comment: `arch_check_irq' is a bad name, it doesn't make it at all
> clear what it does.
>
> I might suggest inverting the sense, and using `irq_valid' -- the `arch_'
> prefix seems unnecessary (as with `irq_desc') since it's not a
> arch-specific version of a more general wrapper.

I used arch_ prefix to clearly mark arch specifig things, but
irq_valid() is probably a better name. Comments ?

--
Andrey Panin | Embedded systems software developer
[email protected] | PGP key: wwwkeys.pgp.net

2003-01-04 13:48:33

by Miles Bader

[permalink] [raw]
Subject: Re: [RFC] irq handling code consolidation, second try (v850 part)

On Sat, Jan 04, 2003 at 04:03:52PM +0300, Andrey Panin wrote:
> I used arch_ prefix to clearly mark arch specifig things, but
> irq_valid() is probably a better name. Comments ?

You should only `mark arch specific things' when there's a reason --
after all, there are _lots_ of arch-specific definitions in linux, but very
rarely is it important to note that fact; the caller usually doesn't care.

[consider that it might be desirable at some point in the future to have a
arch-independent version of `irq_valid'; the callers shouldn't have to be
changed to accomodate such a change]

In the case of something like `arch_setup_irq', there _is_ a reason: it's a
small arch-specific `core' for the real generic setup_irq (and one which will
probably be used _only_ by setup_irq).

-Miles
--
Ich bin ein Virus. Mach' mit und kopiere mich in Deine .signature.