[mkl-can-next:at91 1/1] drivers/net/can/at91_can.c:566:29: error: 'mask' undeclared; did you mean 'msr'?

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git at91
head:   4733a29d8b7eae57f42de5539aa46c7c0abbeb24
commit: 4733a29d8b7eae57f42de5539aa46c7c0abbeb24 [1/1] can: at91_can: switch to rx-fifo implementation
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 4733a29d8b7eae57f42de5539aa46c7c0abbeb24
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/net/can/at91_can.c: In function 'at91_mailbox_read':
>> drivers/net/can/at91_can.c:566:29: error: 'mask' undeclared (first use in this function); did you mean 'msr'?
     at91_write(priv, AT91_TCR, mask);
                                ^~~~
                                msr
   drivers/net/can/at91_can.c:566:29: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/can/at91_can.c: In function 'at91_irq':
   drivers/net/can/at91_can.c:892:3: error: 'ret' undeclared (first use in this function); did you mean 'net'?
      ret = can_rx_offload_irq_offload_timestamp(&priv->offload,
      ^~~
      net
   drivers/net/can/at91_can.c:892:53: error: 'struct at91_priv' has no member named 'offload'; did you mean 'rx_offload'?
      ret = can_rx_offload_irq_offload_timestamp(&priv->offload,
                                                        ^~~~~~~
                                                        rx_offload
   drivers/net/can/at91_can.c: In function 'at91_can_probe':
   drivers/net/can/at91_can.c:1154:19: error: 'struct can_rx_offload' has no member named 'low_first'; did you mean 'mb_first'?
     priv->rx_offload.low_first = devtype_data->rx_first;
                      ^~~~~~~~~
                      mb_first
   drivers/net/can/at91_can.c:1155:19: error: 'struct can_rx_offload' has no member named 'high_first'; did you mean 'mb_first'?
     priv->rx_offload.high_first = devtype_data->rx_split;
                      ^~~~~~~~~~
                      mb_first
   drivers/net/can/at91_can.c:1156:19: error: 'struct can_rx_offload' has no member named 'high_last'; did you mean 'mb_last'?
     priv->rx_offload.high_last = devtype_data->rx_last;
                      ^~~~~~~~~
                      mb_last
   drivers/net/can/at91_can.c:1157:19: error: 'struct can_rx_offload' has no member named 'mailbox_enable_mask'; did you mean 'mailbox_read'?
     priv->rx_offload.mailbox_enable_mask = at91_mailbox_enable_mask;
                      ^~~~~~~~~~~~~~~~~~~
                      mailbox_read
   drivers/net/can/at91_can.c:1157:41: error: 'at91_mailbox_enable_mask' undeclared (first use in this function); did you mean 'at91_mailbox_read'?
     priv->rx_offload.mailbox_enable_mask = at91_mailbox_enable_mask;
                                            ^~~~~~~~~~~~~~~~~~~~~~~~
                                            at91_mailbox_read
   drivers/net/can/at91_can.c:1160:2: error: implicit declaration of function 'can_rx_offload_add'; did you mean 'can_rx_offload_del'? [-Werror=implicit-function-declaration]
     can_rx_offload_add(dev, &priv->rx_offload);
     ^~~~~~~~~~~~~~~~~~
     can_rx_offload_del
   At top level:
   drivers/net/can/at91_can.c:619:21: warning: 'at91_poll_err' defined but not used [-Wunused-function]
    static unsigned int at91_poll_err(struct can_rx_offload *offload)
                        ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +566 drivers/net/can/at91_can.c

   525	
   526	/**
   527	 * at91_mailbox_read - read CAN msg from mailbox
   528	 * @offload: rx-offload
   529	 * @cf: CAN frame where to store message
   530	 * @mb: mailbox number to read from
   531	 *
   532	 * Reads a CAN message from the given mailbox and stores data into
   533	 * given can frame. "cf" and "mb" must be valid.
   534	 */
   535	static unsigned int at91_mailbox_read(struct can_rx_offload *offload,
   536						 struct can_frame *cf,
   537						 u32 *timestamp, unsigned int mb)
   538	{
   539		const struct at91_priv *priv = rx_offload_to_priv(offload);
   540		u32 reg_msr, reg_mid;
   541	
   542		reg_msr = at91_read(priv, AT91_MSR(mb));
   543		if (!(reg_msr & AT91_MSR_MRDY))
   544			return 0;
   545	
   546		reg_mid = at91_read(priv, AT91_MID(mb));
   547		if (reg_mid & AT91_MID_MIDE)
   548			cf->can_id = ((reg_mid >> 0) & CAN_EFF_MASK) | CAN_EFF_FLAG;
   549		else
   550			cf->can_id = (reg_mid >> 18) & CAN_SFF_MASK;
   551	
   552		cf->can_dlc = get_can_dlc((reg_msr >> 16) & 0xf);
   553		if (reg_msr & AT91_MSR_MRTR)
   554			cf->can_id |= CAN_RTR_FLAG;
   555		else {
   556			*(u32 *)(cf->data + 0) = at91_read(priv, AT91_MDL(mb));
   557			*(u32 *)(cf->data + 4) = at91_read(priv, AT91_MDH(mb));
   558		}
   559	
   560		/* allow RX of extended frames */
   561		at91_write(priv, AT91_MID(mb), AT91_MID_MIDE);
   562	
   563		if (unlikely(mb == get_mb_rx_last(priv) && reg_msr & AT91_MSR_MMI))
   564			at91_rx_overflow_err(offload->dev);
   565	
 > 566		at91_write(priv, AT91_TCR, mask);
   567	
   568		return 1;
   569	}
   570	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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