Why not just do a hash function of the message string? Into (say) a 32-bit number. Any duplicate hashes could be treated as a bug and modified.
Should be a fully automatic job to scan the entire source for the printk strings to get the hash values, source file name (and line number if you wish). The catalogue could be used for translations, documentation, etc. And would not in itself create any extra work for kernel maintainers, apart from the occasional change to fix duplicate hashes.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds