Fix dump() to convert subclass == NULL into something else, or maybe the
fix should be in pci_subclass() itself.

Converting NULL to %s into "(null)" is non-standard and has led to sloppier
code, there have been efforts improve the whole tree enough that we could
one day simply crash on such circumstance instead.  We don't need more
of these, so fix it.  And pass the word around that accepting "(null)" is
the wrong mindset.

Jan Klemkow <j.klem...@wemelug.de> wrote:

> On Fri, Mar 05, 2021 at 04:13:53PM +0100, Mark Kettenis wrote:
> > > Date: Fri, 5 Mar 2021 12:05:38 +0100
> > > From: Jan Klemkow <j.klem...@wemelug.de>
> > > Content-Type: text/plain; charset=us-ascii
> > > Content-Disposition: inline
> > > 
> > > Hi,
> > > 
> > > this diff adds the missing PCI classes Accelerator and Instrumentation.
> > > Thus, we can replace a few unknown in its output:
> > > 
> > > -       0x0008: Class: 13 (unknown), Subclass: 00 (unknown),
> > > +       0x0008: Class: 13 Instrumentation, Subclass: 00 (null),
> > 
> > Is this "(null)" the result of printing a null pointer?  That would be
> > not so good.
> 
> What do you suggest to use instead?  Empty String, or "unknown"?  It is
> vendor specific.
> 
> Thanks,
> Jan
> 

Reply via email to