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

Revise log format for consistency #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charliechiou
Copy link
Contributor

Add 'end' to the log message in ai_one_work_func to match the format used in ai_two_work_func. This improves clarity and consistency in logs.

main.c Outdated
@@ -222,7 +222,7 @@ static void ai_one_work_func(struct work_struct *w)
tv_end = ktime_get();

nsecs = (s64) ktime_to_ns(ktime_sub(tv_end, tv_start));
pr_info("kxo: [CPU#%d] doing %s for %llu usec\n", cpu, __func__,
pr_info("kxo: [CPU#%d] end doing %s for %llu usec\n", cpu, __func__,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am hesitant to adopt the use of "end doing," which sounds a bit strange. Can you provide alternatives?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m considering:
pr_info("kxo: [CPU#%d] %s completed in %llu usec\n", ...)
pr_info("kxo: [CPU#%d] completed %s after %llu usec\n", ...)
Do you have a preference between the two in terms of clarity?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The former looks fine.

Update the pr_info log message in ai_one_work_func and
ai_two_work_func to improve the clarity and ensure consistent logging
format across functions.

Co-authored-by: Cheng-Yang Chou <[email protected]>
@charliechiou charliechiou changed the title Add 'end' to pr_info for consistency Revise log format for consistency Mar 30, 2025
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.

2 participants