lkml.org 
[lkml]   [2010]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/5] fs: fat: use hex_asc_lo/hex_asc_hi instead of custom one
Date
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> if (uni_xlate == 1) {
> - *op = ':';
> - for (k = 4; k > 0; k--) {
> - nc = ec & 0xF;
> - op[k] = nc > 9 ? nc + ('a' - 10)
> - : nc + '0';
> - ec >>= 4;
> - }
> - op += 5;
> + *op++ = ':';
> + *op++ = hex_asc_hi(ec >> 8);
> + *op++ = hex_asc_lo(ec >> 8);
> + *op++ = hex_asc_hi(ec);
> + *op++ = hex_asc_lo(ec);
> len -= 5;

Why doesn't this use pack_hex_byte()?

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


\
 
 \ /
  Last update: 2010-03-11 00:21    [W:0.070 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site