Re: [PATCH v3 6/6] soc: qcom: Allow COMPILE_TEST of qcom SoC Kconfigs

From: kbuild test robot
Date: Tue Jul 03 2018 - 11:11:51 EST


Hi Niklas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on agross/for-next]
[also build test ERROR on next-20180702]
[cannot apply to v4.18-rc3]
[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/Niklas-Cassel/soc-qcom-Allow-COMPILE_TEST-of-qcom-SoC-Kconfigs/20180703-173055
base: https://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git for-next
config: parisc-allmodconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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
GCC_VERSION=7.2.0 make.cross ARCH=parisc

All error/warnings (new ones prefixed by >>):

In file included from include/linux/interrupt.h:6:0,
from drivers//rpmsg/qcom_smd.c:7:
drivers//rpmsg/qcom_smd.c: In function 'qcom_smd_channel_open':
>> drivers//rpmsg/qcom_smd.c:817:36: error: 'SZ_4K' undeclared (first use in this function)
bb_size = min(channel->fifo_size, SZ_4K);
^
include/linux/kernel.h:812:40: note: in definition of macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:836:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:845:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> drivers//rpmsg/qcom_smd.c:817:12: note: in expansion of macro 'min'
bb_size = min(channel->fifo_size, SZ_4K);
^~~
drivers//rpmsg/qcom_smd.c:817:36: note: each undeclared identifier is reported only once for each function it appears in
bb_size = min(channel->fifo_size, SZ_4K);
^
include/linux/kernel.h:812:40: note: in definition of macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:836:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:845:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> drivers//rpmsg/qcom_smd.c:817:12: note: in expansion of macro 'min'
bb_size = min(channel->fifo_size, SZ_4K);
^~~
include/linux/kernel.h:836:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__safe_cmp(x, y), \
^
include/linux/kernel.h:845:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
>> drivers//rpmsg/qcom_smd.c:817:12: note: in expansion of macro 'min'
bb_size = min(channel->fifo_size, SZ_4K);
^~~

vim +/SZ_4K +817 drivers//rpmsg/qcom_smd.c

53e2822e Bjorn Andersson 2016-09-01 803
53e2822e Bjorn Andersson 2016-09-01 804 /*
53e2822e Bjorn Andersson 2016-09-01 805 * Helper for opening a channel
53e2822e Bjorn Andersson 2016-09-01 806 */
53e2822e Bjorn Andersson 2016-09-01 807 static int qcom_smd_channel_open(struct qcom_smd_channel *channel,
53e2822e Bjorn Andersson 2016-09-01 808 rpmsg_rx_cb_t cb)
53e2822e Bjorn Andersson 2016-09-01 809 {
268105fb Bjorn Andersson 2017-12-12 810 struct qcom_smd_edge *edge = channel->edge;
53e2822e Bjorn Andersson 2016-09-01 811 size_t bb_size;
268105fb Bjorn Andersson 2017-12-12 812 int ret;
53e2822e Bjorn Andersson 2016-09-01 813
53e2822e Bjorn Andersson 2016-09-01 814 /*
53e2822e Bjorn Andersson 2016-09-01 815 * Packets are maximum 4k, but reduce if the fifo is smaller
53e2822e Bjorn Andersson 2016-09-01 816 */
53e2822e Bjorn Andersson 2016-09-01 @817 bb_size = min(channel->fifo_size, SZ_4K);
53e2822e Bjorn Andersson 2016-09-01 818 channel->bounce_buffer = kmalloc(bb_size, GFP_KERNEL);
53e2822e Bjorn Andersson 2016-09-01 819 if (!channel->bounce_buffer)
53e2822e Bjorn Andersson 2016-09-01 820 return -ENOMEM;
53e2822e Bjorn Andersson 2016-09-01 821
53e2822e Bjorn Andersson 2016-09-01 822 qcom_smd_channel_set_callback(channel, cb);
53e2822e Bjorn Andersson 2016-09-01 823 qcom_smd_channel_set_state(channel, SMD_CHANNEL_OPENING);
268105fb Bjorn Andersson 2017-12-12 824
268105fb Bjorn Andersson 2017-12-12 825 /* Wait for remote to enter opening or opened */
268105fb Bjorn Andersson 2017-12-12 826 ret = wait_event_interruptible_timeout(channel->state_change_event,
268105fb Bjorn Andersson 2017-12-12 827 channel->remote_state == SMD_CHANNEL_OPENING ||
268105fb Bjorn Andersson 2017-12-12 828 channel->remote_state == SMD_CHANNEL_OPENED,
268105fb Bjorn Andersson 2017-12-12 829 HZ);
268105fb Bjorn Andersson 2017-12-12 830 if (!ret) {
268105fb Bjorn Andersson 2017-12-12 831 dev_err(&edge->dev, "remote side did not enter opening state\n");
268105fb Bjorn Andersson 2017-12-12 832 goto out_close_timeout;
268105fb Bjorn Andersson 2017-12-12 833 }
268105fb Bjorn Andersson 2017-12-12 834
53e2822e Bjorn Andersson 2016-09-01 835 qcom_smd_channel_set_state(channel, SMD_CHANNEL_OPENED);
53e2822e Bjorn Andersson 2016-09-01 836
268105fb Bjorn Andersson 2017-12-12 837 /* Wait for remote to enter opened */
268105fb Bjorn Andersson 2017-12-12 838 ret = wait_event_interruptible_timeout(channel->state_change_event,
268105fb Bjorn Andersson 2017-12-12 839 channel->remote_state == SMD_CHANNEL_OPENED,
268105fb Bjorn Andersson 2017-12-12 840 HZ);
268105fb Bjorn Andersson 2017-12-12 841 if (!ret) {
268105fb Bjorn Andersson 2017-12-12 842 dev_err(&edge->dev, "remote side did not enter open state\n");
268105fb Bjorn Andersson 2017-12-12 843 goto out_close_timeout;
268105fb Bjorn Andersson 2017-12-12 844 }
268105fb Bjorn Andersson 2017-12-12 845
53e2822e Bjorn Andersson 2016-09-01 846 return 0;
268105fb Bjorn Andersson 2017-12-12 847
268105fb Bjorn Andersson 2017-12-12 848 out_close_timeout:
268105fb Bjorn Andersson 2017-12-12 849 qcom_smd_channel_set_state(channel, SMD_CHANNEL_CLOSED);
268105fb Bjorn Andersson 2017-12-12 850 return -ETIMEDOUT;
53e2822e Bjorn Andersson 2016-09-01 851 }
53e2822e Bjorn Andersson 2016-09-01 852

:::::: The code at line 817 was first introduced by commit
:::::: 53e2822e56c7bc67e5dc19acb1e5fbb8ebff8614 rpmsg: Introduce Qualcomm SMD backend

:::::: TO: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
:::::: CC: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip