Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove message_str to save 1KB memory #89

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xiaoxiang781216
Copy link
Contributor

@xiaoxiang781216 xiaoxiang781216 commented Apr 20, 2021

The key idea is supporting %pV format like printk:
https://www.kernel.org/doc/html/latest/core-api/printk-formats.html

append '\n' automatically if not yet and
then remove '\n' or '\r\n' from caller

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3403fca5dcb7f4c43e5aa38b32081c76077134ba
to more compatible with AMD64 platform:
https://stackoverflow.com/questions/8047362/is-gcc-mishandling-a-pointer-to-a-va-list-passed-to-a-function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id711591dece832bd3941e91ae23e272905b72a8e
so message_str can be removed to save 1KB memory.
Note: the idea come from printk:
https://www.kernel.org/doc/html/latest/core-api/printk-formats.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie8bced627e5269a805ef3798862c0b50fcce6b20
@xiaoxiang781216 xiaoxiang781216 changed the title Rename loc_[v]dprintf to loc_[v]message Remove message_str to save 1KB memory Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant