All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: linux-kbuild@vger.kernel.org
Cc: kbuild-all@01.org, fengguang.wu@intel.com,
	Kalle Valo <kvalo@qca.qualcomm.com>,
	ath10k@lists.infradead.org
Subject: [PATCH] ath10: Fix build with CONFIG_THERMAL=m
Date: Thu, 26 Nov 2015 16:36:38 +0100	[thread overview]
Message-ID: <1448552198-26911-1-git-send-email-mmarek@suse.com> (raw)
In-Reply-To: <201511260039.iQbaOe1h%fengguang.wu@intel.com>

After commit cf4f21938e13 ("kbuild: Allow to specify composite modules
with modname-m"), thermal.c gets included in the driver and the build
fails with

drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of ‘ath10k_thermal_event_temperature’
drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of ‘ath10k_thermal_event_temperature’ was here
drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of ‘ath10k_thermal_set_throttling’
drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of ‘ath10k_thermal_set_throttling’ was here
drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of ‘ath10k_thermal_register’
drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of ‘ath10k_thermal_register’ was here
drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of ‘ath10k_thermal_unregister’
drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of ‘ath10k_thermal_unregister’ was here

Change the #ifdef to reflect the new kbuild behavior.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
---
 drivers/net/wireless/ath/ath10k/thermal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h
index b610ea5caae8..c9223e9e962f 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.h
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
@@ -36,7 +36,7 @@ struct ath10k_thermal {
 	int temperature;
 };
 
-#ifdef CONFIG_THERMAL
+#if IS_REACHABLE(CONFIG_THERMAL)
 int ath10k_thermal_register(struct ath10k *ar);
 void ath10k_thermal_unregister(struct ath10k *ar);
 void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
-- 
2.1.4


WARNING: multiple messages have this Message-ID (diff)
From: Michal Marek <mmarek@suse.com>
To: linux-kbuild@vger.kernel.org
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
	fengguang.wu@intel.com, kbuild-all@01.org,
	ath10k@lists.infradead.org
Subject: [PATCH] ath10: Fix build with CONFIG_THERMAL=m
Date: Thu, 26 Nov 2015 16:36:38 +0100	[thread overview]
Message-ID: <1448552198-26911-1-git-send-email-mmarek@suse.com> (raw)
In-Reply-To: <201511260039.iQbaOe1h%fengguang.wu@intel.com>

After commit cf4f21938e13 ("kbuild: Allow to specify composite modules
with modname-m"), thermal.c gets included in the driver and the build
fails with

drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of ‘ath10k_thermal_event_temperature’
drivers/net/wireless/ath/ath10k/thermal.h:54:20: note: previous definition of ‘ath10k_thermal_event_temperature’ was here
drivers/net/wireless/ath/ath10k/thermal.c:136:6: error: redefinition of ‘ath10k_thermal_set_throttling’
drivers/net/wireless/ath/ath10k/thermal.h:59:20: note: previous definition of ‘ath10k_thermal_set_throttling’ was here
drivers/net/wireless/ath/ath10k/thermal.c:162:5: error: redefinition of ‘ath10k_thermal_register’
drivers/net/wireless/ath/ath10k/thermal.h:45:19: note: previous definition of ‘ath10k_thermal_register’ was here
drivers/net/wireless/ath/ath10k/thermal.c:216:6: error: redefinition of ‘ath10k_thermal_unregister’
drivers/net/wireless/ath/ath10k/thermal.h:50:20: note: previous definition of ‘ath10k_thermal_unregister’ was here

Change the #ifdef to reflect the new kbuild behavior.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
---
 drivers/net/wireless/ath/ath10k/thermal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/thermal.h b/drivers/net/wireless/ath/ath10k/thermal.h
index b610ea5caae8..c9223e9e962f 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.h
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
@@ -36,7 +36,7 @@ struct ath10k_thermal {
 	int temperature;
 };
 
-#ifdef CONFIG_THERMAL
+#if IS_REACHABLE(CONFIG_THERMAL)
 int ath10k_thermal_register(struct ath10k *ar);
 void ath10k_thermal_unregister(struct ath10k *ar);
 void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
-- 
2.1.4


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2015-11-26 15:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 16:12 [kbuild:kbuild 2/3] drivers/net/wireless/ath/ath10k/thermal.c:119:6: error: redefinition of 'ath10k_thermal_event_temperature' kbuild test robot
2015-11-26 15:36 ` Michal Marek [this message]
2015-11-26 15:36   ` [PATCH] ath10: Fix build with CONFIG_THERMAL=m Michal Marek
2015-11-26 15:53   ` Michal Marek
2015-11-26 15:53     ` Michal Marek
2015-11-26 17:01   ` Kalle Valo
2015-11-26 17:01     ` Kalle Valo
2015-11-26 17:01     ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448552198-26911-1-git-send-email-mmarek@suse.com \
    --to=mmarek@suse.com \
    --cc=ath10k@lists.infradead.org \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-kbuild@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.