Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754965Ab3JXLBs (ORCPT ); Thu, 24 Oct 2013 07:01:48 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:37926 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754106Ab3JXLBr (ORCPT ); Thu, 24 Oct 2013 07:01:47 -0400 Date: Thu, 24 Oct 2013 12:01:35 +0100 From: Tejun Heo To: David Laight Cc: Alexander Gordeev , linux-kernel@vger.kernel.org, Bjorn Helgaas , Michael Ellerman , Benjamin Herrenschmidt , Ben Hutchings , Mark Lord , "H. Peter Anvin" , linux-pci@vger.kernel.org Subject: Re: [PATCH RFC v2 12/29] PCI/MSI: Introduce pcim_enable_msi*() family helpers Message-ID: <20131024110135.GD13159@mtj.dyndns.org> References: <6bc575621ef70f72b206e4aa944acd32f1a75718.1382103786.git.agordeev@redhat.com> <20131024105158.GB13159@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1052 Lines: 34 Hello, On Thu, Oct 24, 2013 at 11:57:40AM +0100, David Laight wrote: > > > ...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. If those are edge cases, I don't think it's a big deal no matter what we do. Thanks. -- tejun -- 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/