lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Nov 2011 23:52:56 +0000 (GMT)
From:	Paul Parsons <lost.distance@...oo.com>
To:	Philipp Zabel <philipp.zabel@...il.com>
Cc:	linux-kernel@...r.kernel.org, mad_soft@...ox.ru,
	koen@...inion.thruhere.net, cbouatmailru@...il.com
Subject: Re: [PATCH] power/ds2760_battery: Add rated capacity of the hx4700 3600mAh battery

--- On Thu, 24/11/11, Philipp Zabel <philipp.zabel@...il.com> wrote:
> > +#ifdef CONFIG_MACH_H4700
> > +       0,
> > +       3600,   /* HP iPAQ hx4700 3.7V 3600mAh
> (359114-001) */
> > +#endif
> 
> Is that #ifdef needed? I know there's another one a few
> lines up, but
> I think that one is already unfortunate and there is no
> conflict here.

Yes it is needed, because the rated_capacities[] table must contain different values for different platforms. The #ifdefs preserve the original table for other platforms.

Agreed it's untidy. Ideally the table would be replaced by platform specific data. However it's not obvious which other platforms use the table, nor whether the original table is correct for those other platforms. I presume that the table was originally believed to be common for all ds2760 based platforms, but the hx4700 demonstrates this is not the case.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ