From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org,
Mathias Nyman <mathias.nyman@intel.com>
Cc: kbuild-all@lists.01.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v2 7/8] usb: early: xhci-dbc: Make use of cpu_to_le16_array()
Date: Tue, 18 Aug 2020 05:23:27 +0800 [thread overview]
Message-ID: <202008180518.QWkqFGmN%lkp@intel.com> (raw)
In-Reply-To: <20200817184659.58419-7-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 12517 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on jkirsher-next-queue/dev-queue linuxtv-media/master staging/staging-testing v5.9-rc1 next-20200817]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a003-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/early/xhci-dbc.c:12:
>> include/linux/byteorder/generic.h:144:33: error: unknown type name '__le16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:144:46: error: unknown type name 'u16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:149:33: error: unknown type name '__le32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:149:46: error: unknown type name 'u32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:154:33: error: unknown type name '__le64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:154:46: error: unknown type name 'u64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:159:38: error: unknown type name '__le16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:159:57: error: unknown type name 'u16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~
>> include/linux/byteorder/generic.h:159:67: error: unknown type name 'size_t'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
+++ |+#include <stddef.h>
1 | /* SPDX-License-Identifier: GPL-2.0 */
include/linux/byteorder/generic.h:167:38: error: unknown type name 'u16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:167:54: error: unknown type name '__le16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: error: unknown type name 'size_t'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:176:38: error: unknown type name 'u32'
176 | static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
| ^~~
include/linux/byteorder/generic.h:184:38: error: unknown type name 'u32'
184 | static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
| ^~~
>> include/linux/byteorder/generic.h:192:33: error: unknown type name '__be16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~~~~
include/linux/byteorder/generic.h:192:46: error: unknown type name 'u16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:197:33: error: unknown type name '__be32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~~~~
include/linux/byteorder/generic.h:197:46: error: unknown type name 'u32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:202:33: error: unknown type name '__be64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~~~~
include/linux/byteorder/generic.h:202:46: error: unknown type name 'u64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:207:38: error: unknown type name '__be32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:57: error: unknown type name 'u32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:207:67: error: unknown type name 'size_t'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:215:38: error: unknown type name 'u32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:215:54: error: unknown type name '__be32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: error: unknown type name 'size_t'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
drivers/usb/early/xhci-dbc.c: In function 'xdbc_mem_init':
>> drivers/usb/early/xhci-dbc.c:259:2: error: implicit declaration of function 'cpu_to_le16_array'; did you mean 'cpu_to_le16'? [-Werror=implicit-function-declaration]
259 | cpu_to_le16_array(s_desc->wData, XDBC_STRING_SERIAL, strlen(XDBC_STRING_SERIAL));
| ^~~~~~~~~~~~~~~~~
| cpu_to_le16
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/05f0c7b5a2ca395d58f1ba7a8f84f4be3d504b56
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
git checkout 05f0c7b5a2ca395d58f1ba7a8f84f4be3d504b56
vim +/__le16 +144 include/linux/byteorder/generic.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 143
8b5f6883683c91 Marcin Slusarz 2008-02-08 @144 static inline void le16_add_cpu(__le16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 145 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 146 *var = cpu_to_le16(le16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 147 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 148
8b5f6883683c91 Marcin Slusarz 2008-02-08 @149 static inline void le32_add_cpu(__le32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 150 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 151 *var = cpu_to_le32(le32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 152 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 153
8b5f6883683c91 Marcin Slusarz 2008-02-08 @154 static inline void le64_add_cpu(__le64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 155 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 156 *var = cpu_to_le64(le64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 157 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 158
47df9f29cc421e Andy Shevchenko 2020-08-17 @159 static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 160 {
47df9f29cc421e Andy Shevchenko 2020-08-17 161 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 162
47df9f29cc421e Andy Shevchenko 2020-08-17 163 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 164 dst[i] = cpu_to_le16(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 165 }
47df9f29cc421e Andy Shevchenko 2020-08-17 166
47df9f29cc421e Andy Shevchenko 2020-08-17 167 static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 168 {
47df9f29cc421e Andy Shevchenko 2020-08-17 169 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 170
47df9f29cc421e Andy Shevchenko 2020-08-17 171 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 172 dst[i] = le16_to_cpu(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 173 }
47df9f29cc421e Andy Shevchenko 2020-08-17 174
9def051018c08e Andy Shevchenko 2018-03-21 175 /* XXX: this stuff can be optimized */
9def051018c08e Andy Shevchenko 2018-03-21 176 static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 177 {
9def051018c08e Andy Shevchenko 2018-03-21 178 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 179 __le32_to_cpus(buf);
9def051018c08e Andy Shevchenko 2018-03-21 180 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 181 }
9def051018c08e Andy Shevchenko 2018-03-21 182 }
9def051018c08e Andy Shevchenko 2018-03-21 183
9def051018c08e Andy Shevchenko 2018-03-21 184 static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 185 {
9def051018c08e Andy Shevchenko 2018-03-21 186 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 187 __cpu_to_le32s(buf);
9def051018c08e Andy Shevchenko 2018-03-21 188 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 189 }
9def051018c08e Andy Shevchenko 2018-03-21 190 }
9def051018c08e Andy Shevchenko 2018-03-21 191
8b5f6883683c91 Marcin Slusarz 2008-02-08 @192 static inline void be16_add_cpu(__be16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 193 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 194 *var = cpu_to_be16(be16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 195 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 196
8b5f6883683c91 Marcin Slusarz 2008-02-08 @197 static inline void be32_add_cpu(__be32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 198 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 199 *var = cpu_to_be32(be32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 200 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 201
8b5f6883683c91 Marcin Slusarz 2008-02-08 @202 static inline void be64_add_cpu(__be64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 203 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 204 *var = cpu_to_be64(be64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 205 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34758 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 7/8] usb: early: xhci-dbc: Make use of cpu_to_le16_array()
Date: Tue, 18 Aug 2020 05:23:27 +0800 [thread overview]
Message-ID: <202008180518.QWkqFGmN%lkp@intel.com> (raw)
In-Reply-To: <20200817184659.58419-7-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 12706 bytes --]
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on jkirsher-next-queue/dev-queue linuxtv-media/master staging/staging-testing v5.9-rc1 next-20200817]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a003-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/usb/early/xhci-dbc.c:12:
>> include/linux/byteorder/generic.h:144:33: error: unknown type name '__le16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:144:46: error: unknown type name 'u16'
144 | static inline void le16_add_cpu(__le16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:149:33: error: unknown type name '__le32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:149:46: error: unknown type name 'u32'
149 | static inline void le32_add_cpu(__le32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:154:33: error: unknown type name '__le64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~~~~
>> include/linux/byteorder/generic.h:154:46: error: unknown type name 'u64'
154 | static inline void le64_add_cpu(__le64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:159:38: error: unknown type name '__le16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:159:57: error: unknown type name 'u16'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~
>> include/linux/byteorder/generic.h:159:67: error: unknown type name 'size_t'
159 | static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:1:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
+++ |+#include <stddef.h>
1 | /* SPDX-License-Identifier: GPL-2.0 */
include/linux/byteorder/generic.h:167:38: error: unknown type name 'u16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:167:54: error: unknown type name '__le16'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: error: unknown type name 'size_t'
167 | static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:167:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:176:38: error: unknown type name 'u32'
176 | static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
| ^~~
include/linux/byteorder/generic.h:184:38: error: unknown type name 'u32'
184 | static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
| ^~~
>> include/linux/byteorder/generic.h:192:33: error: unknown type name '__be16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~~~~
include/linux/byteorder/generic.h:192:46: error: unknown type name 'u16'
192 | static inline void be16_add_cpu(__be16 *var, u16 val)
| ^~~
>> include/linux/byteorder/generic.h:197:33: error: unknown type name '__be32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~~~~
include/linux/byteorder/generic.h:197:46: error: unknown type name 'u32'
197 | static inline void be32_add_cpu(__be32 *var, u32 val)
| ^~~
>> include/linux/byteorder/generic.h:202:33: error: unknown type name '__be64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~~~~
include/linux/byteorder/generic.h:202:46: error: unknown type name 'u64'
202 | static inline void be64_add_cpu(__be64 *var, u64 val)
| ^~~
include/linux/byteorder/generic.h:207:38: error: unknown type name '__be32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:57: error: unknown type name 'u32'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:207:67: error: unknown type name 'size_t'
207 | static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:207:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
include/linux/byteorder/generic.h:215:38: error: unknown type name 'u32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~
include/linux/byteorder/generic.h:215:54: error: unknown type name '__be32'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: error: unknown type name 'size_t'
215 | static inline void be32_to_cpu_array(u32 *dst, const __be32 *src, size_t len)
| ^~~~~~
include/linux/byteorder/generic.h:215:67: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
drivers/usb/early/xhci-dbc.c: In function 'xdbc_mem_init':
>> drivers/usb/early/xhci-dbc.c:259:2: error: implicit declaration of function 'cpu_to_le16_array'; did you mean 'cpu_to_le16'? [-Werror=implicit-function-declaration]
259 | cpu_to_le16_array(s_desc->wData, XDBC_STRING_SERIAL, strlen(XDBC_STRING_SERIAL));
| ^~~~~~~~~~~~~~~~~
| cpu_to_le16
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/05f0c7b5a2ca395d58f1ba7a8f84f4be3d504b56
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andy-Shevchenko/byteorder-Introduce-cpu_to_le16_array-and-le16_to_cpu_array/20200818-024849
git checkout 05f0c7b5a2ca395d58f1ba7a8f84f4be3d504b56
vim +/__le16 +144 include/linux/byteorder/generic.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 143
8b5f6883683c91 Marcin Slusarz 2008-02-08 @144 static inline void le16_add_cpu(__le16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 145 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 146 *var = cpu_to_le16(le16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 147 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 148
8b5f6883683c91 Marcin Slusarz 2008-02-08 @149 static inline void le32_add_cpu(__le32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 150 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 151 *var = cpu_to_le32(le32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 152 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 153
8b5f6883683c91 Marcin Slusarz 2008-02-08 @154 static inline void le64_add_cpu(__le64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 155 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 156 *var = cpu_to_le64(le64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 157 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 158
47df9f29cc421e Andy Shevchenko 2020-08-17 @159 static inline void cpu_to_le16_array(__le16 *dst, const u16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 160 {
47df9f29cc421e Andy Shevchenko 2020-08-17 161 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 162
47df9f29cc421e Andy Shevchenko 2020-08-17 163 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 164 dst[i] = cpu_to_le16(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 165 }
47df9f29cc421e Andy Shevchenko 2020-08-17 166
47df9f29cc421e Andy Shevchenko 2020-08-17 167 static inline void le16_to_cpu_array(u16 *dst, const __le16 *src, size_t len)
47df9f29cc421e Andy Shevchenko 2020-08-17 168 {
47df9f29cc421e Andy Shevchenko 2020-08-17 169 int i;
47df9f29cc421e Andy Shevchenko 2020-08-17 170
47df9f29cc421e Andy Shevchenko 2020-08-17 171 for (i = 0; i < len; i++)
47df9f29cc421e Andy Shevchenko 2020-08-17 172 dst[i] = le16_to_cpu(src[i]);
47df9f29cc421e Andy Shevchenko 2020-08-17 173 }
47df9f29cc421e Andy Shevchenko 2020-08-17 174
9def051018c08e Andy Shevchenko 2018-03-21 175 /* XXX: this stuff can be optimized */
9def051018c08e Andy Shevchenko 2018-03-21 176 static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 177 {
9def051018c08e Andy Shevchenko 2018-03-21 178 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 179 __le32_to_cpus(buf);
9def051018c08e Andy Shevchenko 2018-03-21 180 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 181 }
9def051018c08e Andy Shevchenko 2018-03-21 182 }
9def051018c08e Andy Shevchenko 2018-03-21 183
9def051018c08e Andy Shevchenko 2018-03-21 184 static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
9def051018c08e Andy Shevchenko 2018-03-21 185 {
9def051018c08e Andy Shevchenko 2018-03-21 186 while (words--) {
9def051018c08e Andy Shevchenko 2018-03-21 187 __cpu_to_le32s(buf);
9def051018c08e Andy Shevchenko 2018-03-21 188 buf++;
9def051018c08e Andy Shevchenko 2018-03-21 189 }
9def051018c08e Andy Shevchenko 2018-03-21 190 }
9def051018c08e Andy Shevchenko 2018-03-21 191
8b5f6883683c91 Marcin Slusarz 2008-02-08 @192 static inline void be16_add_cpu(__be16 *var, u16 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 193 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 194 *var = cpu_to_be16(be16_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 195 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 196
8b5f6883683c91 Marcin Slusarz 2008-02-08 @197 static inline void be32_add_cpu(__be32 *var, u32 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 198 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 199 *var = cpu_to_be32(be32_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 200 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 201
8b5f6883683c91 Marcin Slusarz 2008-02-08 @202 static inline void be64_add_cpu(__be64 *var, u64 val)
8b5f6883683c91 Marcin Slusarz 2008-02-08 203 {
8b5f6883683c91 Marcin Slusarz 2008-02-08 204 *var = cpu_to_be64(be64_to_cpu(*var) + val);
8b5f6883683c91 Marcin Slusarz 2008-02-08 205 }
8b5f6883683c91 Marcin Slusarz 2008-02-08 206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34758 bytes --]
next prev parent reply other threads:[~2020-08-17 21:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 18:46 [PATCH v2 1/8] byteorder: Introduce cpu_to_le16_array() and le16_to_cpu_array() Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 2/8] media: solo6x10: Make use of cpu_to_le16_array() Andy Shevchenko
2020-08-17 22:18 ` Ismael Luceno
2020-08-17 18:46 ` [PATCH v2 3/8] rndis_wlan: " Andy Shevchenko
2020-08-17 22:02 ` kernel test robot
2020-08-17 22:02 ` kernel test robot
2020-08-18 5:36 ` Kalle Valo
2020-08-18 5:36 ` Jussi Kivilinna
2020-08-17 18:46 ` [PATCH v2 4/8] i40e: Make use of le16_to_cpu_array() Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 5/8] ice: " Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 6/8] usb: early: xhci-dbc: use readl_poll_timeout() to simplify code Andy Shevchenko
2020-08-17 18:46 ` [PATCH v2 7/8] usb: early: xhci-dbc: Make use of cpu_to_le16_array() Andy Shevchenko
2020-08-17 21:23 ` kernel test robot [this message]
2020-08-17 21:23 ` kernel test robot
2020-08-17 18:46 ` [PATCH v2 8/8] usb: early: xhci-dbc: Move asm/* headers after linux/* Andy Shevchenko
2020-08-18 8:01 ` [PATCH v2 1/8] byteorder: Introduce cpu_to_le16_array() and le16_to_cpu_array() Andy Shevchenko
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=202008180518.QWkqFGmN%lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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.