Hi Vaibhav,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v5.8-rc5]
[cannot apply to scsi/for-next mkp-scsi/for-next next-20200717]
[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/Vaibhav-Gupta/scsi-use-generic-p...
base: 11ba468877bb23f28956a35e896356252d63c983
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
ed6b578040a85977026c93bf4188f996148f3218)
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
# 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 warnings (new ones prefixed by >>):
> drivers/scsi/pmcraid.c:5274:6: warning: variable 'rc' is
used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (sizeof(dma_addr_t) == 4 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/pmcraid.c:5278:6: note: uninitialized use occurs here
if (rc == 0)
^~
drivers/scsi/pmcraid.c:5274:2: note: remove the 'if' if its condition is always
true
if (sizeof(dma_addr_t) == 4 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/pmcraid.c:5270:8: note: initialize the variable 'rc' to silence
this warning
int rc;
^
= 0
1 warning generated.
vim +5274 drivers/scsi/pmcraid.c
89a36810415077 Anil Ravindranath 2009-08-25 5258
89a36810415077 Anil Ravindranath 2009-08-25 5259 /**
89a36810415077 Anil Ravindranath 2009-08-25 5260 * pmcraid_resume - driver resume entry
point PCI power management
7e38e77fcc9088 Vaibhav Gupta 2020-07-17 5261 * @dev: Device structure
89a36810415077 Anil Ravindranath 2009-08-25 5262 *
89a36810415077 Anil Ravindranath 2009-08-25 5263 * Return Value - 0 in case of success.
Error code in case of any failure
89a36810415077 Anil Ravindranath 2009-08-25 5264 */
7e38e77fcc9088 Vaibhav Gupta 2020-07-17 5265 static int __maybe_unused
pmcraid_resume(struct device *dev)
89a36810415077 Anil Ravindranath 2009-08-25 5266 {
7e38e77fcc9088 Vaibhav Gupta 2020-07-17 5267 struct pci_dev *pdev =
to_pci_dev(dev);
89a36810415077 Anil Ravindranath 2009-08-25 5268 struct pmcraid_instance *pinstance =
pci_get_drvdata(pdev);
89a36810415077 Anil Ravindranath 2009-08-25 5269 struct Scsi_Host *host =
pinstance->host;
89a36810415077 Anil Ravindranath 2009-08-25 5270 int rc;
89a36810415077 Anil Ravindranath 2009-08-25 5271
7e38e77fcc9088 Vaibhav Gupta 2020-07-17 5272 device_wakeup_disable(dev);
89a36810415077 Anil Ravindranath 2009-08-25 5273
371a6c328ad423 Christoph Hellwig 2018-10-18 @5274 if (sizeof(dma_addr_t) == 4 ||
371a6c328ad423 Christoph Hellwig 2018-10-18 5275 dma_set_mask(&pdev->dev,
DMA_BIT_MASK(64)))
371a6c328ad423 Christoph Hellwig 2018-10-18 5276 rc = dma_set_mask(&pdev->dev,
DMA_BIT_MASK(32));
89a36810415077 Anil Ravindranath 2009-08-25 5277
89a36810415077 Anil Ravindranath 2009-08-25 5278 if (rc == 0)
371a6c328ad423 Christoph Hellwig 2018-10-18 5279 rc =
dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
89a36810415077 Anil Ravindranath 2009-08-25 5280
89a36810415077 Anil Ravindranath 2009-08-25 5281 if (rc != 0) {
348764024f1cd6 Anil Ravindranath 2009-09-09 5282 dev_err(&pdev->dev,
"resume: Failed to set PCI DMA mask\n");
89a36810415077 Anil Ravindranath 2009-08-25 5283 goto disable_device;
89a36810415077 Anil Ravindranath 2009-08-25 5284 }
89a36810415077 Anil Ravindranath 2009-08-25 5285
c20c426732a5a5 Anil Ravindranath 2010-06-08 5286 pmcraid_disable_interrupts(pinstance,
~0);
89a36810415077 Anil Ravindranath 2009-08-25 5287
atomic_set(&pinstance->outstanding_cmds, 0);
89a36810415077 Anil Ravindranath 2009-08-25 5288 rc =
pmcraid_register_interrupt_handler(pinstance);
89a36810415077 Anil Ravindranath 2009-08-25 5289
89a36810415077 Anil Ravindranath 2009-08-25 5290 if (rc) {
348764024f1cd6 Anil Ravindranath 2009-09-09 5291 dev_err(&pdev->dev,
348764024f1cd6 Anil Ravindranath 2009-09-09 5292 "resume: couldn't register
interrupt handlers\n");
89a36810415077 Anil Ravindranath 2009-08-25 5293 rc = -ENODEV;
89a36810415077 Anil Ravindranath 2009-08-25 5294 goto release_host;
89a36810415077 Anil Ravindranath 2009-08-25 5295 }
89a36810415077 Anil Ravindranath 2009-08-25 5296
89a36810415077 Anil Ravindranath 2009-08-25 5297 pmcraid_init_tasklets(pinstance);
89a36810415077 Anil Ravindranath 2009-08-25 5298 pmcraid_enable_interrupts(pinstance,
PMCRAID_PCI_INTERRUPTS);
89a36810415077 Anil Ravindranath 2009-08-25 5299
89a36810415077 Anil Ravindranath 2009-08-25 5300 /* Start with hard reset sequence
which brings up IOA to operational
89a36810415077 Anil Ravindranath 2009-08-25 5301 * state as well as completes the
reset sequence.
89a36810415077 Anil Ravindranath 2009-08-25 5302 */
89a36810415077 Anil Ravindranath 2009-08-25 5303 pinstance->ioa_hard_reset = 1;
89a36810415077 Anil Ravindranath 2009-08-25 5304
89a36810415077 Anil Ravindranath 2009-08-25 5305 /* Start IOA firmware initialization
and bring card to Operational
89a36810415077 Anil Ravindranath 2009-08-25 5306 * state.
89a36810415077 Anil Ravindranath 2009-08-25 5307 */
89a36810415077 Anil Ravindranath 2009-08-25 5308 if (pmcraid_reset_bringup(pinstance))
{
348764024f1cd6 Anil Ravindranath 2009-09-09 5309 dev_err(&pdev->dev,
"couldn't initialize IOA\n");
89a36810415077 Anil Ravindranath 2009-08-25 5310 rc = -ENODEV;
89a36810415077 Anil Ravindranath 2009-08-25 5311 goto release_tasklets;
89a36810415077 Anil Ravindranath 2009-08-25 5312 }
89a36810415077 Anil Ravindranath 2009-08-25 5313
89a36810415077 Anil Ravindranath 2009-08-25 5314 return 0;
89a36810415077 Anil Ravindranath 2009-08-25 5315
89a36810415077 Anil Ravindranath 2009-08-25 5316 release_tasklets:
c20c426732a5a5 Anil Ravindranath 2010-06-08 5317 pmcraid_disable_interrupts(pinstance,
~0);
89a36810415077 Anil Ravindranath 2009-08-25 5318 pmcraid_kill_tasklets(pinstance);
89a36810415077 Anil Ravindranath 2009-08-25 5319
pmcraid_unregister_interrupt_handler(pinstance);
89a36810415077 Anil Ravindranath 2009-08-25 5320
89a36810415077 Anil Ravindranath 2009-08-25 5321 release_host:
89a36810415077 Anil Ravindranath 2009-08-25 5322 scsi_host_put(host);
89a36810415077 Anil Ravindranath 2009-08-25 5323
89a36810415077 Anil Ravindranath 2009-08-25 5324 disable_device:
89a36810415077 Anil Ravindranath 2009-08-25 5325
89a36810415077 Anil Ravindranath 2009-08-25 5326 return rc;
89a36810415077 Anil Ravindranath 2009-08-25 5327 }
89a36810415077 Anil Ravindranath 2009-08-25 5328
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org