Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro
by Andy Shevchenko
On Fri, Jun 19, 2020 at 10:02 AM Syed Nayyar Waris <syednwaris(a)gmail.com> wrote:
...
> > config: sparc64-randconfig-s032-20200615 (attached as .config)
> > compiler: sparc64-linux-gcc (GCC) 9.3.0
> > reproduce:
> > # apt-get install sparse
> > # sparse version: v0.6.2-rc1-3-g55607964-dirty
> > # save the attached .config to linux build tree
> > make W=1 C=1 ARCH=sparc64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
...
> > sparse warnings: (new ones prefixed by >>)
> >
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > include/linux/bitmap.h:594:63: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:639:45: sparse: sparse: shift too big (64) for type unsigned long
> > >> include/linux/bitmap.h:638:17: sparse: sparse: invalid access past the end of 'old' (8 8)
> It seems to me that to reproduce this warning, I have to use the
> sparc64 compiler. I have installed 'sparc64-linux-gnu-gcc' on my
> computer.
Sparse is not a compiler.
> I have to specify that this compiler needs to be used for build
> process. How/ Where do I specify this?
>
> I have downloaded the config.gz (has config file) and placed it at the
> root of the linux kernel project tree. But the Makefile STILL has
> 'gcc' as the compiler. When I build, it is the 'gcc' compiler being
> used and not 'sparc64-linux-gnu-gcc'. I know I can manually change the
> Makefile to use sparc64 compiler, but I think there must be some more
> elegant way to do this, perhaps using make menuconfig?
If you wish to run a compilation, download a compiler from [1], and,
after adding its bin/ folder to PATH, run
make CROSS_COMPILE=sparc64-linux- ARCH=sparc64 ... # first generate .config
> Kindly illuminate as to how shall I reproduce the compiler warning.
> > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @638 map[index + 1] &= ~BITMAP_LAST_WORD_MASK(start + nbits);
> > 803024b6c8a375 Syed Nayyar Waris 2020-06-15 @639 map[index + 1] |= (value >> space);
Hmm... I think I sent a reply [2] where I explained how space can be
64. Do you agree with analysis?
[1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/
[2]: https://lore.kernel.org/lkml/20200616081428.GP2428291@smile.fi.intel.com/
--
With Best Regards,
Andy Shevchenko
2 years, 3 months
arch/riscv/include/asm/irqflags.h:22:9: sparse: sparse: context imbalance in 'cm_queue_work_unlock' - unexpected unlock
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e857ce6eae7ca21b2055cca4885545e29228fe2
commit: e83f195aa45c1ffd73b3a950a887e41c260cf194 RDMA/cm: Pull duplicated code into cm_queue_work_unlock()
date: 5 weeks ago
config: riscv-randconfig-s032-20200619 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-18-g27caae40-dirty
git checkout e83f195aa45c1ffd73b3a950a887e41c260cf194
# save the attached .config to linux build tree
make W=1 C=1 ARCH=riscv CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/infiniband/core/cm.c:1297:21: sparse: sparse: cast from restricted __be32
>> arch/riscv/include/asm/irqflags.h:22:9: sparse: sparse: context imbalance in 'cm_queue_work_unlock' - unexpected unlock
drivers/infiniband/core/cm.c:2043:12: sparse: sparse: context imbalance in 'cm_req_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2422:12: sparse: sparse: context imbalance in 'cm_rep_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2533:12: sparse: sparse: context imbalance in 'cm_establish_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2556:12: sparse: sparse: context imbalance in 'cm_rtu_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2770:12: sparse: sparse: context imbalance in 'cm_dreq_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2847:12: sparse: sparse: context imbalance in 'cm_drep_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:2995:12: sparse: sparse: context imbalance in 'cm_rej_handler' - wrong count at exit
drivers/infiniband/core/cm.c:3153:12: sparse: sparse: context imbalance in 'cm_mra_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:3271:12: sparse: sparse: context imbalance in 'cm_lap_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:3360:12: sparse: sparse: context imbalance in 'cm_apr_handler' - different lock contexts for basic block
drivers/infiniband/core/cm.c:3405:12: sparse: sparse: context imbalance in 'cm_timewait_handler' - different lock contexts for basic block
vim +/cm_queue_work_unlock +22 arch/riscv/include/asm/irqflags.h
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 18
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 19 /* unconditionally enable interrupts */
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 20 static inline void arch_local_irq_enable(void)
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 21 {
a4c3733d32a72f1 Christoph Hellwig 2019-10-28 @22 csr_set(CSR_STATUS, SR_IE);
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 23 }
6d60b6ee0c9777b Palmer Dabbelt 2017-07-10 24
:::::: The code at line 22 was first introduced by commit
:::::: a4c3733d32a72f11dee86d0731d7565aa6ebe22d riscv: abstract out CSR names for supervisor vs machine mode
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Paul Walmsley <paul.walmsley(a)sifive.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[omap-audio:peter/ti-linux-5.4.y/wip 6067/9999] drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c:25:5: warning: no previous prototype for 'rpmsg_kdrv_demo_get_data'
by kernel test robot
tree: https://github.com/omap-audio/linux-audio peter/ti-linux-5.4.y/wip
head: d4ea716deb5cae567d7ffb483c1cc6a18ca0d3ba
commit: c93833f581c6f435afc85f394178caf8948b5baf [6067/9999] rpmsg-kdrv: add access APIs from virtual drivers
config: nds32-randconfig-r004-20200619 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c93833f581c6f435afc85f394178caf8948b5baf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c:25:5: warning: no previous prototype for 'rpmsg_kdrv_demo_get_data' [-Wmissing-prototypes]
25 | int rpmsg_kdrv_demo_get_data(struct rpmsg_remotedev *rdev, void *data, ssize_t len)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c:41:5: warning: no previous prototype for 'rpmsg_kdrv_demo_ping' [-Wmissing-prototypes]
41 | int rpmsg_kdrv_demo_ping(struct rpmsg_remotedev *rdev, void *ping_data, ssize_t ping_len)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c:92:5: warning: no previous prototype for 'rpmsg_kdrv_demo_c2s_message' [-Wmissing-prototypes]
92 | int rpmsg_kdrv_demo_c2s_message(struct rpmsg_remotedev *rdev, void *c2s_msg_data, ssize_t len)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/rpmsg_kdrv_demo_get_data +25 drivers/rpmsg-kdrv/rpmsg_kdrv_demo.c
24
> 25 int rpmsg_kdrv_demo_get_data(struct rpmsg_remotedev *rdev, void *data, ssize_t len)
26 {
27 struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
28
29 if (!data)
30 if (!len)
31 return priv->data_len;
32 else
33 return -EINVAL;
34 else if (len < priv->data_len)
35 return -EINVAL;
36
37 memcpy(data, priv->data, priv->data_len);
38 return priv->data_len;
39 }
40
> 41 int rpmsg_kdrv_demo_ping(struct rpmsg_remotedev *rdev, void *ping_data, ssize_t ping_len)
42 {
43 struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
44 struct rpmsg_kdrv_device *kddev = priv->kddev;
45 struct rpmsg_device *rpdev = kddev->rpdev;
46 struct rpmsg_kdrv_demodev_ping_request *req;
47 struct rpmsg_kdrv_demodev_ping_response *resp;
48 int ret;
49
50 if (!ping_len)
51 return 0;
52
53 if (ping_len > RPMSG_KDRV_TP_DEMODEV_MESSAGE_DATA_LEN)
54 return -EINVAL;
55
56 req = devm_kzalloc(&kddev->dev, sizeof(*req), GFP_KERNEL);
57 if (!req)
58 return -ENOMEM;
59
60 resp = devm_kzalloc(&kddev->dev, sizeof(*resp), GFP_KERNEL);
61 if (!resp) {
62 devm_kfree(&kddev->dev, req);
63 return -ENOMEM;
64 }
65
66 req->header.message_type = RPMSG_KDRV_TP_DEMODEV_PING_REQUEST;
67 memcpy(req->data, ping_data, ping_len);
68
69 ret = rpmsg_kdrv_send_request_with_response(rpdev, kddev->device_id, req, sizeof(*req),
70 resp, sizeof(*resp));
71 if (ret) {
72 dev_err(&kddev->dev, "%s: rpmsg_kdrv_send_request_with_response\n", __func__);
73 goto out;
74 }
75
76
77 if (resp->header.message_type != RPMSG_KDRV_TP_DEMODEV_PING_RESPONSE) {
78 dev_err(&kddev->dev, "%s: wrong response type\n", __func__);
79 ret = -EIO;
80 goto out;
81 }
82
83
84 memcpy(ping_data, resp->data, RPMSG_KDRV_TP_DEMODEV_MESSAGE_DATA_LEN);
85
86 out:
87 devm_kfree(&kddev->dev, req);
88 devm_kfree(&kddev->dev, resp);
89 return ret;
90 }
91
> 92 int rpmsg_kdrv_demo_c2s_message(struct rpmsg_remotedev *rdev, void *c2s_msg_data, ssize_t len)
93 {
94 struct rpmsg_kdrv_demo_private *priv = container_of(rdev, struct rpmsg_kdrv_demo_private, rdev);
95 struct rpmsg_kdrv_device *kddev = priv->kddev;
96 struct rpmsg_device *rpdev = kddev->rpdev;
97 struct rpmsg_kdrv_demodev_c2s_message *msg;
98 int ret;
99
100 if (!len)
101 return 0;
102
103 if (len > RPMSG_KDRV_TP_DEMODEV_MESSAGE_DATA_LEN)
104 return -EINVAL;
105
106 msg = devm_kzalloc(&kddev->dev, sizeof(*msg), GFP_KERNEL);
107 if (!msg)
108 return -ENOMEM;
109
110
111 msg->header.message_type = RPMSG_KDRV_TP_DEMODEV_C2S_MESSAGE;
112 memcpy(msg->data, c2s_msg_data, len);
113
114 ret = rpmsg_kdrv_send_message(rpdev, kddev->device_id, msg, sizeof(*msg));
115 if (ret)
116 dev_err(&kddev->dev, "%s: rpmsg_kdrv_send_message\n", __func__);
117
118 devm_kfree(&kddev->dev, msg);
119 return ret;
120 }
121
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 2/2] net: dsa: qca8k: introduce SGMII configuration options
by Dan Carpenter
Hi Jonathan,
url: https://github.com/0day-ci/linux/commits/Jonathan-McDowell/net-dsa-qca8k-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-randconfig-m021-20200618 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/dsa/qca8k.c:438 qca8k_setup_sgmii() error: uninitialized symbol 'mode'.
# https://github.com/0day-ci/linux/commit/27dd896d27e5048d2c402879fb04f6e23...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 27dd896d27e5048d2c402879fb04f6e23536ea72
vim +/mode +438 drivers/net/dsa/qca8k.c
27dd896d27e5048 Jonathan McDowell 2020-06-05 421 static int
27dd896d27e5048 Jonathan McDowell 2020-06-05 422 qca8k_setup_sgmii(struct qca8k_priv *priv)
27dd896d27e5048 Jonathan McDowell 2020-06-05 423 {
27dd896d27e5048 Jonathan McDowell 2020-06-05 424 const char *mode;
^^^^
27dd896d27e5048 Jonathan McDowell 2020-06-05 425 u32 val;
27dd896d27e5048 Jonathan McDowell 2020-06-05 426
27dd896d27e5048 Jonathan McDowell 2020-06-05 427 val = qca8k_read(priv, QCA8K_REG_SGMII_CTRL);
27dd896d27e5048 Jonathan McDowell 2020-06-05 428
27dd896d27e5048 Jonathan McDowell 2020-06-05 429 val |= QCA8K_SGMII_EN_PLL | QCA8K_SGMII_EN_RX |
27dd896d27e5048 Jonathan McDowell 2020-06-05 430 QCA8K_SGMII_EN_TX | QCA8K_SGMII_EN_SD;
27dd896d27e5048 Jonathan McDowell 2020-06-05 431
27dd896d27e5048 Jonathan McDowell 2020-06-05 432 if (of_property_read_bool(priv->dev->of_node, "sgmii-delay"))
27dd896d27e5048 Jonathan McDowell 2020-06-05 433 val |= QCA8K_SGMII_CLK125M_DELAY;
27dd896d27e5048 Jonathan McDowell 2020-06-05 434
27dd896d27e5048 Jonathan McDowell 2020-06-05 435 if (of_property_read_string(priv->dev->of_node, "sgmii-mode", &mode)) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This if condition is reversed.
27dd896d27e5048 Jonathan McDowell 2020-06-05 436 val &= ~QCA8K_SGMII_MODE_CTRL_MASK;
27dd896d27e5048 Jonathan McDowell 2020-06-05 437
27dd896d27e5048 Jonathan McDowell 2020-06-05 @438 if (!strcasecmp(mode, "basex")) {
27dd896d27e5048 Jonathan McDowell 2020-06-05 439 val |= QCA8K_SGMII_MODE_CTRL_BASEX;
27dd896d27e5048 Jonathan McDowell 2020-06-05 440 } else if (!strcasecmp(mode, "mac")) {
27dd896d27e5048 Jonathan McDowell 2020-06-05 441 val |= QCA8K_SGMII_MODE_CTRL_MAC;
27dd896d27e5048 Jonathan McDowell 2020-06-05 442 } else if (!strcasecmp(mode, "phy")) {
27dd896d27e5048 Jonathan McDowell 2020-06-05 443 val |= QCA8K_SGMII_MODE_CTRL_PHY;
27dd896d27e5048 Jonathan McDowell 2020-06-05 444 } else {
27dd896d27e5048 Jonathan McDowell 2020-06-05 445 pr_err("Unrecognised SGMII mode %s\n", mode);
27dd896d27e5048 Jonathan McDowell 2020-06-05 446 return -EINVAL;
27dd896d27e5048 Jonathan McDowell 2020-06-05 447 }
27dd896d27e5048 Jonathan McDowell 2020-06-05 448 }
27dd896d27e5048 Jonathan McDowell 2020-06-05 449
27dd896d27e5048 Jonathan McDowell 2020-06-05 450 qca8k_write(priv, QCA8K_REG_SGMII_CTRL, val);
27dd896d27e5048 Jonathan McDowell 2020-06-05 451
27dd896d27e5048 Jonathan McDowell 2020-06-05 452 return 0;
27dd896d27e5048 Jonathan McDowell 2020-06-05 453 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/staging/wfx/fwio.c:88:7: note: in expansion of macro 'virt_addr_valid'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5e857ce6eae7ca21b2055cca4885545e29228fe2
commit: 652b4afb240e5dc196995597942309e89e89c767 staging: wfx: load firmware
date: 9 months ago
config: m68k-randconfig-r004-20200619 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 652b4afb240e5dc196995597942309e89e89c767
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/staging/wfx/fwio.c:83:5: warning: no previous prototype for 'sram_write_dma_safe' [-Wmissing-prototypes]
83 | int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)
| ^~~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/page.h:49,
from arch/m68k/include/asm/thread_info.h:6,
from include/linux/thread_info.h:38,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/firmware.h:7,
from drivers/staging/wfx/fwio.c:8:
drivers/staging/wfx/fwio.c: In function 'sram_write_dma_safe':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && | ^~
>> drivers/staging/wfx/fwio.c:88:7: note: in expansion of macro 'virt_addr_valid'
88 | if (!virt_addr_valid(buf)) {
| ^~~~~~~~~~~~~~~
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && | ^~
drivers/staging/wfx/fwio.c:96:7: note: in expansion of macro 'virt_addr_valid'
96 | if (!virt_addr_valid(buf))
| ^~~~~~~~~~~~~~~
drivers/staging/wfx/fwio.c: At top level:
drivers/staging/wfx/fwio.c:101:5: warning: no previous prototype for 'get_firmware' [-Wmissing-prototypes]
101 | int get_firmware(struct wfx_dev *wdev, u32 keyset_chip,
| ^~~~~~~~~~~~
drivers/staging/wfx/fwio.c:229:5: warning: no previous prototype for 'load_firmware_secure' [-Wmissing-prototypes]
229 | int load_firmware_secure(struct wfx_dev *wdev)
| ^~~~~~~~~~~~~~~~~~~~
vim +/virt_addr_valid +88 drivers/staging/wfx/fwio.c
71
72 /*
73 * request_firmware() allocate data using vmalloc(). It is not compatible with
74 * underlying hardware that use DMA. Function below detect this case and
75 * allocate a bounce buffer if necessary.
76 *
77 * Notice that, in doubt, you can enable CONFIG_DEBUG_SG to ask kernel to
78 * detect this problem at runtime (else, kernel silently fail).
79 *
80 * NOTE: it may also be possible to use 'pages' from struct firmware and avoid
81 * bounce buffer
82 */
83 int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len)
84 {
85 int ret;
86 const u8 *tmp;
87
> 88 if (!virt_addr_valid(buf)) {
89 tmp = kmemdup(buf, len, GFP_KERNEL);
90 if (!tmp)
91 return -ENOMEM;
92 } else {
93 tmp = buf;
94 }
95 ret = sram_buf_write(wdev, addr, tmp, len);
96 if (!virt_addr_valid(buf))
97 kfree(tmp);
98 return ret;
99 }
100
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[sashal-linux-stable:queue-5.4 171/194] arch/mips/mm/dma-noncoherent.c:36:7: error: 'CPU_LOONGSON2EF' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: b4001462a35a736ae9775784796ae0be700db254
commit: e303fb358e55829f315ac501b46d63808f2fa9d4 [171/194] MIPS: CPU_LOONGSON2EF need software to maintain cache consistency
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e303fb358e55829f315ac501b46d63808f2fa9d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/mips/mm/dma-noncoherent.c: In function 'cpu_needs_post_dma_flush':
>> arch/mips/mm/dma-noncoherent.c:36:7: error: 'CPU_LOONGSON2EF' undeclared (first use in this function); did you mean 'CPU_LOONGSON2'?
36 | case CPU_LOONGSON2EF:
| ^~~~~~~~~~~~~~~
| CPU_LOONGSON2
arch/mips/mm/dma-noncoherent.c:36:7: note: each undeclared identifier is reported only once for each function it appears in
vim +36 arch/mips/mm/dma-noncoherent.c
16
17 /*
18 * The affected CPUs below in 'cpu_needs_post_dma_flush()' can speculatively
19 * fill random cachelines with stale data at any time, requiring an extra
20 * flush post-DMA.
21 *
22 * Warning on the terminology - Linux calls an uncached area coherent; MIPS
23 * terminology calls memory areas with hardware maintained coherency coherent.
24 *
25 * Note that the R14000 and R16000 should also be checked for in this condition.
26 * However this function is only called on non-I/O-coherent systems and only the
27 * R10000 and R12000 are used in such systems, the SGI IP28 Indigo² rsp.
28 * SGI IP32 aka O2.
29 */
30 static inline bool cpu_needs_post_dma_flush(struct device *dev)
31 {
32 switch (boot_cpu_type()) {
33 case CPU_R10000:
34 case CPU_R12000:
35 case CPU_BMIPS5000:
> 36 case CPU_LOONGSON2EF:
37 return true;
38 default:
39 /*
40 * Presence of MAARs suggests that the CPU supports
41 * speculatively prefetching data, and therefore requires
42 * the post-DMA flush/invalidate.
43 */
44 return cpu_has_maar;
45 }
46 }
47
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH net-next v8 4/5] net: dp83869: Add RGMII internal delay configuration
by kernel test robot
Hi Dan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/RGMII-Internal-delay-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git cb8e59cc87201af93dfbb6c3dccc8fcad72a09c2
config: s390-randconfig-r014-20200618 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | ^
In file included from drivers/net/phy/dp83869.c:6:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | ^
In file included from drivers/net/phy/dp83869.c:6:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : ^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/net/phy/dp83869.c:6:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:492:45: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu(__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/net/phy/dp83869.c:6:
In file included from include/linux/ethtool.h:18:
In file included from include/uapi/linux/ethtool.h:19:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:11:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:72:
include/asm-generic/io.h:503:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:513:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew(cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:523:46: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel(cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:585:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:593:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:601:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:610:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:619:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:628:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/net/phy/dp83869.c:103:18: warning: unused variable 'dp83869_internal_delay' [-Wunused-const-variable]
static const int dp83869_internal_delay[] = {250, 500, 750, 1000, 1250, 1500,
^
21 warnings generated.
vim +/dp83869_internal_delay +103 drivers/net/phy/dp83869.c
102
> 103 static const int dp83869_internal_delay[] = {250, 500, 750, 1000, 1250, 1500,
104 1750, 2000, 2250, 2500, 2750, 3000,
105 3250, 3500, 3750, 4000};
106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH v6 23/36] drm: vmwgfx: fix common struct sg_table related issues
by kernel test robot
Hi Marek,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200618]
[also build test ERROR on v5.8-rc1]
[cannot apply to linuxtv-media/master staging/staging-testing drm-exynos/exynos-drm-next drm-intel/for-linux-next linus/master v5.8-rc1 v5.7 v5.7-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Marek-Szyprowski/DRM-fix-struct-...
base: ce2cc8efd7a40cbd17841add878cb691d0ce0bba
config: x86_64-rhel-7.6 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 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(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c: In function 'vmw_ttm_unmap_from_dma':
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:365:31: error: incompatible type for argument 2 of 'dma_unmap_sgtable'
365 | dma_unmap_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
| ~~~~~~^~~~~
| |
| struct sg_table
In file included from include/linux/dma-buf.h:20,
from drivers/gpu/drm/vmwgfx/ttm_object.h:40,
from drivers/gpu/drm/vmwgfx/ttm_lock.h:55,
from drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:44,
from drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:28:
include/linux/dma-mapping.h:651:75: note: expected 'struct sg_table *' but argument is of type 'struct sg_table'
651 | static inline void dma_unmap_sgtable(struct device *dev, struct sg_table *sgt,
| ~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c: In function 'vmw_ttm_map_for_dma':
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:386:36: error: incompatible type for argument 2 of 'dma_map_sgtable'
386 | return dma_map_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
| ~~~~~~^~~~~
| |
| struct sg_table
In file included from include/linux/dma-buf.h:20,
from drivers/gpu/drm/vmwgfx/ttm_object.h:40,
from drivers/gpu/drm/vmwgfx/ttm_lock.h:55,
from drivers/gpu/drm/vmwgfx/vmwgfx_drv.h:44,
from drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:28:
include/linux/dma-mapping.h:628:72: note: expected 'struct sg_table *' but argument is of type 'struct sg_table'
628 | static inline int dma_map_sgtable(struct device *dev, struct sg_table *sgt,
| ~~~~~~~~~~~~~~~~~^~~
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:387:1: warning: control reaches end of non-void function [-Wreturn-type]
387 | }
| ^
vim +/dma_unmap_sgtable +365 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
352
353 /**
354 * vmw_ttm_unmap_from_dma - unmap device addresses previsouly mapped for
355 * TTM pages
356 *
357 * @vmw_tt: Pointer to a struct vmw_ttm_backend
358 *
359 * Used to free dma mappings previously mapped by vmw_ttm_map_for_dma.
360 */
361 static void vmw_ttm_unmap_from_dma(struct vmw_ttm_tt *vmw_tt)
362 {
363 struct device *dev = vmw_tt->dev_priv->dev->dev;
364
> 365 dma_unmap_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
366 vmw_tt->sgt.nents = vmw_tt->sgt.orig_nents;
367 }
368
369 /**
370 * vmw_ttm_map_for_dma - map TTM pages to get device addresses
371 *
372 * @vmw_tt: Pointer to a struct vmw_ttm_backend
373 *
374 * This function is used to get device addresses from the kernel DMA layer.
375 * However, it's violating the DMA API in that when this operation has been
376 * performed, it's illegal for the CPU to write to the pages without first
377 * unmapping the DMA mappings, or calling dma_sync_sg_for_cpu(). It is
378 * therefore only legal to call this function if we know that the function
379 * dma_sync_sg_for_cpu() is a NOP, and dma_sync_sg_for_device() is at most
380 * a CPU write buffer flush.
381 */
382 static int vmw_ttm_map_for_dma(struct vmw_ttm_tt *vmw_tt)
383 {
384 struct device *dev = vmw_tt->dev_priv->dev->dev;
385
> 386 return dma_map_sgtable(dev, vmw_tt->sgt, DMA_BIDIRECTIONAL, 0);
> 387 }
388
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months