dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	fabf@skynet.be
Subject: [PATCH 1/1 linux-next] drm/nouveau: don't opencode IS_REACHABLE()
Date: Sat, 12 Nov 2016 09:48:18 +0100	[thread overview]
Message-ID: <1478940498-2804-1-git-send-email-fabf@skynet.be> (raw)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/gpu/drm/nouveau/nouveau_hwmon.c       | 6 +++---
 drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
index 71f764b..ddfac0b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c
@@ -37,7 +37,7 @@
 #include <nvkm/subdev/iccsense.h>
 #include <nvkm/subdev/volt.h>
 
-#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
+#if IS_REACHABLE(CONFIG_HWMON)
 static ssize_t
 nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf)
 {
@@ -662,7 +662,7 @@ static const struct attribute_group hwmon_power_attrgroup = {
 int
 nouveau_hwmon_init(struct drm_device *dev)
 {
-#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
+#if IS_REACHABLE(CONFIG_HWMON)
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nvkm_therm *therm = nvxx_therm(&drm->device);
 	struct nvkm_volt *volt = nvxx_volt(&drm->device);
@@ -749,7 +749,7 @@ nouveau_hwmon_init(struct drm_device *dev)
 void
 nouveau_hwmon_fini(struct drm_device *dev)
 {
-#if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE))
+#if IS_REACHABLE(CONFIG_HWMON)
 	struct nouveau_hwmon *hwmon = nouveau_hwmon(dev);
 
 	if (hwmon->hwmon) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h
index df2dd08..8de914c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pci/agp.h
@@ -1,5 +1,5 @@
 #include "priv.h"
-#if defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))
+#if IS_REACHABLE(CONFIG_AGP)
 #ifndef __NVKM_PCI_AGP_H__
 #define __NVKM_PCI_AGP_H__
 
-- 
2.7.4

             reply	other threads:[~2016-11-12  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12  8:48 Fabian Frederick [this message]
2016-11-14 10:56 ` [PATCH 1/1 linux-next] drm/nouveau: don't opencode IS_REACHABLE() Jani Nikula

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=1478940498-2804-1-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).