Re: [PATCH] mrst_pmu: driver for Intel Moorestown Power Management Unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +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

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux