From: kbuild test robot <lkp@intel.com>
To: Jerome Pouiller <Jerome.Pouiller@silabs.com>,
devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S . Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'
Date: Tue, 12 May 2020 05:59:20 +0800 [thread overview]
Message-ID: <202005120533.A0Qs0Kff%lkp@intel.com> (raw)
In-Reply-To: <20200511154930.190212-14-Jerome.Pouiller@silabs.com>
[-- Attachment #1: Type: text/plain, Size: 5179 bytes --]
Hi Jerome,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20200511]
[cannot apply to v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jerome-Pouiller/staging-wfx-fix-support-for-big-endian-hosts/20200512-031750
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git ae73e7784871ebe2c43da619b4a1e2c9ff81508d
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
drivers/staging/wfx/bh.c: In function 'tx_helper':
>> drivers/staging/wfx/bh.c:202:39: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [-Wint-conversion]
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
include/uapi/linux/byteorder/big_endian.h:96:38: note: in definition of macro '__cpu_to_le16s'
96 | #define __cpu_to_le16s(x) __swab16s((x))
| ^
>> drivers/staging/wfx/bh.c:202:2: note: in expansion of macro 'cpu_to_le16s'
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
| ^~~~~~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
include/uapi/linux/swab.h:240:37: note: expected '__u16 *' {aka 'short unsigned int *'} but argument is of type 'u16' {aka 'short unsigned int'}
240 | static inline void __swab16s(__u16 *p)
| ~~~~~~~^
vim +/__swab16s +202 drivers/staging/wfx/bh.c
169
170 static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif)
171 {
172 int ret;
173 void *data;
174 bool is_encrypted = false;
175 size_t len = hif->len;
176
177 WARN(len < sizeof(*hif), "try to send corrupted data");
178
179 hif->seqnum = wdev->hif.tx_seqnum;
180 wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1);
181
182 if (wfx_is_secure_command(wdev, hif->id)) {
183 len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) +
184 sizeof(struct hif_sl_msg_hdr) +
185 sizeof(struct hif_sl_tag);
186 // AES support encryption in-place. However, mac80211 access to
187 // 802.11 header after frame was sent (to get MAC addresses).
188 // So, keep origin buffer clear.
189 data = kmalloc(len, GFP_KERNEL);
190 if (!data)
191 goto end;
192 is_encrypted = true;
193 ret = wfx_sl_encode(wdev, hif, data);
194 if (ret)
195 goto end;
196 } else {
197 data = hif;
198 }
199 WARN(len > wdev->hw_caps.size_inp_ch_buf,
200 "%s: request exceed WFx capability: %zu > %d\n", __func__,
201 len, wdev->hw_caps.size_inp_ch_buf);
> 202 cpu_to_le16s(((struct hif_msg *)data)->len);
203 len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len);
204 ret = wfx_data_write(wdev, data, len);
205 if (ret)
206 goto end;
207
208 wdev->hif.tx_buffers_used++;
209 _trace_hif_send(hif, wdev->hif.tx_buffers_used);
210 end:
211 if (is_encrypted)
212 kfree(data);
213 }
214
---
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: 53964 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Jerome Pouiller <Jerome.Pouiller@silabs.com>,
devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S . Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'
Date: Tue, 12 May 2020 05:59:20 +0800 [thread overview]
Message-ID: <202005120533.A0Qs0Kff%lkp@intel.com> (raw)
In-Reply-To: <20200511154930.190212-14-Jerome.Pouiller@silabs.com>
[-- Attachment #1: Type: text/plain, Size: 5179 bytes --]
Hi Jerome,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20200511]
[cannot apply to v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jerome-Pouiller/staging-wfx-fix-support-for-big-endian-hosts/20200512-031750
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git ae73e7784871ebe2c43da619b4a1e2c9ff81508d
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
drivers/staging/wfx/bh.c: In function 'tx_helper':
>> drivers/staging/wfx/bh.c:202:39: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [-Wint-conversion]
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
include/uapi/linux/byteorder/big_endian.h:96:38: note: in definition of macro '__cpu_to_le16s'
96 | #define __cpu_to_le16s(x) __swab16s((x))
| ^
>> drivers/staging/wfx/bh.c:202:2: note: in expansion of macro 'cpu_to_le16s'
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
| ^~~~~~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
include/uapi/linux/swab.h:240:37: note: expected '__u16 *' {aka 'short unsigned int *'} but argument is of type 'u16' {aka 'short unsigned int'}
240 | static inline void __swab16s(__u16 *p)
| ~~~~~~~^
vim +/__swab16s +202 drivers/staging/wfx/bh.c
169
170 static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif)
171 {
172 int ret;
173 void *data;
174 bool is_encrypted = false;
175 size_t len = hif->len;
176
177 WARN(len < sizeof(*hif), "try to send corrupted data");
178
179 hif->seqnum = wdev->hif.tx_seqnum;
180 wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1);
181
182 if (wfx_is_secure_command(wdev, hif->id)) {
183 len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) +
184 sizeof(struct hif_sl_msg_hdr) +
185 sizeof(struct hif_sl_tag);
186 // AES support encryption in-place. However, mac80211 access to
187 // 802.11 header after frame was sent (to get MAC addresses).
188 // So, keep origin buffer clear.
189 data = kmalloc(len, GFP_KERNEL);
190 if (!data)
191 goto end;
192 is_encrypted = true;
193 ret = wfx_sl_encode(wdev, hif, data);
194 if (ret)
195 goto end;
196 } else {
197 data = hif;
198 }
199 WARN(len > wdev->hw_caps.size_inp_ch_buf,
200 "%s: request exceed WFx capability: %zu > %d\n", __func__,
201 len, wdev->hw_caps.size_inp_ch_buf);
> 202 cpu_to_le16s(((struct hif_msg *)data)->len);
203 len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len);
204 ret = wfx_data_write(wdev, data, len);
205 if (ret)
206 goto end;
207
208 wdev->hif.tx_buffers_used++;
209 _trace_hif_send(hif, wdev->hif.tx_buffers_used);
210 end:
211 if (is_encrypted)
212 kfree(data);
213 }
214
---
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: 53964 bytes --]
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 13/17] staging: wfx: fix endianness of the field 'len'
Date: Tue, 12 May 2020 05:59:20 +0800 [thread overview]
Message-ID: <202005120533.A0Qs0Kff%lkp@intel.com> (raw)
In-Reply-To: <20200511154930.190212-14-Jerome.Pouiller@silabs.com>
[-- Attachment #1: Type: text/plain, Size: 5296 bytes --]
Hi Jerome,
I love your patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20200511]
[cannot apply to v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Jerome-Pouiller/staging-wfx-fix-support-for-big-endian-hosts/20200512-031750
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git ae73e7784871ebe2c43da619b4a1e2c9ff81508d
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
drivers/staging/wfx/bh.c: In function 'tx_helper':
>> drivers/staging/wfx/bh.c:202:39: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [-Wint-conversion]
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
include/uapi/linux/byteorder/big_endian.h:96:38: note: in definition of macro '__cpu_to_le16s'
96 | #define __cpu_to_le16s(x) __swab16s((x))
| ^
>> drivers/staging/wfx/bh.c:202:2: note: in expansion of macro 'cpu_to_le16s'
202 | cpu_to_le16s(((struct hif_msg *)data)->len);
| ^~~~~~~~~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/m68k/include/uapi/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/m68k/include/asm/bitops.h:528,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/gpio/consumer.h:6,
from drivers/staging/wfx/bh.c:8:
include/uapi/linux/swab.h:240:37: note: expected '__u16 *' {aka 'short unsigned int *'} but argument is of type 'u16' {aka 'short unsigned int'}
240 | static inline void __swab16s(__u16 *p)
| ~~~~~~~^
vim +/__swab16s +202 drivers/staging/wfx/bh.c
169
170 static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif)
171 {
172 int ret;
173 void *data;
174 bool is_encrypted = false;
175 size_t len = hif->len;
176
177 WARN(len < sizeof(*hif), "try to send corrupted data");
178
179 hif->seqnum = wdev->hif.tx_seqnum;
180 wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1);
181
182 if (wfx_is_secure_command(wdev, hif->id)) {
183 len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) +
184 sizeof(struct hif_sl_msg_hdr) +
185 sizeof(struct hif_sl_tag);
186 // AES support encryption in-place. However, mac80211 access to
187 // 802.11 header after frame was sent (to get MAC addresses).
188 // So, keep origin buffer clear.
189 data = kmalloc(len, GFP_KERNEL);
190 if (!data)
191 goto end;
192 is_encrypted = true;
193 ret = wfx_sl_encode(wdev, hif, data);
194 if (ret)
195 goto end;
196 } else {
197 data = hif;
198 }
199 WARN(len > wdev->hw_caps.size_inp_ch_buf,
200 "%s: request exceed WFx capability: %zu > %d\n", __func__,
201 len, wdev->hw_caps.size_inp_ch_buf);
> 202 cpu_to_le16s(((struct hif_msg *)data)->len);
203 len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len);
204 ret = wfx_data_write(wdev, data, len);
205 if (ret)
206 goto end;
207
208 wdev->hif.tx_buffers_used++;
209 _trace_hif_send(hif, wdev->hif.tx_buffers_used);
210 end:
211 if (is_encrypted)
212 kfree(data);
213 }
214
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 53964 bytes --]
next prev parent reply other threads:[~2020-05-11 21:59 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 15:49 [PATCH 00/17] staging: wfx: fix support for big-endian hosts Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 01/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 02/17] staging: wfx: take advantage of le32_to_cpup() Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 03/17] staging: wfx: fix cast operator Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 04/17] staging: wfx: fix wrong bytes order Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 05/17] staging: wfx: fix output of rx_stats on big endian hosts Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 06/17] staging: wfx: fix endianness of fields media_delay and tx_queue_delay Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 07/17] staging: wfx: fix endianness of hif_req_read_mib fields Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 08/17] staging: wfx: fix access to le32 attribute 'ps_mode_error' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 09/17] staging: wfx: fix access to le32 attribute 'event_id' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 10/17] staging: wfx: fix access to le32 attribute 'indication_type' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 11/17] staging: wfx: declare the field 'packet_id' with native byte order Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 12/17] staging: wfx: fix endianness of the struct hif_ind_startup Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 13/17] staging: wfx: fix endianness of the field 'len' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 21:59 ` kbuild test robot [this message]
2020-05-11 21:59 ` kbuild test robot
2020-05-11 21:59 ` kbuild test robot
2020-05-12 7:43 ` Geert Uytterhoeven
2020-05-12 7:43 ` Geert Uytterhoeven
2020-05-12 9:25 ` Jérôme Pouiller
2020-05-12 9:25 ` Jérôme Pouiller
2020-05-11 15:49 ` [PATCH 14/17] staging: wfx: fix endianness of the field 'status' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 15/17] staging: wfx: fix endianness of the field 'num_tx_confs' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 16/17] staging: wfx: fix endianness of the field 'channel_number' Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
2020-05-11 15:49 ` [PATCH 17/17] staging: wfx: update TODO Jerome Pouiller
2020-05-11 15:49 ` Jerome Pouiller
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=202005120533.A0Qs0Kff%lkp@intel.com \
--to=lkp@intel.com \
--cc=Jerome.Pouiller@silabs.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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.