public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kashyap Desai <kashyap.desai@broadcom.com>, linux-scsi@vger.kernel.org
Cc: kbuild-all@lists.01.org,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	sathya.prakash@broadcom.com
Subject: Re: [PATCH v2 02/24] mpi3mr: base driver code
Date: Wed, 7 Apr 2021 12:17:51 +0800	[thread overview]
Message-ID: <202104071200.n9fDMYDN-lkp@intel.com> (raw)
In-Reply-To: <20210407020451.924822-3-kashyap.desai@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 9535 bytes --]

Hi Kashyap,

I love your patch! Yet something to improve:

[auto build test ERROR on e09481c55ba7346ab725f41891e1bb61729dda00]

url:    https://github.com/0day-ci/linux/commits/Kashyap-Desai/Introducing-mpi3mr-driver/20210407-100619
base:   e09481c55ba7346ab725f41891e1bb61729dda00
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/a8eb9c746b98316c9c916b835394ba7c5f50add3
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kashyap-Desai/Introducing-mpi3mr-driver/20210407-100619
        git checkout a8eb9c746b98316c9c916b835394ba7c5f50add3
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/scsi/mpi3mr/mpi3mr_fw.c: In function 'mpi3mr_isr':
   drivers/scsi/mpi3mr/mpi3mr_fw.c:315:6: warning: variable 'midx' set but not used [-Wunused-but-set-variable]
     315 |  u16 midx;
         |      ^~~~
   drivers/scsi/mpi3mr/mpi3mr_fw.c:314:21: warning: variable 'mrioc' set but not used [-Wunused-but-set-variable]
     314 |  struct mpi3mr_ioc *mrioc;
         |                     ^~~~~
   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:16,
                    from arch/x86/include/asm/percpu.h:27,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from include/linux/blkdev.h:5,
                    from drivers/scsi/mpi3mr/mpi3mr.h:13,
                    from drivers/scsi/mpi3mr/mpi3mr_fw.c:10:
   drivers/scsi/mpi3mr/mpi3mr_fw.c: In function 'mpi3mr_process_factsdata':
   include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
      12 | #define KERN_WARNING KERN_SOH "4" /* warning conditions */
         |                      ^~~~~~~~
   include/linux/printk.h:353:9: note: in expansion of macro 'KERN_WARNING'
     353 |  printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/scsi/mpi3mr/mpi3mr_debug.h:49:2: note: in expansion of macro 'pr_warn'
      49 |  pr_warn("%s: " fmt, (ioc)->name, ##__VA_ARGS__)
         |  ^~~~~~~
   drivers/scsi/mpi3mr/mpi3mr_fw.c:933:3: note: in expansion of macro 'ioc_warn'
     933 |   ioc_warn(mrioc,
         |   ^~~~~~~~
   drivers/scsi/mpi3mr/mpi3mr_fw.c:934:49: note: format string is defined here
     934 |       "IOCFactsdata length mismatch driver_sz(%ld) firmware_sz(%d)\n",
         |                                               ~~^
         |                                                 |
         |                                                 long int
         |                                               %d
   drivers/scsi/mpi3mr/mpi3mr_fw.c: In function 'mpi3mr_init_ioc':
>> drivers/scsi/mpi3mr/mpi3mr_fw.c:1476:14: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
    1476 |  base_info = readq(&mrioc->sysif_regs->IOCInformation);
         |              ^~~~~
         |              readl
   cc1: some warnings being treated as errors


vim +1476 drivers/scsi/mpi3mr/mpi3mr_fw.c

  1437	
  1438	/**
  1439	 * mpi3mr_init_ioc - Initialize the controller
  1440	 * @mrioc: Adapter instance reference
  1441	 *
  1442	 * This the controller initialization routine, executed either
  1443	 * after soft reset or from pci probe callback.
  1444	 * Setup the required resources, memory map the controller
  1445	 * registers, create admin and operational reply queue pairs,
  1446	 * allocate required memory for reply pool, sense buffer pool,
  1447	 * issue IOC init request to the firmware, unmask the events and
  1448	 * issue port enable to discover SAS/SATA/NVMe devies and RAID
  1449	 * volumes.
  1450	 *
  1451	 * Return: 0 on success and non-zero on failure.
  1452	 */
  1453	int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc)
  1454	{
  1455		int retval = 0;
  1456		enum mpi3mr_iocstate ioc_state;
  1457		u64 base_info;
  1458		u32 timeout;
  1459		u32 ioc_status, ioc_config;
  1460		Mpi3IOCFactsData_t facts_data;
  1461	
  1462		mrioc->change_count = 0;
  1463		mrioc->cpu_count = num_online_cpus();
  1464		retval = mpi3mr_setup_resources(mrioc);
  1465		if (retval) {
  1466			ioc_err(mrioc, "Failed to setup resources:error %d\n",
  1467			    retval);
  1468			goto out_nocleanup;
  1469		}
  1470		ioc_status = readl(&mrioc->sysif_regs->IOCStatus);
  1471		ioc_config = readl(&mrioc->sysif_regs->IOCConfiguration);
  1472	
  1473		ioc_info(mrioc, "SOD status %x configuration %x\n",
  1474		    ioc_status, ioc_config);
  1475	
> 1476		base_info = readq(&mrioc->sysif_regs->IOCInformation);
  1477		ioc_info(mrioc, "SOD base_info %llx\n",	base_info);
  1478	
  1479		/*The timeout value is in 2sec unit, changing it to seconds*/
  1480		mrioc->ready_timeout =
  1481		    ((base_info & MPI3_SYSIF_IOC_INFO_LOW_TIMEOUT_MASK) >>
  1482		    MPI3_SYSIF_IOC_INFO_LOW_TIMEOUT_SHIFT) * 2;
  1483	
  1484		ioc_info(mrioc, "IOC ready timeout %d\n", mrioc->ready_timeout);
  1485	
  1486		ioc_state = mpi3mr_get_iocstate(mrioc);
  1487		ioc_info(mrioc, "IOC in %s state during detection\n",
  1488		    mpi3mr_iocstate_name(ioc_state));
  1489	
  1490		if (ioc_state == MRIOC_STATE_BECOMING_READY ||
  1491				ioc_state == MRIOC_STATE_RESET_REQUESTED) {
  1492			timeout = mrioc->ready_timeout * 10;
  1493			do {
  1494				msleep(100);
  1495			} while (--timeout);
  1496	
  1497			ioc_state = mpi3mr_get_iocstate(mrioc);
  1498			ioc_info(mrioc,
  1499				"IOC in %s state after waiting for reset time\n",
  1500				mpi3mr_iocstate_name(ioc_state));
  1501		}
  1502	
  1503		if (ioc_state == MRIOC_STATE_READY) {
  1504			retval = mpi3mr_issue_and_process_mur(mrioc,
  1505			    MPI3MR_RESET_FROM_BRINGUP);
  1506			if (retval) {
  1507				ioc_err(mrioc, "Failed to MU reset IOC error %d\n",
  1508				    retval);
  1509			}
  1510			ioc_state = mpi3mr_get_iocstate(mrioc);
  1511		}
  1512		if (ioc_state != MRIOC_STATE_RESET) {
  1513			mpi3mr_print_fault_info(mrioc);
  1514			retval = mpi3mr_issue_reset(mrioc,
  1515			    MPI3_SYSIF_HOST_DIAG_RESET_ACTION_SOFT_RESET,
  1516			    MPI3MR_RESET_FROM_BRINGUP);
  1517			if (retval) {
  1518				ioc_err(mrioc,
  1519				    "%s :Failed to soft reset IOC error %d\n",
  1520				    __func__, retval);
  1521				goto out_failed;
  1522			}
  1523		}
  1524		ioc_state = mpi3mr_get_iocstate(mrioc);
  1525		if (ioc_state != MRIOC_STATE_RESET) {
  1526			ioc_err(mrioc, "Cannot bring IOC to reset state\n");
  1527			goto out_failed;
  1528		}
  1529	
  1530		retval = mpi3mr_setup_admin_qpair(mrioc);
  1531		if (retval) {
  1532			ioc_err(mrioc, "Failed to setup admin Qs: error %d\n",
  1533			    retval);
  1534			goto out_failed;
  1535		}
  1536	
  1537		retval = mpi3mr_bring_ioc_ready(mrioc);
  1538		if (retval) {
  1539			ioc_err(mrioc, "Failed to bring ioc ready: error %d\n",
  1540			    retval);
  1541			goto out_failed;
  1542		}
  1543	
  1544		retval = mpi3mr_setup_isr(mrioc, 1);
  1545		if (retval) {
  1546			ioc_err(mrioc, "Failed to setup ISR error %d\n",
  1547			    retval);
  1548			goto out_failed;
  1549		}
  1550	
  1551		retval = mpi3mr_issue_iocfacts(mrioc, &facts_data);
  1552		if (retval) {
  1553			ioc_err(mrioc, "Failed to Issue IOC Facts %d\n",
  1554			    retval);
  1555			goto out_failed;
  1556		}
  1557	
  1558		mpi3mr_process_factsdata(mrioc, &facts_data);
  1559		retval = mpi3mr_check_reset_dma_mask(mrioc);
  1560		if (retval) {
  1561			ioc_err(mrioc, "Resetting dma mask failed %d\n",
  1562			    retval);
  1563			goto out_failed;
  1564		}
  1565	
  1566		retval = mpi3mr_alloc_reply_sense_bufs(mrioc);
  1567		if (retval) {
  1568			ioc_err(mrioc,
  1569			    "%s :Failed to allocated reply sense buffers %d\n",
  1570			    __func__, retval);
  1571			goto out_failed;
  1572		}
  1573	
  1574		retval = mpi3mr_alloc_chain_bufs(mrioc);
  1575		if (retval) {
  1576			ioc_err(mrioc, "Failed to allocated chain buffers %d\n",
  1577			    retval);
  1578			goto out_failed;
  1579		}
  1580	
  1581		retval = mpi3mr_issue_iocinit(mrioc);
  1582		if (retval) {
  1583			ioc_err(mrioc, "Failed to Issue IOC Init %d\n",
  1584			    retval);
  1585			goto out_failed;
  1586		}
  1587		mrioc->reply_free_queue_host_index = mrioc->num_reply_bufs;
  1588		writel(mrioc->reply_free_queue_host_index,
  1589		    &mrioc->sysif_regs->ReplyFreeHostIndex);
  1590	
  1591		mrioc->sbq_host_index = mrioc->num_sense_bufs;
  1592		writel(mrioc->sbq_host_index,
  1593		    &mrioc->sysif_regs->SenseBufferFreeHostIndex);
  1594	
  1595		retval = mpi3mr_setup_isr(mrioc, 0);
  1596		if (retval) {
  1597			ioc_err(mrioc, "Failed to re-setup ISR, error %d\n",
  1598			    retval);
  1599			goto out_failed;
  1600		}
  1601	
  1602		return retval;
  1603	
  1604	out_failed:
  1605		mpi3mr_cleanup_ioc(mrioc);
  1606	out_nocleanup:
  1607		return retval;
  1608	}
  1609	

---
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: 64690 bytes --]

  reply	other threads:[~2021-04-07  4:18 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07  2:04 [PATCH v2 00/24] Introducing mpi3mr driver Kashyap Desai
2021-04-07  2:04 ` [PATCH v2 01/24] mpi3mr: add mpi30 Rev-R headers and Kconfig Kashyap Desai
2021-04-15 10:30   ` Tomas Henzl
2021-04-15 20:31   ` Bart Van Assche
2021-04-16 10:53     ` Kashyap Desai
2021-04-16 15:40       ` Bart Van Assche
2021-04-19 10:20         ` Kashyap Desai
2021-04-20  6:33           ` Christoph Hellwig
2021-04-23 13:18             ` Kashyap Desai
2021-04-07  2:04 ` [PATCH v2 02/24] mpi3mr: base driver code Kashyap Desai
2021-04-07  4:17   ` kernel test robot [this message]
2021-04-07  4:33   ` kernel test robot
2021-04-07  2:04 ` [PATCH v2 03/24] mpi3mr: create operational request and reply queue pair Kashyap Desai
2021-04-15 10:35   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 04/24] mpi3mr: add support of queue command processing Kashyap Desai
2021-04-15 10:36   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 05/24] mpi3mr: add support of internal watchdog thread Kashyap Desai
2021-04-15 10:37   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 06/24] mpi3mr: add support of event handling part-1 Kashyap Desai
2021-04-15 10:40   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 07/24] mpi3mr: add support of event handling pcie devices part-2 Kashyap Desai
2021-04-15 11:10   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 08/24] mpi3mr: add support of event handling part-3 Kashyap Desai
2021-04-15 11:11   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 09/24] mpi3mr: add support for recovering controller Kashyap Desai
2021-04-15 11:21   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 10/24] mpi3mr: add support of timestamp sync with firmware Kashyap Desai
2021-04-15 11:22   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 11/24] mpi3mr: print ioc info for debugging Kashyap Desai
2021-04-15 11:55   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 12/24] mpi3mr: add bios_param shost template hook Kashyap Desai
2021-04-15 11:56   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 13/24] mpi3mr: implement scsi error handler hooks Kashyap Desai
2021-04-07  2:04 ` [PATCH v2 14/24] mpi3mr: add change queue depth support Kashyap Desai
2021-04-15 12:16   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 15/24] mpi3mr: allow certain commands during pci-remove hook Kashyap Desai
2021-04-15 12:19   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 16/24] mpi3mr: hardware workaround for UNMAP commands to nvme drives Kashyap Desai
2021-04-15 12:20   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 17/24] mpi3mr: add support of threaded isr Kashyap Desai
2021-04-15 12:22   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 18/24] mpi3mr: add complete support of soft reset Kashyap Desai
2021-04-15 12:32   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 19/24] mpi3mr: print pending host ios for debug Kashyap Desai
2021-04-15 12:43   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 20/24] mpi3mr: wait for pending IO completions upon detection of VD IO timeout Kashyap Desai
2021-04-15 12:45   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 21/24] mpi3mr: add support of PM suspend and resume Kashyap Desai
2021-04-15 12:46   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 22/24] mpi3mr: add support of DSN secure fw check Kashyap Desai
2021-04-15 12:48   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 23/24] mpi3mr: add eedp dif dix support Kashyap Desai
2021-04-15 12:50   ` Tomas Henzl
2021-04-07  2:04 ` [PATCH v2 24/24] mpi3mr: add event handling debug prints Kashyap Desai
2021-04-15 12:52   ` Tomas Henzl

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=202104071200.n9fDMYDN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sathya.prakash@broadcom.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox