From: Martin Mares <mj@ucw.cz> To: "Michael S. Tsirkin" <mst@redhat.com> Cc: Bjorn Helgaas <bhelgaas@google.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Jonathan Corbet <corbet@lwn.net>, "David S. Miller" <davem@davemloft.net>, Hans Verkuil <hans.verkuil@cisco.com>, Mauro Carvalho Chehab <mchehab@osg.samsung.com>, Alexei Starovoitov <ast@plumgrid.com>, stephen hemminger <stephen@networkplumber.org>, Masahiro Yamada <yamada.m@jp.panasonic.com>, "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, "linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>, linux-api@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org> Subject: Re: [PATCH v2] pci: export class IDs from pci_ids.h Date: Tue, 7 Apr 2015 14:57:19 +0200 [thread overview] Message-ID: <mj+md-20150407.125023.43354.nikam@ucw.cz> (raw) In-Reply-To: <20150405132041-mutt-send-email-mst@redhat.com> 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 <linux/pci_ids.h>, > 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 <linux/pci_ids.h> 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 <linux/pci_ids.h> are not likely to be used anywhere in the kernel. Martin
WARNING: multiple messages have this Message-ID (diff)
From: Martin Mares <mj-+ZI9xUNit7I@public.gmane.org> To: "Michael S. Tsirkin" <mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>, "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>, Hans Verkuil <hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>, Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>, Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>, stephen hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>, Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org>, "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg KH <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org> Subject: Re: [PATCH v2] pci: export class IDs from pci_ids.h Date: Tue, 7 Apr 2015 14:57:19 +0200 [thread overview] Message-ID: <mj+md-20150407.125023.43354.nikam@ucw.cz> (raw) In-Reply-To: <20150405132041-mutt-send-email-mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> 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 <linux/pci_ids.h>, > 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 <linux/pci_ids.h> 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 <linux/pci_ids.h> are not likely to be used anywhere in the kernel. Martin
next prev parent reply other threads:[~2015-04-07 13:04 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-30 11:33 [PATCH v2] pci: export class IDs from pci_ids.h Michael S. Tsirkin 2015-04-02 20:53 ` Bjorn Helgaas 2015-04-02 21:28 ` Michael S. Tsirkin 2015-04-02 21:59 ` Greg KH 2015-04-05 11:20 ` Michael S. Tsirkin 2015-04-02 22:32 ` Bjorn Helgaas 2015-04-05 12:05 ` Michael S. Tsirkin 2015-04-05 12:05 ` Michael S. Tsirkin 2015-04-07 12:57 ` Martin Mares [this message] 2015-04-07 12:57 ` Martin Mares
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=mj+md-20150407.125023.43354.nikam@ucw.cz \ --to=mj@ucw.cz \ --cc=ast@plumgrid.com \ --cc=bhelgaas@google.com \ --cc=corbet@lwn.net \ --cc=davem@davemloft.net \ --cc=gregkh@linuxfoundation.org \ --cc=hans.verkuil@cisco.com \ --cc=linux-api@vger.kernel.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=mchehab@osg.samsung.com \ --cc=mst@redhat.com \ --cc=stephen@networkplumber.org \ --cc=yamada.m@jp.panasonic.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.