From: Andrew Morton <akpm@osdl.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-kernel@vger.kernel.org, linuxppc64-dev@ozlabs.org
Subject: Re: [PATCH] ppc64: Thermal control for SMU based machines
Date: Tue, 11 Oct 2005 17:10:52 -0700 [thread overview]
Message-ID: <20051011171052.3e1d00b6.akpm@osdl.org> (raw)
In-Reply-To: <1128404215.31063.32.camel@gaston>
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> + /* First, locate the params for this model */
> + for (i = 0; i < WF_SMU_SYS_FANS_NUM_CONFIGS; i++)
> + if (wf_smu_sys_all_params[i].model_id == mach_model) {
The loop control is a bit scary here. If you were to do
#define WF_SMU_SYS_FANS_NUM_CONFIGS ARRAY_SIZE(wf_smu_sys_all_params)
then we wouldn't need duplicated into in two places.
> + param = &wf_smu_sys_all_params[i];
> + break;
> + }
> + /* No params found, put fans to max */
> + if (param == NULL) {
> + printk(KERN_WARNING "windfarm: System fan config not found "
> + "for this machine model, max fan speed\n");
> + goto fail;
> + }
> +
> + /* Alloc & initialize state */
> + wf_smu_sys_fans = kmalloc(sizeof(struct wf_smu_sys_fans_state),
> + GFP_KERNEL);
> + if (wf_smu_sys_fans == NULL) {
> + printk(KERN_WARNING "windfarm: Memory allocation error"
> + " max fan speed\n");
> + goto fail;
> + }
> + wf_smu_sys_fans->ticks = 1;
whitespace broke.
next prev parent reply other threads:[~2005-10-12 0:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-04 5:36 [PATCH] ppc64: Thermal control for SMU based machines Benjamin Herrenschmidt
2005-10-04 16:44 ` Nish Aravamudan
2005-10-04 21:59 ` Benjamin Herrenschmidt
2005-10-12 0:03 ` Andrew Morton
2005-10-12 0:20 ` Benjamin Herrenschmidt
2005-10-12 0:10 ` Andrew Morton [this message]
2005-10-12 0:23 ` Benjamin Herrenschmidt
2005-10-12 7:34 ` Eric Piel
2005-10-12 7:40 ` Benjamin Herrenschmidt
2005-10-12 0:13 ` Andrew Morton
2005-10-12 0:23 ` Benjamin Herrenschmidt
2005-10-12 0:24 ` Benjamin Herrenschmidt
2005-10-18 20:57 ` linas
2005-10-18 21:23 ` Andrew Morton
[not found] <200511080502.jA852dWI011502@hera.kernel.org>
2005-11-13 17:47 ` Geert Uytterhoeven
2005-11-13 21:00 ` Benjamin Herrenschmidt
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=20051011171052.3e1d00b6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.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