Replace printk with pr_* macros for kernel compliance #67
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.
Update all printk() calls to use appropriate pr_* logging macros to comply with modern kernel coding standards and ensure proper log level semantics across the nat46 module.
Changes:
nat46-glue.c: Replace printk with pr_err() for errors and pr_info() for informational messages in instance allocation and release functions
nat46-glue.h: Update assert macro to use pr_emerg() instead of printk for critical assertion failures
nat46-module.c: Replace all printk(KERN_INFO ...) and printk() calls with pr_info() for informational messages and pr_err() for error conditions in module initialization, proc filesystem operations, and device management functions
nat46-netdev.c: Replace printk with pr_err() for error conditions (allocation failures, device operations) and pr_info() for informational messages (device creation, destruction, and debug output)
This ensures consistent logging behavior, improves compatibility with newer kernel versions, and follows kernel development best practices for message severity classification.