* [net-next:master 379/381] drivers/net/ethernet/marvell/mvpp2/mvpp2.h:553:2: warning: overflow in implicit constant conversion
@ 2018-06-02 1:31 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-06-02 1:31 UTC (permalink / raw)
To: Maxime Chevallier; +Cc: kbuild-all, netdev
[-- Attachment #1: Type: text/plain, Size: 4566 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 21ad1173589ef63a93f94e05c879393e2c27588c
commit: db9d7d36eecc8926f03a8f2e46781887577b3353 [379/381] net: mvpp2: Split the PPv2 driver to a dedicated directory
config: s390-allmodconfig (attached as .config)
compiler: s390x-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout db9d7d36eecc8926f03a8f2e46781887577b3353
# save the attached .config to linux build tree
make.cross ARCH=s390
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:43:0:
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c: In function 'mvpp2_setup_bm_pool':
>> drivers/net/ethernet/marvell/mvpp2/mvpp2.h:553:2: warning: overflow in implicit constant conversion [-Woverflow]
((total_size) - NET_SKB_PAD - MVPP2_SKB_SHINFO_SIZE)
^
>> drivers/net/ethernet/marvell/mvpp2/mvpp2.h:604:33: note: in expansion of macro 'MVPP2_RX_MAX_PKT_SIZE'
#define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE)
^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:543:41: note: in expansion of macro 'MVPP2_BM_SHORT_PKT_SIZE'
mvpp2_pools[MVPP2_BM_SHORT].pkt_size = MVPP2_BM_SHORT_PKT_SIZE;
^~~~~~~~~~~~~~~~~~~~~~~
vim +553 drivers/net/ethernet/marvell/mvpp2/mvpp2.h
532
533 /* TX FIFO constants */
534 #define MVPP22_TX_FIFO_DATA_SIZE_10KB 0xa
535 #define MVPP22_TX_FIFO_DATA_SIZE_3KB 0x3
536 #define MVPP2_TX_FIFO_THRESHOLD_MIN 256
537 #define MVPP2_TX_FIFO_THRESHOLD_10KB \
538 (MVPP22_TX_FIFO_DATA_SIZE_10KB * 1024 - MVPP2_TX_FIFO_THRESHOLD_MIN)
539 #define MVPP2_TX_FIFO_THRESHOLD_3KB \
540 (MVPP22_TX_FIFO_DATA_SIZE_3KB * 1024 - MVPP2_TX_FIFO_THRESHOLD_MIN)
541
542 /* RX buffer constants */
543 #define MVPP2_SKB_SHINFO_SIZE \
544 SKB_DATA_ALIGN(sizeof(struct skb_shared_info))
545
546 #define MVPP2_RX_PKT_SIZE(mtu) \
547 ALIGN((mtu) + MVPP2_MH_SIZE + MVPP2_VLAN_TAG_LEN + \
548 ETH_HLEN + ETH_FCS_LEN, cache_line_size())
549
550 #define MVPP2_RX_BUF_SIZE(pkt_size) ((pkt_size) + NET_SKB_PAD)
551 #define MVPP2_RX_TOTAL_SIZE(buf_size) ((buf_size) + MVPP2_SKB_SHINFO_SIZE)
552 #define MVPP2_RX_MAX_PKT_SIZE(total_size) \
> 553 ((total_size) - NET_SKB_PAD - MVPP2_SKB_SHINFO_SIZE)
554
555 #define MVPP2_BIT_TO_BYTE(bit) ((bit) / 8)
556
557 /* IPv6 max L3 address size */
558 #define MVPP2_MAX_L3_ADDR_SIZE 16
559
560 /* Port flags */
561 #define MVPP2_F_LOOPBACK BIT(0)
562
563 /* Marvell tag types */
564 enum mvpp2_tag_type {
565 MVPP2_TAG_TYPE_NONE = 0,
566 MVPP2_TAG_TYPE_MH = 1,
567 MVPP2_TAG_TYPE_DSA = 2,
568 MVPP2_TAG_TYPE_EDSA = 3,
569 MVPP2_TAG_TYPE_VLAN = 4,
570 MVPP2_TAG_TYPE_LAST = 5
571 };
572
573 /* L2 cast enum */
574 enum mvpp2_prs_l2_cast {
575 MVPP2_PRS_L2_UNI_CAST,
576 MVPP2_PRS_L2_MULTI_CAST,
577 };
578
579 /* L3 cast enum */
580 enum mvpp2_prs_l3_cast {
581 MVPP2_PRS_L3_UNI_CAST,
582 MVPP2_PRS_L3_MULTI_CAST,
583 MVPP2_PRS_L3_BROAD_CAST
584 };
585
586 /* BM constants */
587 #define MVPP2_BM_JUMBO_BUF_NUM 512
588 #define MVPP2_BM_LONG_BUF_NUM 1024
589 #define MVPP2_BM_SHORT_BUF_NUM 2048
590 #define MVPP2_BM_POOL_SIZE_MAX (16*1024 - MVPP2_BM_POOL_PTR_ALIGN/4)
591 #define MVPP2_BM_POOL_PTR_ALIGN 128
592
593 /* BM cookie (32 bits) definition */
594 #define MVPP2_BM_COOKIE_POOL_OFFS 8
595 #define MVPP2_BM_COOKIE_CPU_OFFS 24
596
597 #define MVPP2_BM_SHORT_FRAME_SIZE 512
598 #define MVPP2_BM_LONG_FRAME_SIZE 2048
599 #define MVPP2_BM_JUMBO_FRAME_SIZE 10240
600 /* BM short pool packet size
601 * These value assure that for SWF the total number
602 * of bytes allocated for each buffer will be 512
603 */
> 604 #define MVPP2_BM_SHORT_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_SHORT_FRAME_SIZE)
605 #define MVPP2_BM_LONG_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_LONG_FRAME_SIZE)
606 #define MVPP2_BM_JUMBO_PKT_SIZE MVPP2_RX_MAX_PKT_SIZE(MVPP2_BM_JUMBO_FRAME_SIZE)
607
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 49422 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-02 1:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-02 1:31 [net-next:master 379/381] drivers/net/ethernet/marvell/mvpp2/mvpp2.h:553:2: warning: overflow in implicit constant conversion kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.