]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iwlwifi: mvm: do string formatting in debug triggers
authorJohannes Berg <johannes.berg@intel.com>
Tue, 31 Mar 2015 07:12:54 +0000 (09:12 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 2 Apr 2015 06:29:13 +0000 (09:29 +0300)
commit5d4f929e3d0c09838677a116ffd168d9d519ada7
tree53c9caa380c065bc8862ddaa3de4227f2a2f8cc3
parent0d365ae5f2715a4a749e41ce5e75e34f03090db6
iwlwifi: mvm: do string formatting in debug triggers

The current code has a lot of duplicates of printing into a buffer
(while having to make sure it's NUL-filled and -terminated) and
then passing that to the debug trigger collection.

Since that's error-prone, instead make the debug trigger collection
function take a format string and format arguments (with compiler
validity checking) and handle the buffer internally.

This makes one behavioural change -- instead of sending the whole
buffer to userspace (clearing is needed to not leak stack data) it
just passes the actual string (including NUL-terminator.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw.c
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/iwlwifi/mvm/mac80211.c
drivers/net/wireless/iwlwifi/mvm/mvm.h
drivers/net/wireless/iwlwifi/mvm/ops.c
drivers/net/wireless/iwlwifi/mvm/rx.c