Re: [PATCH] eliminate pci_dev name

Linus Torvalds (torvalds@transmeta.com)
Thu, 14 Nov 2002 10:36:03 -0800 (PST)


On Thu, 14 Nov 2002, Jeff Garzik wrote:
>
> You should increase DEVICE_NAME_SIZE in include/linux/device.h from 80
> to 90, though. I assume you don't want to take the other option, which
> is to audit every use and all the id strings to make sure they're short
> enough. In fact, IIRC, device name increased in size due to some really
> long PCI names, so I think '90' will wind up the preferred value in any
> case.

Actually, I think we should do the reverse (for testing), and make the
name be something small like 8 bytes, and make sure that everybody who
writes the name uses strncpy() and snprintf() instead of just blindly
writing whatever is in the database.

Otherwise we'll always end up having fragile magic constants.

Anybody willing to do that cleanup?

Linus

-
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/