]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: clean up various nits in unicode routines (try #2)
authorJeff Layton <jlayton@redhat.com>
Tue, 5 Apr 2011 19:02:37 +0000 (15:02 -0400)
committerSteve French <sfrench@us.ibm.com>
Tue, 12 Apr 2011 00:57:12 +0000 (00:57 +0000)
commit7867973e79c1a79462ab7516da75ab418780a44b
treeb65a074f6f3cf769f3add8f59e37758e37e70fca
parent8f0479c73a573fcdd4815d3126cc58b2659f6df2
cifs: clean up various nits in unicode routines (try #2)

Minor revision to the original patch. Don't abuse the __le16 variable
on the stack by casting it to wchar_t and handing it off to char2uni.
Declare an actual wchar_t on the stack instead. This fixes a valid
sparse warning.

Fix the spelling of UNI_ASTERISK. Eliminate the unneeded len_remaining
variable in cifsConvertToUCS.

Also, as David Howells points out. We were better off making
cifsConvertToUCS *not* use put_unaligned_le16 since it means that we
can't optimize the mapped characters at compile time. Switch them
instead to use cpu_to_le16, and simply use put_unaligned to set them
in the string.

Reported-and-acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifs_unicode.c
fs/cifs/cifs_unicode.h