]> git.baikalelectronics.ru Git - kernel.git/commit
sgi-gru: decrapfiy options_write() function
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Nov 2009 18:48:30 +0000 (10:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Nov 2009 18:48:30 +0000 (10:48 -0800)
commit22552ab223fcc3242137add23bb4d8ad685ed4d9
tree2eebf445f1b61cf09abd62d5a2dc4a314f0d6803
parent7babd7ef497df25f34eeeacf91a75450c8daa37d
sgi-gru: decrapfiy options_write() function

Not a single line of actual code in the function was really
fundamentally correct.

Problems ranged from lack of proper range checking, to removing the last
character written (which admittedly is usually '\n'), to not accepting
hex numbers even though the 'show' routine would show the data in that
format.

This tries to do better.

Acked-by: Michael Buesch <mb@bu3sch.de>
Tested-and-acked-by: Jack Steiner <steiner@sgi.com>
Cc: stable@kernel.org
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Michael Gilbert <michael.s.gilbert@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/sgi-gru/gruprocfs.c