diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-05-17 14:45:29 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-06-29 13:26:24 +0300 |
commit | 779e0513c76e21b62e2ef907f8cfc48f9f41f734 (patch) | |
tree | 5441c8bb31c7177777478dfcb067596512454b6f /drivers/net/wireless/intel/iwlwifi/dvm | |
parent | acf91dda3f64bedb4abc46d87b35d41c36a4a28d (diff) | |
download | linux-779e0513c76e21b62e2ef907f8cfc48f9f41f734.tar.xz |
iwlwifi: dvm: use macros for format strings
Some static checkers (e.g. smatch) complain if a non-constant
format string is used, even if that's a static const variable.
Since there's no impact on code generation, just change those
format strings to be macros.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/dvm')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c index 376c79337a0e..937be04c6c71 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c @@ -681,11 +681,10 @@ DEBUGFS_READ_FILE_OPS(temperature); DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override); DEBUGFS_READ_FILE_OPS(current_sleep_command); -static const char *fmt_value = " %-30s %10u\n"; -static const char *fmt_hex = " %-30s 0x%02X\n"; -static const char *fmt_table = " %-30s %10u %10u %10u %10u\n"; -static const char *fmt_header = - "%-32s current cumulative delta max\n"; +#define fmt_value " %-30s %10u\n" +#define fmt_hex " %-30s 0x%02X\n" +#define fmt_table " %-30s %10u %10u %10u %10u\n" +#define fmt_header "%-32s current cumulative delta max\n" static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) { |