From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [-mm patch] aic7xxx: check irq validity (was Re: 2.6.18-mm2) Date: Sun, 01 Oct 2006 15:42:49 -0400 Message-ID: <45201A39.6020500@garzik.org> References: <20060928014623.ccc9b885.akpm@osdl.org> <20060929155738.7076f0c8@werewolf> <20060929143949.GL5017@parisc-linux.org> <1159550143.13029.36.camel@localhost.localdomain> <20060929235054.GB2020@slug> <1159573404.13029.96.camel@localhost.localdomain> <20060930140946.GA1195@slug> <451F049A.1010404@garzik.org> <20061001142807.GD16272@parisc-linux.org> <1159729523.2891.408.camel@laptopd505.fenrus.org> <20061001193616.GF16272@parisc-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from srv5.dvmed.net ([207.36.208.214]:18067 "EHLO mail.dvmed.net") by vger.kernel.org with ESMTP id S932252AbWJATnE (ORCPT ); Sun, 1 Oct 2006 15:43:04 -0400 In-Reply-To: <20061001193616.GF16272@parisc-linux.org> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Matthew Wilcox Cc: Arjan van de Ven , linux-scsi@vger.kernel.org, "Linux-Kernel," , "J.A. Magall??n" , Alan Cox , Andrew Morton , Frederik Deweerdt Matthew Wilcox wrote: > Others tend to use the driver name. Changing them all to be 0000:00:1d.2 > isn't really an improvement in the readability of /proc/interrupts, IMO. agreed > Passing pdev as the data is a good idea for practically no device driver. agreed > It's rare to actually want the pci_device down in the interrupt handler; > normally you want the device private data. Using pci_get_drvdata(pdev) > as the data would make sense for both sym2 and tg3. I don't feel like Using pci_get_drvdata() is a pretty good idea > int pci_request_irq(struct pci_dev *pdev, irq_handler_t handler, > const char *name) > { > if (!valid_irq(pdev->irq)) { > dev_printk(KERN_ERR, &pdev->dev, "invalid irq\n"); > return -EINVAL; > } > > return request_irq(pdev->irq, handler, IRQF_SHARED, name, > pci_get_drvdata(pdev)); > } > > But what about IRQF_SAMPLE_RANDOM? I still like having a flags argument though. It's enough of an open question, and I bet there will be a new flag or two in the future that PCI drivers will want to use. Jeff