Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754892Ab3JXK7o (ORCPT ); Thu, 24 Oct 2013 06:59:44 -0400 Received: from mx0.aculab.com ([213.249.233.131]:55291 "HELO mx0.aculab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754517Ab3JXK7m convert rfc822-to-8bit (ORCPT ); Thu, 24 Oct 2013 06:59:42 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers Date: Thu, 24 Oct 2013 11:57:40 +0100 Message-ID: In-Reply-To: <20131024105158.GB13159@mtj.dyndns.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers Thread-Index: Ac7Qpuc7p4ZIsSedQKKTDd44tzsxVAAAFfQg References: <6bc575621ef70f72b206e4aa944acd32f1a75718.1382103786.git.agordeev@redhat.com> <20131024105158.GB13159@mtj.dyndns.org> From: "David Laight" To: "Tejun Heo" , "Alexander Gordeev" Cc: , "Bjorn Helgaas" , "Michael Ellerman" , "Benjamin Herrenschmidt" , "Ben Hutchings" , "Mark Lord" , "H. Peter Anvin" , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 28 > > ...would turn into a single helper call.... > > > > rc = pcim_enable_msix_range(adapter->pdev, > > adapter->msix_entries, > > nvec, > > FOO_DRIVER_MINIMUM_NVEC); > > I haven't looked into any details but, if the above works for most use > cases, it looks really good to me. The one case it doesn't work is where the driver either wants the full number or the minimum number - but not a value in between. Might be worth adding an extra parameter so that this (and maybe other) odd requirements can be met. Some static inline functions could be used for the common cases. David -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/