Re: [PATCH v1.3 1/4] lib: hex2bin converts ascii hexadecimal string to binary

2010-11-11 Thread Mimi Zohar
On Thu, 2010-11-11 at 19:48 +, David Howells wrote: > Mimi Zohar wrote: > > > +void hex2bin(unsigned char *mem, char *buf, int count) > > I think this needs a little adjustment. I would recommend something like the > following declaration: > > void hex2bin(u8 *buf, const char *data,

Re: [PATCH v1.3 1/4] lib: hex2bin converts ascii hexadecimal string to binary

2010-11-11 Thread David Howells
Mimi Zohar wrote: > +void hex2bin(unsigned char *mem, char *buf, int count) I think this needs a little adjustment. I would recommend something like the following declaration: void hex2bin(u8 *buf, const char *data, size_t count) since the output data is binary (so use u8*), you're on

[PATCH v1.3 1/4] lib: hex2bin converts ascii hexadecimal string to binary

2010-11-10 Thread Mimi Zohar
Similar to the kgdb_hex2mem() code, hex2bin converts a string to binary using the hex_to_bin() library call. Signed-off-by: Mimi Zohar Acked-by: Serge E. Hallyn --- include/linux/kernel.h |1 + lib/hexdump.c | 16 2 files changed, 17 insertions(+), 0 deletions(-)