(In reply to Arjen de Korte from comment #34) > Looking at drivers/net/wireless/intel/iwlwifi/iwl-debug.h, IWL_DEBUG_FW > accepts a va_arg list, so why not replace the offending code with > > IWL_DEBUG_FW(trans, "WRT: parsing region: %.*s\n", IWL_FW_INI_MAX_NAME, > reg->name); > > This will have the same effect, but without the terrible habit of modifying > a buffer/string one doesn't own. That would work, yes. But then add a comment why this form is used (i.e. it may be a non-terminated string and may be read-only) before the call, otherwise the reader at a later point would overlook the need of the modifier again.