Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754906AbbDGNEP (ORCPT ); Tue, 7 Apr 2015 09:04:15 -0400 Received: from nikam.ms.mff.cuni.cz ([195.113.20.16]:44490 "EHLO nikam.ms.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754892AbbDGNEK (ORCPT ); Tue, 7 Apr 2015 09:04:10 -0400 X-Greylist: delayed 409 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Apr 2015 09:04:10 EDT Date: Tue, 7 Apr 2015 14:57:19 +0200 From: Martin Mares To: "Michael S. Tsirkin" Cc: Bjorn Helgaas , "linux-kernel@vger.kernel.org" , Jonathan Corbet , "David S. Miller" , Hans Verkuil , Mauro Carvalho Chehab , Alexei Starovoitov , stephen hemminger , Masahiro Yamada , "linux-pci@vger.kernel.org" , "linux-doc@vger.kernel.org" , linux-api@vger.kernel.org, Greg KH Subject: Re: [PATCH v2] pci: export class IDs from pci_ids.h Message-ID: References: <1427714755-16873-1-git-send-email-mst@redhat.com> <20150402205347.GA10892@google.com> <20150402232804-mutt-send-email-mst@redhat.com> <20150405132041-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150405132041-mutt-send-email-mst@redhat.com> 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: 1551 Lines: 39 Hello! > That's a good idea. Martin, could you please answer the following: > assuming that linux exported linux/pci_ids.h providing class > IDs that are currently in /usr/include/pci/header.h > in a header /usr/include/linux/pci_ids.h, > would libpci be open to replacing part of > /usr/include/pci/header.h with #include , > assuming that a solution for old systems that lack this > header is also provided? Please remember that libpci is cross-platform. Your proposal would make it use on Linux and provide its own definitions on all other systems, which is likely to bring less consistency, not more. I do not see any point in using kernel headers for things, which are unrelated to the kernel. > pciutils does nothing with this value itself, it's possible for a distro > to ship a wrong header, and no one will notice. OTOH Linux will break if > it's wrong. In fact there are 3 values libpci does appear to use > internally: > PCI_CLASS_BRIDGE_HOST > PCI_CLASS_DISPLAY_VGA > PCI_CLASS_BRIDGE_PCI > > I'm guessing others are re-exported for the benefit of > applications using libpci. Exactly. And I expect that it will be quite similar with the kernel -- most classes defined in are not likely to be used anywhere in the kernel. Martin -- 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/