* question about drivers/macintosh/windfarm_pm91.c
@ 2010-03-28 15:48 Julia Lawall
2010-03-28 21:08 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2010-03-28 15:48 UTC (permalink / raw)
To: benh, linuxppc-dev
The function wf_smu_remove in the file drivers/macintosh/windfarm_pm91.c
ends with the following code:
if (wf_smu_slots_fans)
kfree(wf_smu_cpu_fans);
if (wf_smu_drive_fans)
kfree(wf_smu_cpu_fans);
if (wf_smu_cpu_fans)
kfree(wf_smu_cpu_fans);
This looks quite strange. Is it supposed to be if (x) kfree(x); in each
case?
julia
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question about drivers/macintosh/windfarm_pm91.c
2010-03-28 15:48 question about drivers/macintosh/windfarm_pm91.c Julia Lawall
@ 2010-03-28 21:08 ` Benjamin Herrenschmidt
2010-03-28 21:56 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2010-03-28 21:08 UTC (permalink / raw)
To: Julia Lawall; +Cc: linuxppc-dev
On Sun, 2010-03-28 at 17:48 +0200, Julia Lawall wrote:
> The function wf_smu_remove in the file drivers/macintosh/windfarm_pm91.c
> ends with the following code:
>
> if (wf_smu_slots_fans)
> kfree(wf_smu_cpu_fans);
> if (wf_smu_drive_fans)
> kfree(wf_smu_cpu_fans);
> if (wf_smu_cpu_fans)
> kfree(wf_smu_cpu_fans);
>
> This looks quite strange. Is it supposed to be if (x) kfree(x); in each
> case?
Definitely a typo. In fact, the if () aren't even necessary. Patch
welcome :-)
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question about drivers/macintosh/windfarm_pm91.c
2010-03-28 21:08 ` Benjamin Herrenschmidt
@ 2010-03-28 21:56 ` Julia Lawall
2010-03-28 23:07 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2010-03-28 21:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
On Mon, 29 Mar 2010, Benjamin Herrenschmidt wrote:
> On Sun, 2010-03-28 at 17:48 +0200, Julia Lawall wrote:
> > The function wf_smu_remove in the file drivers/macintosh/windfarm_pm91.c
> > ends with the following code:
> >
> > if (wf_smu_slots_fans)
> > kfree(wf_smu_cpu_fans);
> > if (wf_smu_drive_fans)
> > kfree(wf_smu_cpu_fans);
> > if (wf_smu_cpu_fans)
> > kfree(wf_smu_cpu_fans);
> >
> > This looks quite strange. Is it supposed to be if (x) kfree(x); in each
> > case?
>
> Definitely a typo. In fact, the if () aren't even necessary. Patch
> welcome :-)
I'll send something tomorrow. I will perhaps keep the ifs, to maintain
the style of the rest of the function.
julia
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: question about drivers/macintosh/windfarm_pm91.c
2010-03-28 21:56 ` Julia Lawall
@ 2010-03-28 23:07 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2010-03-28 23:07 UTC (permalink / raw)
To: Julia Lawall; +Cc: linuxppc-dev
On Sun, 2010-03-28 at 23:56 +0200, Julia Lawall wrote:
> I'll send something tomorrow. I will perhaps keep the ifs, to
> maintain the style of the rest of the function.
Nah, remove them please or some janitor will send -another- patch :-)
Cheers,
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-28 23:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-28 15:48 question about drivers/macintosh/windfarm_pm91.c Julia Lawall
2010-03-28 21:08 ` Benjamin Herrenschmidt
2010-03-28 21:56 ` Julia Lawall
2010-03-28 23:07 ` Benjamin Herrenschmidt
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).