Repository navigation
uapi: replace sof_man_get_module with SOF_MAN_MODULE_OFFSET - #1405
Conversation
There was a problem hiding this comment.
it's a bit sad to use duplicated code.
What about creating a 3rd directory like uapi/apps/ for stuff like manifest and trace?
There was a problem hiding this comment.
I know it's sad, but you pushed to have it solved atm. I wrote that we need some kind of directory like that, but I guess that's something that you and @lgirdwood has to decide, so unless you figure out how to divide api/headers between apps/fw/kernel I made something like this.
There was a problem hiding this comment.
@lgirdwood any objection to create a 3rd directory, we'd have
ipc
user (can be renamed as kernel if needed)
apps
There was a problem hiding this comment.
or we could make this a macro
#define SOF_MAN_MODULE_OFFSET(index) \
(sizeof(struct sof_man_fw_header) + \
index * sizeof(struct sof_man_module))
The pointer arithe is then done by the user and not in the header.
There was a problem hiding this comment.
@lgirdwood Your workaround is better if we want to just get rid of static inlines from uapi headers, but the real problem is that we want no logic in headers and now the question is if we consider simple addition and multiplication kind of logic?
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
a466a3c to
d268852
Compare
|
@lgirdwood @plbossart |
|
@tlauda @lgirdwood ping |
|
@tlauda @lgirdwood @mmaka1 need 1 more review to merge |
Fix #1377
There should be no logic in uapi headers.
Also there is no good place for headers shared only by rimage and FW,
so it has to be duplicated for now.
Signed-off-by: Janusz Jankowski janusz.jankowski@linux.intel.com