Use pr_warn and friends. Also, use a full-fledged function to do the real work, if required wrapped by a macro to access __file__ and __line__, but no complicated macro blocks. Logging for high levels should be infrequent enough not to have performance impact, and when running with debug logging one doesn't care about the minor impact of a function call anyway.
Use
pr_warnand friends. Also, use a full-fledged function to do the real work, if required wrapped by a macro to access__file__and__line__, but no complicated macro blocks. Logging for high levels should be infrequent enough not to have performance impact, and when running with debug logging one doesn't care about the minor impact of a function call anyway.