All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-kernel@vger.kernel.org,
	Denys Vlasenko <vda.linux@googlemail.com>
Subject: Re: [PATCHv2] fat: don't use custom hex_to_bin()
Date: Thu, 29 Sep 2011 17:54:00 +0300	[thread overview]
Message-ID: <1317308040.2676.124.camel@smile> (raw)
In-Reply-To: <87ipob8l4l.fsf@devron.myhome.or.jp>

On Thu, 2011-09-29 at 23:43 +0900, OGAWA Hirofumi wrote: 
> I guess you just did copy&paste. "u8 uc[2];" part should be before
> statement as C90.
> 
> I.e.
> 
> 				if (escape && (*ip == ':')) {
>                                 	u8 uc[2];
> 
> 					if (i > len - 5)
> 						return -EINVAL;
> 
> 					if (hex2bin(uc, ip + 1, 2) < 0)
> 						return -EINVAL;
> 					*(wchar_t *)op = uc[0] << 8 | uc[1];
Actually, why do not use 
*(wchar_t *)op++ = ... 
instead of additional op+=2?

> 
> 					op += 2;
> 					ip += 5;
> 					i += 5;
> 				} else {
> 
> This should be work?
Oh, my bad! So much minor mistakes last time. Really need vacation.


-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2011-09-29 14:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-23 11:32 [PATCH] alsa: 6fire: don't use custom hex_to_bin() Andy Shevchenko
2011-09-23 11:32 ` [PATCH] fat: " Andy Shevchenko
2011-09-23 12:05   ` Denys Vlasenko
2011-09-23 12:11     ` Andy Shevchenko
2011-09-27 11:48     ` [PATCHv2] " Andy Shevchenko
2011-09-27 17:19       ` OGAWA Hirofumi
2011-09-27 17:52         ` Andy Shevchenko
2011-09-27 18:06         ` Andy Shevchenko
2011-09-27 23:15           ` OGAWA Hirofumi
2011-09-29 13:07             ` Andy Shevchenko
2011-09-29 14:43               ` OGAWA Hirofumi
2011-09-29 14:54                 ` Andy Shevchenko [this message]
2011-09-29 15:19                   ` OGAWA Hirofumi
2011-09-29 15:10                 ` [PATCHv4] " Andy Shevchenko
2011-09-29 15:37                   ` Joe Perches
2011-09-29 18:27                     ` OGAWA Hirofumi
2011-09-29 18:41                       ` Joe Perches
2011-09-29 19:35                         ` OGAWA Hirofumi
2011-09-29 13:15             ` [PATCHv3] " Andy Shevchenko
2011-09-29 14:51               ` OGAWA Hirofumi
2011-09-23 13:22 ` [PATCH] alsa: 6fire: " Takashi Iwai
2011-09-23 13:22   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317308040.2676.124.camel@smile \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda.linux@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.