xilinx_axienet_main.c:undefined reference to `of_address_to_resource'
by kernel test robot
Hi Robert,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 50987beca096a7ed4f453a6da245fd6a2fadedeb
commit: 57baf8cc70ea4cf5503c9d42f31f6a86d7f5ff1a net: axienet: Handle deferred probe on clock properly
date: 9 weeks ago
config: s390-randconfig-c023-20210414 (attached as .config)
compiler: s390-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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 57baf8cc70ea4cf5503c9d42f31f6a86d7f5ff1a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 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 errors (new ones prefixed by >>):
s390-linux-ld: drivers/net/arcnet/com90xx.o: in function `com90xx_exit':
com90xx.c:(.exit.text+0xe6): undefined reference to `iounmap'
s390-linux-ld: drivers/net/arcnet/com90xx.o: in function `check_mirror':
com90xx.c:(.init.text+0x4c): undefined reference to `ioremap'
s390-linux-ld: com90xx.c:(.init.text+0xa8): undefined reference to `iounmap'
s390-linux-ld: drivers/net/arcnet/com90xx.o: in function `com90xx_probe':
com90xx.c:(.init.text+0x1182): undefined reference to `ioremap'
s390-linux-ld: com90xx.c:(.init.text+0x15dc): undefined reference to `iounmap'
s390-linux-ld: com90xx.c:(.init.text+0x2234): undefined reference to `iounmap'
s390-linux-ld: com90xx.c:(.init.text+0x23b2): undefined reference to `iounmap'
s390-linux-ld: com90xx.c:(.init.text+0x26d6): undefined reference to `ioremap'
s390-linux-ld: com90xx.c:(.init.text+0x29ae): undefined reference to `iounmap'
s390-linux-ld: com90xx.c:(.init.text+0x2e28): undefined reference to `iounmap'
s390-linux-ld: drivers/net/arcnet/arc-rimi.o: in function `arc_rimi_exit':
arc-rimi.c:(.exit.text+0x50): undefined reference to `iounmap'
s390-linux-ld: drivers/net/arcnet/arc-rimi.o: in function `arc_rimi_init':
arc-rimi.c:(.init.text+0x5ca): undefined reference to `ioremap'
s390-linux-ld: arc-rimi.c:(.init.text+0x6c8): undefined reference to `iounmap'
s390-linux-ld: arc-rimi.c:(.init.text+0xac4): undefined reference to `iounmap'
s390-linux-ld: arc-rimi.c:(.init.text+0xc10): undefined reference to `ioremap'
s390-linux-ld: arc-rimi.c:(.init.text+0xeea): undefined reference to `iounmap'
s390-linux-ld: drivers/net/arcnet/arc-rimi.o: in function `check_mirror':
arc-rimi.c:(.text.unlikely+0x4c): undefined reference to `ioremap'
s390-linux-ld: arc-rimi.c:(.text.unlikely+0xa8): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/altera/altera_tse_main.o: in function `request_and_map':
altera_tse_main.c:(.text+0xe54): undefined reference to `devm_ioremap'
s390-linux-ld: drivers/net/ethernet/fujitsu/fmvj18x_cs.o: in function `fmvj18x_release':
fmvj18x_cs.c:(.text+0x10d2): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/fujitsu/fmvj18x_cs.o: in function `fmvj18x_config':
fmvj18x_cs.c:(.text+0x3096): undefined reference to `ioremap'
s390-linux-ld: fmvj18x_cs.c:(.text+0x3132): undefined reference to `iounmap'
s390-linux-ld: fmvj18x_cs.c:(.text+0x3896): undefined reference to `ioremap'
s390-linux-ld: fmvj18x_cs.c:(.text+0x3bba): undefined reference to `iounmap'
s390-linux-ld: fmvj18x_cs.c:(.text+0x3f62): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/xilinx/ll_temac_main.o: in function `temac_probe':
ll_temac_main.c:(.text+0x6044): undefined reference to `devm_platform_ioremap_resource_byname'
s390-linux-ld: ll_temac_main.c:(.text+0x63fc): undefined reference to `devm_of_iomap'
s390-linux-ld: ll_temac_main.c:(.text+0x65ee): undefined reference to `devm_platform_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/xilinx/ll_temac_mdio.o: in function `temac_mdio_setup':
ll_temac_mdio.c:(.text+0x3b0): undefined reference to `of_address_to_resource'
s390-linux-ld: drivers/net/ethernet/xilinx/xilinx_axienet_main.o: in function `axienet_probe':
>> xilinx_axienet_main.c:(.text+0x59dc): undefined reference to `of_address_to_resource'
s390-linux-ld: xilinx_axienet_main.c:(.text+0x5a18): undefined reference to `devm_ioremap_resource'
s390-linux-ld: xilinx_axienet_main.c:(.text+0x5b78): undefined reference to `devm_ioremap_resource'
s390-linux-ld: xilinx_axienet_main.c:(.text+0x6548): undefined reference to `devm_ioremap_resource'
s390-linux-ld: drivers/net/ethernet/xircom/xirc2ps_cs.o: in function `xirc2ps_release':
xirc2ps_cs.c:(.text+0x11e8): undefined reference to `iounmap'
s390-linux-ld: drivers/net/ethernet/xircom/xirc2ps_cs.o: in function `xirc2ps_config':
xirc2ps_cs.c:(.text+0x51ac): undefined reference to `ioremap'
s390-linux-ld: drivers/pcmcia/cistpl.o: in function `set_cis_map':
cistpl.c:(.text+0x8f2): undefined reference to `ioremap'
s390-linux-ld: cistpl.c:(.text+0xa12): undefined reference to `iounmap'
s390-linux-ld: cistpl.c:(.text+0xab4): undefined reference to `iounmap'
s390-linux-ld: cistpl.c:(.text+0xb24): undefined reference to `ioremap'
s390-linux-ld: drivers/pcmcia/cistpl.o: in function `release_cis_mem':
cistpl.c:(.text+0x2aea): undefined reference to `iounmap'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[PATCH] scsi: iscsi: fix boolreturn.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
drivers/scsi/libiscsi.c:1737:11-12: WARNING: return of 0/1 in function 'iscsi_eh_running' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: Mike Christie <michael.christie(a)oracle.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Mike-Christie/scsi-libicsi-and-q...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
libiscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1734,7 +1734,7 @@ static bool iscsi_eh_running(struct iscs
switch (ISCSI_TM_FUNC_VALUE(tmf)) {
case ISCSI_TM_FUNC_LOGICAL_UNIT_RESET:
if (sc->device->lun != scsilun_to_int(&tmf->lun))
- return 0;
+ return false;
ISCSI_DBG_EH(conn->session,
"Requeue cmd sent during LU RESET processing.\n");
1 year, 5 months
Re: [PATCH 1/2] iommu/sva: Tighten SVA bind API with explicit flags
by kernel test robot
Hi Jacob,
I love your patch! Yet something to improve:
[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on char-misc/char-misc-testing v5.12-rc7]
[cannot apply to iommu/next next-20210413]
[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/Jacob-Pan/iommu-sva-Tighten-SVA-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: x86_64-randconfig-a016-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/3b009446e2f451c401cff7a6d4766424a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jacob-Pan/iommu-sva-Tighten-SVA-bind-API-with-explicit-flags/20210409-094521
git checkout 3b009446e2f451c401cff7a6d4766424acbcc890
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/dma/idxd/init.c:307:10: error: use of undeclared identifier 'IOMMU_SVA_BIND_SUPERVISOR'
flags = IOMMU_SVA_BIND_SUPERVISOR;
^
drivers/dma/idxd/init.c:422:30: warning: shift count >= width of type [-Wshift-count-overflow]
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
drivers/dma/idxd/init.c:428:41: warning: shift count >= width of type [-Wshift-count-overflow]
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 1 error generated.
vim +/IOMMU_SVA_BIND_SUPERVISOR +307 drivers/dma/idxd/init.c
300
301 static int idxd_enable_system_pasid(struct idxd_device *idxd)
302 {
303 unsigned int flags;
304 unsigned int pasid;
305 struct iommu_sva *sva;
306
> 307 flags = IOMMU_SVA_BIND_SUPERVISOR;
308
309 sva = iommu_sva_bind_device(&idxd->pdev->dev, NULL, flags);
310 if (IS_ERR(sva)) {
311 dev_warn(&idxd->pdev->dev,
312 "iommu sva bind failed: %ld\n", PTR_ERR(sva));
313 return PTR_ERR(sva);
314 }
315
316 pasid = iommu_sva_get_pasid(sva);
317 if (pasid == IOMMU_PASID_INVALID) {
318 iommu_sva_unbind_device(sva);
319 return -ENODEV;
320 }
321
322 idxd->sva = sva;
323 idxd->pasid = pasid;
324 dev_dbg(&idxd->pdev->dev, "system pasid: %u\n", pasid);
325 return 0;
326 }
327
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 32/40] drivers/scsi/ibmvscsi/ibmvfc.c:2239:29: error: incompatible type for argument 2 of 'bsg_job_done'
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: 371aba37fb6c3e805a9b14467190c2956a509752
commit: eb65619c5ac2e1f9c9632d46b143524e3c2bb2cf [32/40] Use struct scsi_status
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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
# https://github.com/bvanassche/linux/commit/eb65619c5ac2e1f9c9632d46b14352...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout eb65619c5ac2e1f9c9632d46b143524e3c2bb2cf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_get_err_result':
drivers/scsi/ibmvscsi/ibmvfc.c:348:52: error: request for member 'combined' in something not a structure or union
348 | return rsp->scsi_status | (cmd_status[err].result.combined << 16);
| ^
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_request':
>> drivers/scsi/ibmvscsi/ibmvfc.c:2239:29: error: incompatible type for argument 2 of 'bsg_job_done'
2239 | bsg_job_done(job, bsg_reply->result,
| ~~~~~~~~~^~~~~~~~
| |
| struct scsi_status
In file included from drivers/scsi/ibmvscsi/ibmvfc.c:21:
include/linux/bsg-lib.h:65:44: note: expected 'int' but argument is of type 'struct scsi_status'
65 | void bsg_job_done(struct bsg_job *job, int result,
| ~~~~^~~~~~
vim +/bsg_job_done +2239 drivers/scsi/ibmvscsi/ibmvfc.c
d31429e1517c00 Brian King 2009-10-19 2103
d31429e1517c00 Brian King 2009-10-19 2104 /**
d31429e1517c00 Brian King 2009-10-19 2105 * ibmvfc_bsg_request - Handle a BSG request
75cc8cfc6e13d4 Johannes Thumshirn 2016-11-17 2106 * @job: struct bsg_job to be executed
d31429e1517c00 Brian King 2009-10-19 2107 *
d31429e1517c00 Brian King 2009-10-19 2108 * Returns:
d31429e1517c00 Brian King 2009-10-19 2109 * 0 on success / other on failure
d31429e1517c00 Brian King 2009-10-19 2110 **/
75cc8cfc6e13d4 Johannes Thumshirn 2016-11-17 2111 static int ibmvfc_bsg_request(struct bsg_job *job)
d31429e1517c00 Brian King 2009-10-19 2112 {
cd21c605b2cf1c Johannes Thumshirn 2016-11-17 2113 struct ibmvfc_host *vhost = shost_priv(fc_bsg_to_shost(job));
1d69b1222abcba Johannes Thumshirn 2016-11-17 2114 struct fc_rport *rport = fc_bsg_to_rport(job);
d31429e1517c00 Brian King 2009-10-19 2115 struct ibmvfc_passthru_mad *mad;
d31429e1517c00 Brian King 2009-10-19 2116 struct ibmvfc_event *evt;
d31429e1517c00 Brian King 2009-10-19 2117 union ibmvfc_iu rsp_iu;
d31429e1517c00 Brian King 2009-10-19 2118 unsigned long flags, port_id = -1;
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2119 struct fc_bsg_request *bsg_request = job->request;
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2120 struct fc_bsg_reply *bsg_reply = job->reply;
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2121 unsigned int code = bsg_request->msgcode;
d31429e1517c00 Brian King 2009-10-19 2122 int rc = 0, req_seg, rsp_seg, issue_login = 0;
d31429e1517c00 Brian King 2009-10-19 2123 u32 fc_flags, rsp_len;
d31429e1517c00 Brian King 2009-10-19 2124
d31429e1517c00 Brian King 2009-10-19 2125 ENTER;
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2126 bsg_reply->reply_payload_rcv_len = 0;
d31429e1517c00 Brian King 2009-10-19 2127 if (rport)
d31429e1517c00 Brian King 2009-10-19 2128 port_id = rport->port_id;
d31429e1517c00 Brian King 2009-10-19 2129
d31429e1517c00 Brian King 2009-10-19 2130 switch (code) {
d31429e1517c00 Brian King 2009-10-19 2131 case FC_BSG_HST_ELS_NOLOGIN:
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2132 port_id = (bsg_request->rqst_data.h_els.port_id[0] << 16) |
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2133 (bsg_request->rqst_data.h_els.port_id[1] << 8) |
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2134 bsg_request->rqst_data.h_els.port_id[2];
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 2135 fallthrough;
d31429e1517c00 Brian King 2009-10-19 2136 case FC_BSG_RPT_ELS:
d31429e1517c00 Brian King 2009-10-19 2137 fc_flags = IBMVFC_FC_ELS;
d31429e1517c00 Brian King 2009-10-19 2138 break;
d31429e1517c00 Brian King 2009-10-19 2139 case FC_BSG_HST_CT:
d31429e1517c00 Brian King 2009-10-19 2140 issue_login = 1;
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2141 port_id = (bsg_request->rqst_data.h_ct.port_id[0] << 16) |
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2142 (bsg_request->rqst_data.h_ct.port_id[1] << 8) |
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2143 bsg_request->rqst_data.h_ct.port_id[2];
df561f6688fef7 Gustavo A. R. Silva 2020-08-23 2144 fallthrough;
d31429e1517c00 Brian King 2009-10-19 2145 case FC_BSG_RPT_CT:
d31429e1517c00 Brian King 2009-10-19 2146 fc_flags = IBMVFC_FC_CT_IU;
d31429e1517c00 Brian King 2009-10-19 2147 break;
d31429e1517c00 Brian King 2009-10-19 2148 default:
d31429e1517c00 Brian King 2009-10-19 2149 return -ENOTSUPP;
f36cfe6a06572c Christopher Díaz Riveros 2018-01-17 2150 }
d31429e1517c00 Brian King 2009-10-19 2151
d31429e1517c00 Brian King 2009-10-19 2152 if (port_id == -1)
d31429e1517c00 Brian King 2009-10-19 2153 return -EINVAL;
d31429e1517c00 Brian King 2009-10-19 2154 if (!mutex_trylock(&vhost->passthru_mutex))
d31429e1517c00 Brian King 2009-10-19 2155 return -EBUSY;
d31429e1517c00 Brian King 2009-10-19 2156
d31429e1517c00 Brian King 2009-10-19 2157 job->dd_data = (void *)port_id;
d31429e1517c00 Brian King 2009-10-19 2158 req_seg = dma_map_sg(vhost->dev, job->request_payload.sg_list,
d31429e1517c00 Brian King 2009-10-19 2159 job->request_payload.sg_cnt, DMA_TO_DEVICE);
d31429e1517c00 Brian King 2009-10-19 2160
d31429e1517c00 Brian King 2009-10-19 2161 if (!req_seg) {
d31429e1517c00 Brian King 2009-10-19 2162 mutex_unlock(&vhost->passthru_mutex);
d31429e1517c00 Brian King 2009-10-19 2163 return -ENOMEM;
d31429e1517c00 Brian King 2009-10-19 2164 }
d31429e1517c00 Brian King 2009-10-19 2165
d31429e1517c00 Brian King 2009-10-19 2166 rsp_seg = dma_map_sg(vhost->dev, job->reply_payload.sg_list,
d31429e1517c00 Brian King 2009-10-19 2167 job->reply_payload.sg_cnt, DMA_FROM_DEVICE);
d31429e1517c00 Brian King 2009-10-19 2168
d31429e1517c00 Brian King 2009-10-19 2169 if (!rsp_seg) {
d31429e1517c00 Brian King 2009-10-19 2170 dma_unmap_sg(vhost->dev, job->request_payload.sg_list,
d31429e1517c00 Brian King 2009-10-19 2171 job->request_payload.sg_cnt, DMA_TO_DEVICE);
d31429e1517c00 Brian King 2009-10-19 2172 mutex_unlock(&vhost->passthru_mutex);
d31429e1517c00 Brian King 2009-10-19 2173 return -ENOMEM;
d31429e1517c00 Brian King 2009-10-19 2174 }
d31429e1517c00 Brian King 2009-10-19 2175
d31429e1517c00 Brian King 2009-10-19 2176 if (req_seg > 1 || rsp_seg > 1) {
d31429e1517c00 Brian King 2009-10-19 2177 rc = -EINVAL;
d31429e1517c00 Brian King 2009-10-19 2178 goto out;
d31429e1517c00 Brian King 2009-10-19 2179 }
d31429e1517c00 Brian King 2009-10-19 2180
d31429e1517c00 Brian King 2009-10-19 2181 if (issue_login)
d31429e1517c00 Brian King 2009-10-19 2182 rc = ibmvfc_bsg_plogi(vhost, port_id);
d31429e1517c00 Brian King 2009-10-19 2183
d31429e1517c00 Brian King 2009-10-19 2184 spin_lock_irqsave(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2185
d31429e1517c00 Brian King 2009-10-19 2186 if (unlikely(rc || (rport && (rc = fc_remote_port_chkready(rport)))) ||
d31429e1517c00 Brian King 2009-10-19 2187 unlikely((rc = ibmvfc_host_chkready(vhost)))) {
d31429e1517c00 Brian King 2009-10-19 2188 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2189 goto out;
d31429e1517c00 Brian King 2009-10-19 2190 }
d31429e1517c00 Brian King 2009-10-19 2191
e4b26f3db86498 Tyrel Datwyler 2021-01-06 2192 evt = ibmvfc_get_event(&vhost->crq);
d31429e1517c00 Brian King 2009-10-19 2193 ibmvfc_init_event(evt, ibmvfc_sync_completion, IBMVFC_MAD_FORMAT);
d31429e1517c00 Brian King 2009-10-19 2194 mad = &evt->iu.passthru;
d31429e1517c00 Brian King 2009-10-19 2195
d31429e1517c00 Brian King 2009-10-19 2196 memset(mad, 0, sizeof(*mad));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2197 mad->common.version = cpu_to_be32(1);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2198 mad->common.opcode = cpu_to_be32(IBMVFC_PASSTHRU);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2199 mad->common.length = cpu_to_be16(sizeof(*mad) - sizeof(mad->fc_iu) - sizeof(mad->iu));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2200
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2201 mad->cmd_ioba.va = cpu_to_be64(be64_to_cpu(evt->crq.ioba) +
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2202 offsetof(struct ibmvfc_passthru_mad, iu));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2203 mad->cmd_ioba.len = cpu_to_be32(sizeof(mad->iu));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2204
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2205 mad->iu.cmd_len = cpu_to_be32(job->request_payload.payload_len);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2206 mad->iu.rsp_len = cpu_to_be32(job->reply_payload.payload_len);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2207 mad->iu.flags = cpu_to_be32(fc_flags);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2208 mad->iu.cancel_key = cpu_to_be32(IBMVFC_PASSTHRU_CANCEL_KEY);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2209
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2210 mad->iu.cmd.va = cpu_to_be64(sg_dma_address(job->request_payload.sg_list));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2211 mad->iu.cmd.len = cpu_to_be32(sg_dma_len(job->request_payload.sg_list));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2212 mad->iu.rsp.va = cpu_to_be64(sg_dma_address(job->reply_payload.sg_list));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2213 mad->iu.rsp.len = cpu_to_be32(sg_dma_len(job->reply_payload.sg_list));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2214 mad->iu.scsi_id = cpu_to_be64(port_id);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2215 mad->iu.tag = cpu_to_be64((u64)evt);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2216 rsp_len = be32_to_cpu(mad->iu.rsp.len);
d31429e1517c00 Brian King 2009-10-19 2217
d31429e1517c00 Brian King 2009-10-19 2218 evt->sync_iu = &rsp_iu;
d31429e1517c00 Brian King 2009-10-19 2219 init_completion(&evt->comp);
d31429e1517c00 Brian King 2009-10-19 2220 rc = ibmvfc_send_event(evt, vhost, 0);
d31429e1517c00 Brian King 2009-10-19 2221 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2222
d31429e1517c00 Brian King 2009-10-19 2223 if (rc) {
d31429e1517c00 Brian King 2009-10-19 2224 rc = -EIO;
d31429e1517c00 Brian King 2009-10-19 2225 goto out;
d31429e1517c00 Brian King 2009-10-19 2226 }
d31429e1517c00 Brian King 2009-10-19 2227
d31429e1517c00 Brian King 2009-10-19 2228 wait_for_completion(&evt->comp);
d31429e1517c00 Brian King 2009-10-19 2229
d31429e1517c00 Brian King 2009-10-19 2230 if (rsp_iu.passthru.common.status)
d31429e1517c00 Brian King 2009-10-19 2231 rc = -EIO;
d31429e1517c00 Brian King 2009-10-19 2232 else
01e0e15c8b3b32 Johannes Thumshirn 2016-11-17 2233 bsg_reply->reply_payload_rcv_len = rsp_len;
d31429e1517c00 Brian King 2009-10-19 2234
d31429e1517c00 Brian King 2009-10-19 2235 spin_lock_irqsave(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2236 ibmvfc_free_event(evt);
d31429e1517c00 Brian King 2009-10-19 2237 spin_unlock_irqrestore(vhost->host->host_lock, flags);
eb65619c5ac2e1 Bart Van Assche 2021-04-09 2238 bsg_reply->result.combined = rc;
06548160dfecd1 Johannes Thumshirn 2016-11-17 @2239 bsg_job_done(job, bsg_reply->result,
1abaede71560fa Johannes Thumshirn 2016-11-17 2240 bsg_reply->reply_payload_rcv_len);
d31429e1517c00 Brian King 2009-10-19 2241 rc = 0;
d31429e1517c00 Brian King 2009-10-19 2242 out:
d31429e1517c00 Brian King 2009-10-19 2243 dma_unmap_sg(vhost->dev, job->request_payload.sg_list,
d31429e1517c00 Brian King 2009-10-19 2244 job->request_payload.sg_cnt, DMA_TO_DEVICE);
d31429e1517c00 Brian King 2009-10-19 2245 dma_unmap_sg(vhost->dev, job->reply_payload.sg_list,
d31429e1517c00 Brian King 2009-10-19 2246 job->reply_payload.sg_cnt, DMA_FROM_DEVICE);
d31429e1517c00 Brian King 2009-10-19 2247 mutex_unlock(&vhost->passthru_mutex);
d31429e1517c00 Brian King 2009-10-19 2248 LEAVE;
d31429e1517c00 Brian King 2009-10-19 2249 return rc;
d31429e1517c00 Brian King 2009-10-19 2250 }
d31429e1517c00 Brian King 2009-10-19 2251
:::::: The code at line 2239 was first introduced by commit
:::::: 06548160dfecd1983ffd9d6795242a5cda095da5 scsi: fc: use bsg_job_done
:::::: TO: Johannes Thumshirn <jthumshirn(a)suse.de>
:::::: CC: Martin K. Petersen <martin.petersen(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[thierryreding:for-5.13/work 14/47] drivers/gpu/drm/tegra/uapi/../drm.h:89:1: error: attempted to randomize userland API struct tegra_drm_client_ops
by kernel test robot
tree: https://github.com/thierryreding/linux for-5.13/work
head: b2ea517f55a84b7036d299279e4fc672fd91c156
commit: ef115cdee2e880114a4f934ce8d6c38e98d3dba9 [14/47] drm/tegra: Implement new UAPI
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
# https://github.com/thierryreding/linux/commit/ef115cdee2e880114a4f934ce8d...
git remote add thierryreding https://github.com/thierryreding/linux
git fetch --no-tags thierryreding for-5.13/work
git checkout ef115cdee2e880114a4f934ce8d6c38e98d3dba9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
In file included from drivers/gpu/drm/tegra/uapi/uapi.c:12:
>> drivers/gpu/drm/tegra/uapi/../drm.h:89:1: error: attempted to randomize userland API struct tegra_drm_client_ops
89 | };
| ^
vim +89 drivers/gpu/drm/tegra/uapi/../drm.h
d43f81cbaf4353 drivers/gpu/host1x/drm/drm.h Terje Bergstrom 2013-03-22 79
53fa7f7204c97d drivers/gpu/host1x/drm/drm.h Thierry Reding 2013-09-24 80 struct tegra_drm_client_ops {
53fa7f7204c97d drivers/gpu/host1x/drm/drm.h Thierry Reding 2013-09-24 81 int (*open_channel)(struct tegra_drm_client *client,
c88c363072c6dc drivers/gpu/host1x/drm/drm.h Thierry Reding 2013-09-26 82 struct tegra_drm_context *context);
c88c363072c6dc drivers/gpu/host1x/drm/drm.h Thierry Reding 2013-09-26 83 void (*close_channel)(struct tegra_drm_context *context);
c40f0f1afcb1dc drivers/gpu/drm/tegra/drm.h Thierry Reding 2013-10-10 84 int (*is_addr_reg)(struct device *dev, u32 class, u32 offset);
0f563a4bf66e51 drivers/gpu/drm/tegra/drm.h Dmitry Osipenko 2017-06-15 85 int (*is_valid_class)(u32 class);
c88c363072c6dc drivers/gpu/host1x/drm/drm.h Thierry Reding 2013-09-26 86 int (*submit)(struct tegra_drm_context *context,
d43f81cbaf4353 drivers/gpu/host1x/drm/drm.h Terje Bergstrom 2013-03-22 87 struct drm_tegra_submit *args, struct drm_device *drm,
d43f81cbaf4353 drivers/gpu/host1x/drm/drm.h Terje Bergstrom 2013-03-22 88 struct drm_file *file);
d43f81cbaf4353 drivers/gpu/host1x/drm/drm.h Terje Bergstrom 2013-03-22 @89 };
d43f81cbaf4353 drivers/gpu/host1x/drm/drm.h Terje Bergstrom 2013-03-22 90
:::::: The code at line 89 was first introduced by commit
:::::: d43f81cbaf43531a977e8b4c4427f19acf8a5061 drm/tegra: Add gr2d device
:::::: TO: Terje Bergstrom <tbergstrom(a)nvidia.com>
:::::: CC: Thierry Reding <thierry.reding(a)avionic-design.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[hwmon:hwmon-next 30/32] drivers/hwmon/sch5627.c:439:79: sparse: sparse: Using plain integer as NULL pointer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
head: 56940c97f6e59864a807cc19db7d6fd120bff340
commit: 4564645d213f1101f5afaff6c9cf9ec2620234d4 [30/32] hwmon: (sch5627) Convert to hwmon_device_register_with_info()
config: i386-randconfig-s002-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/...
git remote add hwmon https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
git fetch --no-tags hwmon hwmon-next
git checkout 4564645d213f1101f5afaff6c9cf9ec2620234d4
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/hwmon/sch5627.c:439:79: sparse: sparse: Using plain integer as NULL pointer
vim +439 drivers/hwmon/sch5627.c
337
338 static int sch5627_probe(struct platform_device *pdev)
339 {
340 struct sch5627_data *data;
341 int err, build_code, build_id, hwmon_rev, val;
342
343 data = devm_kzalloc(&pdev->dev, sizeof(struct sch5627_data),
344 GFP_KERNEL);
345 if (!data)
346 return -ENOMEM;
347
348 data->addr = platform_get_resource(pdev, IORESOURCE_IO, 0)->start;
349 mutex_init(&data->update_lock);
350 platform_set_drvdata(pdev, data);
351
352 val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_HWMON_ID);
353 if (val < 0) {
354 err = val;
355 goto error;
356 }
357 if (val != SCH5627_HWMON_ID) {
358 pr_err("invalid %s id: 0x%02X (expected 0x%02X)\n", "hwmon",
359 val, SCH5627_HWMON_ID);
360 err = -ENODEV;
361 goto error;
362 }
363
364 val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_COMPANY_ID);
365 if (val < 0) {
366 err = val;
367 goto error;
368 }
369 if (val != SCH5627_COMPANY_ID) {
370 pr_err("invalid %s id: 0x%02X (expected 0x%02X)\n", "company",
371 val, SCH5627_COMPANY_ID);
372 err = -ENODEV;
373 goto error;
374 }
375
376 val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_PRIMARY_ID);
377 if (val < 0) {
378 err = val;
379 goto error;
380 }
381 if (val != SCH5627_PRIMARY_ID) {
382 pr_err("invalid %s id: 0x%02X (expected 0x%02X)\n", "primary",
383 val, SCH5627_PRIMARY_ID);
384 err = -ENODEV;
385 goto error;
386 }
387
388 build_code = sch56xx_read_virtual_reg(data->addr,
389 SCH5627_REG_BUILD_CODE);
390 if (build_code < 0) {
391 err = build_code;
392 goto error;
393 }
394
395 build_id = sch56xx_read_virtual_reg16(data->addr,
396 SCH5627_REG_BUILD_ID);
397 if (build_id < 0) {
398 err = build_id;
399 goto error;
400 }
401
402 hwmon_rev = sch56xx_read_virtual_reg(data->addr,
403 SCH5627_REG_HWMON_REV);
404 if (hwmon_rev < 0) {
405 err = hwmon_rev;
406 goto error;
407 }
408
409 val = sch56xx_read_virtual_reg(data->addr, SCH5627_REG_CTRL);
410 if (val < 0) {
411 err = val;
412 goto error;
413 }
414 data->control = val;
415 if (!(data->control & 0x01)) {
416 pr_err("hardware monitoring not enabled\n");
417 err = -ENODEV;
418 goto error;
419 }
420 /* Trigger a Vbat voltage measurement, so that we get a valid reading
421 the first time we read Vbat */
422 sch56xx_write_virtual_reg(data->addr, SCH5627_REG_CTRL,
423 data->control | 0x10);
424 data->last_battery = jiffies;
425
426 /*
427 * Read limits, we do this only once as reading a register on
428 * the sch5627 is quite expensive (and they don't change).
429 */
430 err = sch5627_read_limits(data);
431 if (err)
432 goto error;
433
434 pr_info("found %s chip at %#hx\n", DEVNAME, data->addr);
435 pr_info("firmware build: code 0x%02X, id 0x%04X, hwmon: rev 0x%02X\n",
436 build_code, build_id, hwmon_rev);
437
438 data->hwmon_dev = hwmon_device_register_with_info(&pdev->dev, DEVNAME, data,
> 439 &sch5627_chip_info, 0);
440 if (IS_ERR(data->hwmon_dev)) {
441 err = PTR_ERR(data->hwmon_dev);
442 data->hwmon_dev = NULL;
443 goto error;
444 }
445
446 /* Note failing to register the watchdog is not a fatal error */
447 data->watchdog = sch56xx_watchdog_register(&pdev->dev, data->addr,
448 (build_code << 24) | (build_id << 8) | hwmon_rev,
449 &data->update_lock, 1);
450
451 return 0;
452
453 error:
454 sch5627_remove(pdev);
455 return err;
456 }
457
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months