lkml.org 
[lkml]   [2021]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 3/4] printk: Userspace format indexing support
Chris Down writes:
>Andy Shevchenko writes:
>>>As for the literals, are you saying that you prefer that it's symbolised as
>>>a macro or static char, or do you know of an API where this kind of name can
>>>be canonically accessed?
>>
>>I have heard that modern GCC (at least) can utilize same constant literals in a
>>single compilation unit, so it won't be duplicated.
>>
>>But more serious here is the guarantees of the name. Shouldn't it come from
>>KBuild / Makefile into some header like version do?
>
>I'm not against that, but it seems like something worth doing outside
>of this patch series, unless you have strong feelings to the contrary?
>
>More than happy to put that on my TODO list for tree-wide cleanups.

Now I think about it, we even just call it that in struct module's is_vmlinux,
and set that by doing `strcmp(modname, "vmlinux") == 0`, so it seems pretty
static from a terminology point of view.

It would be nice to just always use `mod->name`, but unfortunately with
!CONFIG_MODULES we don't have `struct module` fleshed out at all in order to do
so.

\
 
 \ /
  Last update: 2021-05-18 19:00    [W:0.091 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site