Re: [PATCH] lib/bitmap.c: add some check to correct the parse result

2015-07-09 Thread Pan Xinhui
hi, Andrew thanks for you kind reply :) On 2015年07月10日 06:57, Andrew Morton wrote: > On Sat, 27 Jun 2015 14:36:18 +0800 Pan Xinhui wrote: > >> Sometimes the input from user may cause an unexpected result. >> >> for example, echo "1-3," > /proc/irq//smp_affinity_list. >> The correct resul

Re: [PATCH] lib/bitmap.c: add some check to correct the parse result

2015-07-09 Thread Andrew Morton
On Sat, 27 Jun 2015 14:36:18 +0800 Pan Xinhui wrote: > Sometimes the input from user may cause an unexpected result. > > for example, echo "1-3," > /proc/irq//smp_affinity_list. > The correct result should be 1-3, however we got 0-4. > > To avoid this issue, we check if there is a ready digit.

[PATCH] lib/bitmap.c: add some check to correct the parse result

2015-06-25 Thread Pan Xinhui
Sometimes the input from user may cause an unexpected result. for example, echo "1-3," > /proc/irq//smp_affinity_list. The correct result should be 1-3, however we got 0-4. To avoid this issue, we check if there is a ready digit. If no valid digit is set, we just continue to the next parse. Sig