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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081225143128.GA13388@localhost>
Date:	Thu, 25 Dec 2008 17:31:28 +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

[KOSAKI Motohiro - Thu, Dec 25, 2008 at 10:45:20PM +0900]
| > [KOSAKI Motohiro - Thu, Dec 25, 2008 at 09:41:54PM +0900]
| > ...
| > | Is this good idea?
| > | this patch also tested on above three architecture.
| > |
| > |
| > | ===
| > | Subject: [PATCH] irq: for_each_irq_desc() makes simplify
| > | Impact: cleanup
| > |
| > | all for_each_irq_desc() usage point have !desc check.
| > | then its check can move into for_each_irq_desc() macro.
| > |
| > |
| > | Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
| > | CC: Yinghai Lu <yinghai@...nel.org>
| > | CC: Ingo Molnar <mingo@...e.hu>
| > | ---
| > |  arch/x86/kernel/io_apic.c |   10 ----------
| > |  drivers/xen/events.c      |    3 ---
| > |  fs/proc/stat.c            |    3 ---
| > |  include/linux/irqnr.h     |    6 ++++--
| > |  kernel/irq/autoprobe.c    |   15 ---------------
| > |  kernel/irq/handle.c       |    3 ---
| > |  kernel/irq/spurious.c     |    5 -----
| > |  7 files changed, 4 insertions(+), 41 deletions(-)
| > ...
| >
| > Hi Kosaki,
| >
| > the idea is that good indeed but I wonder if it possible
| > to explain that we skip empty 'desk' in for_each_... name
| > itself. Maybe for_each_irq_desc_defined :) Or something
| > more convenient word instead of "defined"?
| 
| "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? For me for_each_irq_desc
implies to iterate over each irq_desc allocated regardles of internal
descriptor data. For example in list_struct we have a special test if
entry is empty or not. So I think hiding details is not that good (and
that is why I was asking for more descriptive macro name). BUT if it
really supposed to behave like that then I don't object :)

		- Cyrill -
--
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