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
| ||
|
Date: Sun, 01 Oct 2006 21:05:23 +0200 From: Arjan van de Ven <arjan@...radead.org> To: Matthew Wilcox <matthew@....cx> Cc: linux-scsi@...r.kernel.org, "Linux-Kernel," <linux-kernel@...r.kernel.org>, "J.A. Magall??n" <jamagallon@....com>, Alan Cox <alan@...rguk.ukuu.org.uk>, Andrew Morton <akpm@...l.org>, Frederik Deweerdt <deweerdt@...e.fr>, Jeff Garzik <jeff@...zik.org> Subject: Re: [-mm patch] aic7xxx: check irq validity (was Re: 2.6.18-mm2) > . > > And it doesn't need to be a __must_check. There's no point -- it has > no side-effects. The only reason to call it is if you want the answer > to the question. You had the sense of the return code wrong too; you > want to use it as: > > int pci_request_irq(struct pci_dev *pdev, irq_handler_t handler, > unsigned long flags, const char *name, void *data) > { > if (!valid_irq(pdev->irq)) { > dev_printk(KERN_ERR, &pdev->dev, "invalid irq\n"); > return -EINVAL; > } > > return request_irq(pdev->irq, handler, flags | IRQF_SHARED, name, data); > } well... why not go one step further and eliminate the flags argument entirely? And use pci_name() for the name (so eliminate the argument ;) and always pass pdev as data, so that that argument can go away too.... that'll cover 99% of the request_irq() users for pci devices.. and makes it really nicely simple and consistent. -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com - 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