From: Andrew Morton <akpm@linux-foundation.org>
To: "Thomas, Sujith" <sujith.thomas@intel.com>
Cc: lenb@kernel.org, mingo@elte.hu, torvalds@linux-foundation.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org, rui.zhang@intel.com
Subject: Re: [Bug-fix]:2.6.25-rc0 Generic thermal management [Patch 1/2]: validating input parameters
Date: Mon, 11 Feb 2008 13:38:27 -0800 [thread overview]
Message-ID: <20080211133827.16140ba0.akpm@linux-foundation.org> (raw)
In-Reply-To: <05B550FD4BD2014E841D83547B62600802A3A1B0@bgsmsx411.gar.corp.intel.com>
On Mon, 11 Feb 2008 15:57:06 +0530
"Thomas, Sujith" <sujith.thomas@intel.com> wrote:
> From: Thomas Sujith <sujith.thomas@intel.com>
>
> Added sanity checks for interface functions in thermal with
> other modules such as fan, processor, video etc..
>
> Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
> ---
> drivers/thermal/thermal.c | 69
> +++++++++++++++++++++++++++++-----------------
The patch is fairly seriously wordwrapped.
> 1 files changed, 44 insertions(+), 25 deletions(-)
>
> Index: linux-2.6.24-rc3/drivers/thermal/thermal.c
> ===================================================================
> --- linux-2.6.24-rc3.orig/drivers/thermal/thermal.c
> +++ linux-2.6.24-rc3/drivers/thermal/thermal.c
> @@ -301,13 +301,27 @@ int thermal_zone_bind_cooling_device(str
> {
> struct thermal_cooling_device_instance *dev;
> struct thermal_cooling_device_instance *pos;
> + struct thermal_zone_device *pos1;
> + struct thermal_cooling_device *pos2;
> int result;
>
> + if (!tz || !cdev)
> + return -EINVAL;
Is this change actually needed? It's sloppy for a caller to be passing
invalid arguments into a callee, and it's not good for the callee to just
hide that sloppiness.
> - return NULL;
> + return ERR_PTR(-EINVAL);
the patch adds several spaces like this in places where we don't normally
put them.
next prev parent reply other threads:[~2008-02-11 21:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-11 10:27 [Bug-fix]:2.6.25-rc0 Generic thermal management [Patch 1/2]: validating input parameters Thomas, Sujith
2008-02-11 21:38 ` Andrew Morton [this message]
2008-02-12 15:57 ` Thomas, Sujith
2008-02-12 21:34 ` Andrew Morton
2008-02-13 11:03 ` Thomas, Sujith
2008-02-13 18:33 ` Andrew Morton
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=20080211133827.16140ba0.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mingo@elte.hu \
--cc=rui.zhang@intel.com \
--cc=sujith.thomas@intel.com \
--cc=torvalds@linux-foundation.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