[coreboot] [patch][msrtool] Add K8 MSRs

Peter Stuge peter at stuge.se
Fri Mar 6 22:15:03 CET 2009

Stefan Reinauer wrote:
> >>> -const uint32_t msraddrbyname(const char *name) {
> >
> > That was to get it to compile with -Werror which is on by
> > default. It didn't look like that really needed to be a const.
> Does the const make sense at all? It seems odd to define the
> variable integer return value of a function const. What's that
> supposed to be good for?

The value returned in the function is const. Is it OK to still have
the function return non-const?


struct msrdef {
        const uint32_t addr;


if (addr == m->addr)
        return m->addr;
if (!strcasecmp(name, m->symbol))
        return m->addr;

If I just made a too conservative assumption about types, I am all

Acked-by: Peter Stuge <peter at stuge.se>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090306/b19d5f38/attachment.sig>

More information about the coreboot mailing list