Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265103AbUFWQvG (ORCPT ); Wed, 23 Jun 2004 12:51:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266565AbUFWQvF (ORCPT ); Wed, 23 Jun 2004 12:51:05 -0400 Received: from fmr06.intel.com ([134.134.136.7]:33714 "EHLO caduceus.jf.intel.com") by vger.kernel.org with ESMTP id S265103AbUFWQvB convert rfc822-to-8bit (ORCPT ); Wed, 23 Jun 2004 12:51:01 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH]2.6.7 MSI-X Update Date: Wed, 23 Jun 2004 09:49:29 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH]2.6.7 MSI-X Update Thread-Index: AcRY1Ivdj6tQO9r3QHGlRz6Yu4KObwAbEicA From: "Nguyen, Tom L" To: "Roland Dreier" , "long" Cc: , , , , , , X-OriginalArrivalTime: 23 Jun 2004 16:49:31.0256 (UTC) FILETIME=[0E1AAF80:01C45942] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 47 On Tuesday, June 22, 2004 Roland Dreier wrote: >I think this structure should be defined in a header in include/linux, >probably . We could create a new include >but I don't think it's worth it at this point. Also I don't see any >reason to use bitfields or userspace types like __u32 (since no >userspace code is going to use this include file). I would just >declare the type as > >struct msix_entry { > u16 vector; > u16 entry; >}; > > > +int pci_enable_msix(struct pci_dev *dev, u32 *entries, int nvec) > >Since this function takes an array of struct msix_entry in its entries >parameter, I think entries should be declared as struct msix_entry * >rather than just u32 *. That is, I would write the prototype as > >int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, > int nvec); > Agree. Thanks for your suggestion of defining struct msix_entry in . > > + j = (entries + i)->entry; > > + (entries + i)->vector = vector; > >Finally, this is a nitpick, but this just looks odd to me. Why not >write this as > > j = entries[i].entry; > entries[i].vector = vector; > Agree. Thanks. Thanks, Long - 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/