* [PATCH net-next] igb: Fix -Wunused-const-variable warning
@ 2021-06-01 14:02 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2021-06-01 14:02 UTC (permalink / raw)
To: jesse.brandeburg, anthony.l.nguyen, davem, kuba
Cc: intel-wired-lan, netdev, linux-kernel, YueHaibing
If CONFIG_IGB_HWMON is n, gcc warns:
drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17:
warning: ‘e1000_emc_therm_limit’ defined but not used [-Wunused-const-variable=]
static const u8 e1000_emc_therm_limit[4] = {
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17:
warning: ‘e1000_emc_temp_data’ defined but not used [-Wunused-const-variable=]
static const u8 e1000_emc_temp_data[4] = {
^~~~~~~~~~~~~~~~~~~
Move it into #ifdef block to fix this.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/intel/igb/e1000_82575.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index 50863fd87d53..cbe92fd23a70 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -2756,6 +2756,7 @@ s32 igb_get_eee_status_i354(struct e1000_hw *hw, bool *status)
return ret_val;
}
+#ifdef CONFIG_IGB_HWMON
static const u8 e1000_emc_temp_data[4] = {
E1000_EMC_INTERNAL_DATA,
E1000_EMC_DIODE1_DATA,
@@ -2769,7 +2770,6 @@ static const u8 e1000_emc_therm_limit[4] = {
E1000_EMC_DIODE3_THERM_LIMIT
};
-#ifdef CONFIG_IGB_HWMON
/**
* igb_get_thermal_sensor_data_generic - Gathers thermal sensor data
* @hw: pointer to hardware structure
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH net-next] igb: Fix -Wunused-const-variable warning
@ 2021-06-01 14:02 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2021-06-01 14:02 UTC (permalink / raw)
To: intel-wired-lan
If CONFIG_IGB_HWMON is n, gcc warns:
drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17:
warning: ?e1000_emc_therm_limit? defined but not used [-Wunused-const-variable=]
static const u8 e1000_emc_therm_limit[4] = {
^~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17:
warning: ?e1000_emc_temp_data? defined but not used [-Wunused-const-variable=]
static const u8 e1000_emc_temp_data[4] = {
^~~~~~~~~~~~~~~~~~~
Move it into #ifdef block to fix this.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/intel/igb/e1000_82575.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index 50863fd87d53..cbe92fd23a70 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -2756,6 +2756,7 @@ s32 igb_get_eee_status_i354(struct e1000_hw *hw, bool *status)
return ret_val;
}
+#ifdef CONFIG_IGB_HWMON
static const u8 e1000_emc_temp_data[4] = {
E1000_EMC_INTERNAL_DATA,
E1000_EMC_DIODE1_DATA,
@@ -2769,7 +2770,6 @@ static const u8 e1000_emc_therm_limit[4] = {
E1000_EMC_DIODE3_THERM_LIMIT
};
-#ifdef CONFIG_IGB_HWMON
/**
* igb_get_thermal_sensor_data_generic - Gathers thermal sensor data
* @hw: pointer to hardware structure
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] igb: Fix -Wunused-const-variable warning
2021-06-01 14:02 ` [Intel-wired-lan] " YueHaibing
@ 2021-06-02 0:10 ` patchwork-bot+netdevbpf
-1 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-02 0:10 UTC (permalink / raw)
To: YueHaibing
Cc: jesse.brandeburg, anthony.l.nguyen, davem, kuba, intel-wired-lan,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 1 Jun 2021 22:02:38 +0800 you wrote:
> If CONFIG_IGB_HWMON is n, gcc warns:
>
> drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17:
> warning: ‘e1000_emc_therm_limit’ defined but not used [-Wunused-const-variable=]
> static const u8 e1000_emc_therm_limit[4] = {
> ^~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17:
> warning: ‘e1000_emc_temp_data’ defined but not used [-Wunused-const-variable=]
> static const u8 e1000_emc_temp_data[4] = {
> ^~~~~~~~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- [net-next] igb: Fix -Wunused-const-variable warning
https://git.kernel.org/netdev/net-next/c/0a206f9d9e23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH net-next] igb: Fix -Wunused-const-variable warning
@ 2021-06-02 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-02 0:10 UTC (permalink / raw)
To: intel-wired-lan
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Tue, 1 Jun 2021 22:02:38 +0800 you wrote:
> If CONFIG_IGB_HWMON is n, gcc warns:
>
> drivers/net/ethernet/intel/igb/e1000_82575.c:2765:17:
> warning: ?e1000_emc_therm_limit? defined but not used [-Wunused-const-variable=]
> static const u8 e1000_emc_therm_limit[4] = {
> ^~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/igb/e1000_82575.c:2759:17:
> warning: ?e1000_emc_temp_data? defined but not used [-Wunused-const-variable=]
> static const u8 e1000_emc_temp_data[4] = {
> ^~~~~~~~~~~~~~~~~~~
>
> [...]
Here is the summary with links:
- [net-next] igb: Fix -Wunused-const-variable warning
https://git.kernel.org/netdev/net-next/c/0a206f9d9e23
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-02 0:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 14:02 [PATCH net-next] igb: Fix -Wunused-const-variable warning YueHaibing
2021-06-01 14:02 ` [Intel-wired-lan] " YueHaibing
2021-06-02 0:10 ` patchwork-bot+netdevbpf
2021-06-02 0:10 ` [Intel-wired-lan] " patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.