Remove message_str to save 1KB memory#89
Open
xiaoxiang781216 wants to merge 3 commits intoj256:masterfrom
Open
Remove message_str to save 1KB memory#89xiaoxiang781216 wants to merge 3 commits intoj256:masterfrom
xiaoxiang781216 wants to merge 3 commits intoj256:masterfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The key idea is supporting %pV format like printk:
https://www.kernel.org/doc/html/latest/core-api/printk-formats.html