From: Len Brown <lenb@kernel.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mrst_pmu: driver for Intel Moorestown Power Management Unit
Date: Mon, 01 Aug 2011 01:47:16 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.02.1108010135290.26733@x980> (raw)
In-Reply-To: <20110713105105.63e2fbcb@lxorguk.ukuu.org.uk>
> > +static struct mrst_device *pci_id_2_mrst_dev(u16 pci_dev_num)
> > +{
...
> > + else
> > + BUG();
> > +
> > + BUG_ON(pci_dev_num != mrst_devs[index].pci_dev_num);
>
> That strikes me as needlessly unfriendly, you could warn/return NULL and
> propogate a WARN_ONCE back to the user.
This code asserts that the firmware is correct, and today it is.
If somebody breaks the firmware in the future, I want them to discover
it the instant they break it. If I had the option of shooting
lazer beams out of the system to instantly kill the firmware programmer,
I'd do it. But alas, I have to settle for crashing their system:-)
> > +static int __init scu_fw_check(void)
if (!mrst_pmu)
return 0;
> > +late_initcall(scu_fw_check);
>
> NAK. I pointed this problem with the driver to you way back - this code
> gets run always - even on machines that are not in fact Moorestown which
> are then going to crash.
>
> You need to check that the platform is Moorestown (not just the CPU
> either because of Oaktrail)
Right-o. I think the 1-liner to check mrst_pmu above should do it.
thanks for reading, and sorry for being a slow listener,
-Len
next prev parent reply other threads:[~2011-08-01 5:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 3:30 Len Brown
2011-07-13 9:51 ` Alan Cox
2011-08-01 5:47 ` Len Brown [this message]
2011-08-01 15:24 ` Len Brown
2011-08-01 15:39 ` Alan Cox
2011-08-02 23:24 ` [PATCH v2] " Len Brown
2011-08-03 12:48 ` Alan Cox
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=alpine.LFD.2.02.1108010135290.26733@x980 \
--to=lenb@kernel.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.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
all inboxes | Powered by JetHome®