lkml.org 
[lkml]   [2017]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2017-07-31 21:32    [W:0.052 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site