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?
msrtool.h:
struct msrdef {
const uint32_t addr;
msrutils.c:
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
for!
Acked-by: Peter Stuge <[email protected]>
pgpE5FdWV8R9Y.pgp
Description: PGP signature
-- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

