From: kbuild test robot <lkp@intel.com>
To: Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Cc: kbuild-all@01.org, linux-fsdevel@vger.kernel.org, jra@google.com,
tytso@mit.edu, olaf@sgi.com, darrick.wong@oracle.com,
kernel@lists.collabora.co.uk,
Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Subject: Re: [PATCH 04/15] nls: Split default charset from NLS core
Date: Wed, 9 May 2018 22:52:45 +0800 [thread overview]
Message-ID: <201805092210.rmRjBwsU%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180509064800.28658-5-krisman@collabora.co.uk>
Hi Gabriel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc4]
[cannot apply to next-20180509]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/NLS-refactor-and-UTF-8-normalization/20180509-190115
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> fs/nls/nls_default.c:118:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:118:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:118:20: got restricted __le16 [usertype] <noident>
fs/nls/nls_default.c:121:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:121:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:121:20: got restricted __be16 [usertype] <noident>
>> fs/nls/nls_default.c:118:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:118:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:118:20: got restricted __le16 [usertype] <noident>
fs/nls/nls_default.c:121:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:121:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:121:20: got restricted __be16 [usertype] <noident>
>> fs/nls/nls_default.c:118:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:118:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:118:20: got restricted __le16 [usertype] <noident>
fs/nls/nls_default.c:121:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:121:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:121:20: got restricted __be16 [usertype] <noident>
>> fs/nls/nls_default.c:118:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:118:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:118:20: got restricted __le16 [usertype] <noident>
fs/nls/nls_default.c:121:20: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [unsigned] [short] [usertype] <noident> @@ got unsigned] [short] [usertype] <noident> @@
fs/nls/nls_default.c:121:20: expected unsigned short [unsigned] [short] [usertype] <noident>
fs/nls/nls_default.c:121:20: got restricted __be16 [usertype] <noident>
>> fs/nls/nls_default.c:174:24: sparse: cast to restricted __le16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:174:24: sparse: cast to restricted __le16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
>> fs/nls/nls_default.c:176:24: sparse: cast to restricted __be16
vim +118 fs/nls/nls_default.c
110
111 static inline void put_utf16(wchar_t *s, unsigned c, enum utf16_endian endian)
112 {
113 switch (endian) {
114 default:
115 *s = (wchar_t) c;
116 break;
117 case UTF16_LITTLE_ENDIAN:
> 118 *s = __cpu_to_le16(c);
119 break;
120 case UTF16_BIG_ENDIAN:
> 121 *s = __cpu_to_be16(c);
122 break;
123 }
124 }
125
126 int utf8s_to_utf16s(const u8 *s, int inlen, enum utf16_endian endian,
127 wchar_t *pwcs, int maxout)
128 {
129 u16 *op;
130 int size;
131 unicode_t u;
132
133 op = pwcs;
134 while (inlen > 0 && maxout > 0 && *s) {
135 if (*s & 0x80) {
136 size = utf8_to_utf32(s, inlen, &u);
137 if (size < 0)
138 return -EINVAL;
139 s += size;
140 inlen -= size;
141
142 if (u >= PLANE_SIZE) {
143 if (maxout < 2)
144 break;
145 u -= PLANE_SIZE;
146 put_utf16(op++, SURROGATE_PAIR |
147 ((u >> 10) & SURROGATE_BITS),
148 endian);
149 put_utf16(op++, SURROGATE_PAIR |
150 SURROGATE_LOW |
151 (u & SURROGATE_BITS),
152 endian);
153 maxout -= 2;
154 } else {
155 put_utf16(op++, u, endian);
156 maxout--;
157 }
158 } else {
159 put_utf16(op++, *s++, endian);
160 inlen--;
161 maxout--;
162 }
163 }
164 return op - pwcs;
165 }
166 EXPORT_SYMBOL(utf8s_to_utf16s);
167
168 static inline unsigned long get_utf16(unsigned c, enum utf16_endian endian)
169 {
170 switch (endian) {
171 default:
172 return c;
173 case UTF16_LITTLE_ENDIAN:
> 174 return __le16_to_cpu(c);
175 case UTF16_BIG_ENDIAN:
> 176 return __be16_to_cpu(c);
177 }
178 }
179
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2018-05-09 14:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 6:47 [PATCH 00/15] NLS refactor and UTF-8 normalization Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 01/15] nls: Wrap uni2char/char2uni callers Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 02/15] nls: Wrap charset field access Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 03/15] nls: Wrap charset hooks in ops structure Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 04/15] nls: Split default charset from NLS core Gabriel Krisman Bertazi
2018-05-09 14:52 ` kbuild test robot [this message]
2018-05-15 2:45 ` Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 05/15] nls: Split struct nls_charset from struct nls_table Gabriel Krisman Bertazi
2018-05-09 14:30 ` kbuild test robot
2018-05-15 2:41 ` Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 06/15] nls: Add support for multiple versions of an encoding Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 07/15] nls: Add new interface for string comparisons Gabriel Krisman Bertazi
2018-05-09 6:47 ` [PATCH 08/15] nls: Let charsets define the behavior of tolower/toupper Gabriel Krisman Bertazi
2018-05-09 6:48 ` [PATCH 09/15] nls: Add optional normalization and casefold hooks Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 10/15] nls: utf8norm: Add unicode character database files Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 11/15] scripts: add trie generator for UTF-8 Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 12/15] nls: utf8norm: Introduce code for UTF-8 normalization Gabriel Krisman Bertazi
2018-05-09 17:02 ` kbuild test robot
2018-05-09 18:46 ` Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 13/15] nls: utf8norm: reduce the size of utf8data[] Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 14/15] nls: utf8norm: Integrate utf8norm code with NLS subsystem Gabriel Krisman Bertazi
2018-05-09 6:55 ` [PATCH 15/15] nls: utf8norm: Introduce test module for utf8norm implementation Gabriel Krisman Bertazi
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=201805092210.rmRjBwsU%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=darrick.wong@oracle.com \
--cc=jra@google.com \
--cc=kbuild-all@01.org \
--cc=kernel@lists.collabora.co.uk \
--cc=krisman@collabora.co.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=olaf@sgi.com \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).