lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aa79d98a0812260137l73de751fuffaac6dff3c3a22a@mail.gmail.com>
Date:	Fri, 26 Dec 2008 12:37:53 +0300
From:	"Cyrill Gorcunov" <gorcunov@...il.com>
To:	"KOSAKI Motohiro" <kosaki.motohiro@...fujitsu.com>
Cc:	"Ingo Molnar" <mingo@...e.hu>, "Yinghai Lu" <yinghai@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH for -tip] irq: for_each_irq_desc() makes simplify

On Fri, Dec 26, 2008 at 4:22 AM, KOSAKI Motohiro
<kosaki.motohiro@...fujitsu.com> wrote:
>> [KOSAKI Motohiro - Thu, Dec 25, 2008 at 11:43:45PM +0900]
>> | > | "if (!desc) " mean this irqno don't have irq description.
>> | > | so I think this name imply mean skipping no irq desctiption element.
>> | > |
>> | > | Actually, on CONFIG_SPARSEIRQ, desc is filled in dynamically after booting.
>> | > | then "defined" is a bit misleading word.
>> | > |
>> | >
>> | > So if I would need to iterate over all descriptors including empty
>> | > I need to type all this long for(;;) form again?
>> |
>> | We already have for_each_irq_nr() for this purpose ;-)
>>
>> Which is not shorter form of desc iterator in turn :-)
>>
>> Since the original for_each_irq_desc didn't check for NULL
>> desc's I think the better would to name it like for_each_irq_desc_safe
>> or for_each_irq_desc_inuse then.
>
> but before CONFIG_SPARSEIRQ feature age, for_each_irq_desc() guaranteed
> to return !NULL value.
> recently CONFIG_SPARSEIRQ break this assumption. I hope to restore it.

indeed

>
> In addition, if we make both for_each_irq_desc() and for_each_irq_desc().
> for_each_irq_desc() become unused macro.
> from cleanup view, unused function/macro is not preferred.
>

yeah!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ