Re: [PATCH] hwmon: (applesmc) Fix checkpatch errors

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Henrik Rydberg
Date: Wednesday, November 10, 2010 - 12:56 pm

>>> @@ -977,7 +975,11 @@ static ssize_t applesmc_key_at_index_show



Indeed! The downside of remakes... sorry about that. :-)

I guess the change should go into patch 4 already? There is also the option to
put the bounds check in applesmc_get_entry_by_index, but I like the simplicity
of "|| newkey >= smcreg.key_count".





If you are referring to the lower and upper bound functions, those use the
one-past-the-last-element convention, so it is actually still 0..key_count - 1.
I stayed very close to the stl reference implementation, which relies on the
fact that when begin != end, (begin + (end - begin) / 2) < end.

Cheers,
Henrik
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] hwmon: (applesmc) Fix checkpatch errors, Henrik Rydberg, (Wed Nov 10, 11:52 am)
[PATCH] hwmon: (applesmc) Fix checkpatch errors, Guenter Roeck, (Wed Nov 10, 11:53 am)
Re: [PATCH] hwmon: (applesmc) Fix checkpatch errors, Guenter Roeck, (Wed Nov 10, 12:39 pm)
Re: [PATCH] hwmon: (applesmc) Fix checkpatch errors, Henrik Rydberg, (Wed Nov 10, 12:56 pm)
Re: [PATCH] hwmon: (applesmc) Fix checkpatch errors, Guenter Roeck, (Wed Nov 10, 1:12 pm)