Clang errors:
drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15:32: error: unknown warning group '-Wsuggest-attribute=format', ignored [-Werror,-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
^
1 error generated.
The warning being disabled by this pragma is GCC specific. Guard its use
with CONFIG_CC_IS_GCC so that it is not used with clang to clear up the
error.
Fixes: 4eca8cbf7b
("wifi: iwlwifi: suppress printf warnings in tracing")
Link: https://github.com/ClangBuiltLinux/linux/issues/1818
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20230315-iwlwifi-fix-pragma-v1-1-ad23f92c4739@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
23 lines
744 B
C
23 lines
744 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/******************************************************************************
|
|
*
|
|
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*****************************************************************************/
|
|
|
|
#include <linux/module.h>
|
|
|
|
/* sparse doesn't like tracepoint macros */
|
|
#ifndef __CHECKER__
|
|
#include "iwl-trans.h"
|
|
|
|
#define CREATE_TRACE_POINTS
|
|
#ifdef CONFIG_CC_IS_GCC
|
|
#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
|
|
#endif
|
|
#include "iwl-devtrace.h"
|
|
|
|
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_event);
|
|
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_cont_event);
|
|
EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_wrap_event);
|
|
#endif
|