Messages in this thread | | | From | Andy Shevchenko <> | Date | Mon, 31 Jul 2017 22:31:29 +0300 | Subject | Re: [PATCH v5] vfat: Deduplicate hex2bin() |
| |
On Mon, Jul 31, 2017 at 9:44 PM, OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> wrote: > We may use hex2bin() instead of custom approach.
> #include <linux/ctype.h> > #include <linux/slab.h> > #include <linux/namei.h> > +#include <linux/kernel.h>
Would not be better to squeeze it somehow alphabetically ordered (in most ordered part)?
> + > + *(wchar_t *)op = uc[0] << 8 | uc[1]; > + > + op += 2;
This had been in the original patch 6 years ago and had been refused because of endianess issues.
> charlen = nls->char2uni(ip, len - i, > - (wchar_t *)op); > + (wchar_t *)op);
It perfectly fits one line.
-- With Best Regards, Andy Shevchenko
| |