public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
	rui.zhang@intel.com, rdunlap@infradead.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] thermal: fix compilation issue on CONFIG_THERMAL_OF dependencies
Date: Tue, 7 Jan 2014 16:03:46 +0100	[thread overview]
Message-ID: <20140107160346.522f3138@endymion.delvare> (raw)
In-Reply-To: <52CC104A.6010805@roeck-us.net>

On Tue, 07 Jan 2014 06:33:46 -0800, Guenter Roeck wrote:
> Alternative would be something like
> 
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index f7e11c7..156bb4d 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -244,7 +244,7 @@ struct thermal_genl_event {
>   };
> 
>   /* Function declarations */
> -#ifdef CONFIG_THERMAL_OF
> +#if defined(CONFIG_THERMAL_OF) && (defined(CONFIG_THERMAL) || (defined(MODULE) && defined(CONFIG_THERMAL_MODULE)))
>   struct thermal_zone_device *
>   thermal_zone_of_sensor_register(struct device *dev, int id,
>                                  void *data, int (*get_temp)(void *, long *),

I don't like it. Using defined(MODULE) in a header file seems quite
risky (although I see there are occurrences of this already.) But more
importantly, this means that you can have all pieces enabled in your
kernel but the code will be silently stubbed out because the
combinations of Y and M happens to be unsupported but this is nowhere
documented. This is wrong.

-- 
Jean Delvare

  parent reply	other threads:[~2014-01-07 15:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140106204020.b47e53cc3ead8f90164ef5b7@canb.auug.org.au>
     [not found] ` <52CB0948.6030702@infradead.org>
2014-01-06 20:32   ` linux-next: Tree for Jan 06 (hwmon/lm75.c) Guenter Roeck
2014-01-07  1:09     ` [PATCH] hwmon/sensors: fix SENSORS_LM75 dependencies Randy Dunlap
2014-01-07  2:26       ` Guenter Roeck
2014-01-07 11:35         ` Eduardo Valentin
2014-01-07 12:04         ` Jean Delvare
2014-01-07 12:23           ` Eduardo Valentin
2014-01-07 12:44             ` [PATCH 1/1] thermal: fix compilation issue on CONFIG_THERMAL_OF dependencies Eduardo Valentin
2014-01-07 14:33               ` Guenter Roeck
2014-01-07 14:56                 ` Eduardo Valentin
2014-01-07 15:03                 ` Jean Delvare [this message]
2014-01-07 14:05             ` [PATCH] hwmon/sensors: fix SENSORS_LM75 dependencies Zhang, Rui
2014-01-07 14:57               ` Eduardo Valentin
2014-01-07 15:07                 ` Jean Delvare
2014-01-07 15:28                   ` Eduardo Valentin
2014-01-07 16:10                   ` Guenter Roeck
2014-01-07 14:21             ` Jean Delvare
2014-01-07 16:33               ` Eduardo Valentin
2014-01-08  1:50                 ` Guenter Roeck
2014-01-07 18:06               ` Randy Dunlap
2014-01-08  2:02               ` Zhang Rui
2014-01-07 16:02           ` Guenter Roeck
2014-01-07 11:33     ` linux-next: Tree for Jan 06 (hwmon/lm75.c) Eduardo Valentin

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=20140107160346.522f3138@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=eduardo.valentin@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rdunlap@infradead.org \
    --cc=rui.zhang@intel.com \
    /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