Re: [PATCH v4 3/6] can: ctucanfd: add support for CTU CAN FD open-source IP core - bus independent part.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on net-next/master sparc-next/master net/master linus/master v5.8 next-20200803]
[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/pisa-cmp-felk-cvut-cz/CTU-CAN-FD-open-source-IP-core-SocketCAN-driver-PCI-platform-integration-and-documentation/20200804-033027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

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

All warnings (new ones prefixed by >>):

   drivers/net/can/ctucanfd/ctu_can_fd.c: In function 'ctucan_chip_start':
>> drivers/net/can/ctucanfd/ctu_can_fd.c:198:46: warning: variable 'int_enamask_mask' set but not used [-Wunused-but-set-variable]
     198 |  union ctu_can_fd_int_stat int_ena, int_msk, int_enamask_mask;
         |                                              ^~~~~~~~~~~~~~~~

vim +/int_enamask_mask +198 drivers/net/can/ctucanfd/ctu_can_fd.c

   186	
   187	/**
   188	 * ctucan_chip_start - This the drivers start routine
   189	 * @ndev:	Pointer to net_device structure
   190	 *
   191	 * This is the drivers start routine.
   192	 *
   193	 * Return: 0 on success and failure value on error
   194	 */
   195	static int ctucan_chip_start(struct net_device *ndev)
   196	{
   197		struct ctucan_priv *priv = netdev_priv(ndev);
 > 198		union ctu_can_fd_int_stat int_ena, int_msk, int_enamask_mask;
   199		int err;
   200		struct can_ctrlmode mode;
   201	
   202		netdev_dbg(ndev, "ctucan_chip_start");
   203	
   204		err = ctucan_reset(ndev);
   205		if (err < 0)
   206			return err;
   207	
   208		priv->txb_prio = 0x01234567;
   209		priv->txb_head = 0;
   210		priv->txb_tail = 0;
   211		priv->p.write_reg(&priv->p, CTU_CAN_FD_TX_PRIORITY, priv->txb_prio);
   212	
   213		err = ctucan_set_bittiming(ndev);
   214		if (err < 0)
   215			return err;
   216	
   217		err = ctucan_set_data_bittiming(ndev);
   218		if (err < 0)
   219			return err;
   220	
   221		err = ctucan_set_secondary_sample_point(ndev);
   222		if (err < 0)
   223			return err;
   224	
   225		/* Enable interrupts */
   226		int_ena.u32 = 0;
   227		int_ena.s.rbnei = 1;
   228		int_ena.s.txbhci = 1;
   229	
   230		int_ena.s.ewli = 1;
   231		int_ena.s.fcsi = 1;
   232	
   233		int_enamask_mask.u32 = 0xFFFFFFFF;
   234	
   235		mode.flags = priv->can.ctrlmode;
   236		mode.mask = 0xFFFFFFFF;
   237		ctucan_hw_set_mode_reg(&priv->p, &mode);
   238	
   239		/* One shot mode supported indirectly via Retransmit limit */
   240		if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
   241			ctucan_hw_set_ret_limit(&priv->p, true, 0);
   242	
   243		/* Bus error reporting -> Allow Error interrupt */
   244		if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) {
   245			int_ena.s.ali = 1;
   246			int_ena.s.bei = 1;
   247		}
   248	
   249		int_msk.u32 = ~int_ena.u32; /* mask all disabled interrupts */
   250	
   251		/* It's after reset, so there is no need to clear anything */
   252		ctucan_hw_int_mask_set(&priv->p, int_msk);
   253		ctucan_hw_int_ena_set(&priv->p, int_ena);
   254	
   255		/* Controller enters ERROR_ACTIVE on initial FCSI */
   256		priv->can.state = CAN_STATE_STOPPED;
   257	
   258		/* Enable the controller */
   259		ctucan_hw_enable(&priv->p, true);
   260	
   261		return 0;
   262	}
   263	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux