[linux-next:master 4406/6860] drivers/net/ethernet/cirrus/cs89x0.c:897:20: error: implicit declaration of function 'isa_virt_to_bus'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8ca403f3e7a23c4513046ad8d107adfbe4703362
commit: 47fd22f2b84765a2f7e3f150282497b902624547 [4406/6860] cs89x0: rework driver configuration
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 47fd22f2b84765a2f7e3f150282497b902624547
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the linux-next/master HEAD 8ca403f3e7a23c4513046ad8d107adfbe4703362 builds fine.
It may have been fixed somewhere.
All errors (new ones prefixed by >>):
In file included from include/linux/printk.h:456,
from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/net/ethernet/cirrus/cs89x0.c:51:
drivers/net/ethernet/cirrus/cs89x0.c: In function 'net_open':
>> drivers/net/ethernet/cirrus/cs89x0.c:897:20: error: implicit declaration of function 'isa_virt_to_bus' [-Werror=implicit-function-declaration]
897 | (unsigned long)isa_virt_to_bus(lp->dma_buff));
| ^~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:134:15: note: in definition of macro '__dynamic_func_call'
134 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:162:2: note: in expansion of macro '_dynamic_func_call'
162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:471:2: note: in expansion of macro 'dynamic_pr_debug'
471 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
drivers/net/ethernet/cirrus/cs89x0.c:86:3: note: in expansion of macro 'pr_debug'
86 | pr_##level(fmt, ##__VA_ARGS__); \
| ^~~
drivers/net/ethernet/cirrus/cs89x0.c:894:3: note: in expansion of macro 'cs89_dbg'
894 | cs89_dbg(1, debug, "%s: dma %lx %lx\n",
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +/isa_virt_to_bus +897 drivers/net/ethernet/cirrus/cs89x0.c
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 825
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 826 static int
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 827 net_open(struct net_device *dev)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 828 {
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 829 struct net_local *lp = netdev_priv(dev);
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 830 int result = 0;
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 831 int i;
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 832 int ret;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 833
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 834 if (dev->irq < 2) {
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 835 /* Allow interrupts to be generated by the chip */
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 836 /* Cirrus' release had this: */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 837 #if 0
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 838 writereg(dev, PP_BusCTL, readreg(dev, PP_BusCTL) | ENABLE_IRQ);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 839 #endif
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 840 /* And 2.3.47 had this: */
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 841 writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 842
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 843 for (i = 2; i < CS8920_NO_INTS; i++) {
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 844 if ((1 << i) & lp->irq_map) {
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 845 if (request_irq(i, net_interrupt, 0, dev->name,
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 846 dev) == 0) {
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 847 dev->irq = i;
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 848 write_irq(dev, lp->chip_type, i);
6fba180ee8b1c8 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 849 /* writereg(dev, PP_BufCFG, GENERATE_SW_INTERRUPT); */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 850 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 851 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 852 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 853 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 854
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 855 if (i >= CS8920_NO_INTS) {
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 856 writereg(dev, PP_BusCTL, 0); /* disable interrupts. */
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 857 pr_err("can't get an interrupt\n");
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 858 ret = -EAGAIN;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 859 goto bad_out;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 860 }
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 861 } else {
47fd22f2b84765 drivers/net/ethernet/cirrus/cs89x0.c Arnd Bergmann 2021-08-03 862 #if IS_ENABLED(CONFIG_CS89x0_ISA)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 863 if (((1 << dev->irq) & lp->irq_map) == 0) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 864 pr_err("%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 865 dev->name, dev->irq, lp->irq_map);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 866 ret = -EAGAIN;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 867 goto bad_out;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 868 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 869 #endif
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 870 /* FIXME: Cirrus' release had this: */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 871 writereg(dev, PP_BusCTL, readreg(dev, PP_BusCTL)|ENABLE_IRQ);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 872 /* And 2.3.47 had this: */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 873 #if 0
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 874 writereg(dev, PP_BusCTL, ENABLE_IRQ | MEMORY_ON);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 875 #endif
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 876 write_irq(dev, lp->chip_type, dev->irq);
a0607fd3a25ba1 drivers/net/cs89x0.c Joe Perches 2009-11-18 877 ret = request_irq(dev->irq, net_interrupt, 0, dev->name, dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 878 if (ret) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 879 pr_err("request_irq(%d) failed\n", dev->irq);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 880 goto bad_out;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 881 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 882 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 883
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 884 #if ALLOW_DMA
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 885 if (lp->use_dma && (lp->isa_config & ANY_ISA_DMA)) {
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 886 unsigned long flags;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 887 lp->dma_buff = (unsigned char *)__get_dma_pages(GFP_KERNEL,
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 888 get_order(lp->dmasize * 1024));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 889 if (!lp->dma_buff) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 890 pr_err("%s: cannot get %dK memory for DMA\n",
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 891 dev->name, lp->dmasize);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 892 goto release_irq;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 893 }
808e9a77358995 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 894 cs89_dbg(1, debug, "%s: dma %lx %lx\n",
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 895 dev->name,
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 896 (unsigned long)lp->dma_buff,
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 @897 (unsigned long)isa_virt_to_bus(lp->dma_buff));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 898 if ((unsigned long)lp->dma_buff >= MAX_DMA_ADDRESS ||
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 899 !dma_page_eq(lp->dma_buff,
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 900 lp->dma_buff + lp->dmasize * 1024 - 1)) {
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 901 pr_err("%s: not usable as DMA buffer\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 902 goto release_irq;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 903 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 904 memset(lp->dma_buff, 0, lp->dmasize * 1024); /* Why? */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 905 if (request_dma(dev->dma, dev->name)) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 906 pr_err("%s: cannot get dma channel %d\n",
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 907 dev->name, dev->dma);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 908 goto release_irq;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 909 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 910 write_dma(dev, lp->chip_type, dev->dma);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 911 lp->rx_dma_ptr = lp->dma_buff;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 912 lp->end_dma_buff = lp->dma_buff + lp->dmasize * 1024;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 913 spin_lock_irqsave(&lp->lock, flags);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 914 disable_dma(dev->dma);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 915 clear_dma_ff(dev->dma);
ef0657c49e0f93 drivers/net/cs89x0.c Julia Lawall 2009-07-06 916 set_dma_mode(dev->dma, DMA_RX_MODE); /* auto_init as well */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 917 set_dma_addr(dev->dma, isa_virt_to_bus(lp->dma_buff));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 918 set_dma_count(dev->dma, lp->dmasize * 1024);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 919 enable_dma(dev->dma);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 920 spin_unlock_irqrestore(&lp->lock, flags);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 921 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 922 #endif /* ALLOW_DMA */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 923
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 924 /* set the Ethernet address */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 925 for (i = 0; i < ETH_ALEN / 2; i++)
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 926 writereg(dev, PP_IA + i * 2,
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 927 (dev->dev_addr[i * 2] |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 928 (dev->dev_addr[i * 2 + 1] << 8)));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 929
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 930 /* while we're testing the interface, leave interrupts disabled */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 931 writereg(dev, PP_BusCTL, MEMORY_ON);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 932
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 933 /* Set the LineCTL quintuplet based on adapter configuration read from EEPROM */
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 934 if ((lp->adapter_cnf & A_CNF_EXTND_10B_2) &&
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 935 (lp->adapter_cnf & A_CNF_LOW_RX_SQUELCH))
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 936 lp->linectl = LOW_RX_SQUELCH;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 937 else
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 938 lp->linectl = 0;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 939
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 940 /* check to make sure that they have the "right" hardware available */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 941 switch (lp->adapter_cnf & A_CNF_MEDIA_TYPE) {
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 942 case A_CNF_MEDIA_10B_T:
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 943 result = lp->adapter_cnf & A_CNF_10B_T;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 944 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 945 case A_CNF_MEDIA_AUI:
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 946 result = lp->adapter_cnf & A_CNF_AUI;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 947 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 948 case A_CNF_MEDIA_10B_2:
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 949 result = lp->adapter_cnf & A_CNF_10B_2;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 950 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 951 default:
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 952 result = lp->adapter_cnf & (A_CNF_10B_T |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 953 A_CNF_AUI |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 954 A_CNF_10B_2);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 955 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 956 if (!result) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 957 pr_err("%s: EEPROM is configured for unavailable media\n",
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 958 dev->name);
17a9440f7deb78 drivers/net/cs89x0.c Wang Chen 2008-05-30 959 release_dma:
17a9440f7deb78 drivers/net/cs89x0.c Wang Chen 2008-05-30 960 #if ALLOW_DMA
17a9440f7deb78 drivers/net/cs89x0.c Wang Chen 2008-05-30 961 free_dma(dev->dma);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 962 release_irq:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 963 release_dma_buff(lp);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 964 #endif
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 965 writereg(dev, PP_LineCTL,
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 966 readreg(dev, PP_LineCTL) & ~(SERIAL_TX_ON | SERIAL_RX_ON));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 967 free_irq(dev->irq, dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 968 ret = -EAGAIN;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 969 goto bad_out;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 970 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 971
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 972 /* set the hardware to the configured choice */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 973 switch (lp->adapter_cnf & A_CNF_MEDIA_TYPE) {
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 974 case A_CNF_MEDIA_10B_T:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 975 result = detect_tp(dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 976 if (result == DETECTED_NONE) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 977 pr_warn("%s: 10Base-T (RJ-45) has no cable\n",
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 978 dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 979 if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 980 result = DETECTED_RJ45H; /* Yes! I don't care if I see a link pulse */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 981 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 982 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 983 case A_CNF_MEDIA_AUI:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 984 result = detect_aui(dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 985 if (result == DETECTED_NONE) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 986 pr_warn("%s: 10Base-5 (AUI) has no cable\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 987 if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 988 result = DETECTED_AUI; /* Yes! I don't care if I see a carrrier */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 989 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 990 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 991 case A_CNF_MEDIA_10B_2:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 992 result = detect_bnc(dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 993 if (result == DETECTED_NONE) {
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 994 pr_warn("%s: 10Base-2 (BNC) has no cable\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 995 if (lp->auto_neg_cnf & IMM_BIT) /* check "ignore missing media" bit */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 996 result = DETECTED_BNC; /* Yes! I don't care if I can xmit a packet */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 997 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 998 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 999 case A_CNF_MEDIA_AUTO:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1000 writereg(dev, PP_LineCTL, lp->linectl | AUTO_AUI_10BASET);
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1001 if (lp->adapter_cnf & A_CNF_10B_T) {
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1002 result = detect_tp(dev);
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1003 if (result != DETECTED_NONE)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1004 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1005 }
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1006 if (lp->adapter_cnf & A_CNF_AUI) {
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1007 result = detect_aui(dev);
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1008 if (result != DETECTED_NONE)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1009 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1010 }
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1011 if (lp->adapter_cnf & A_CNF_10B_2) {
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1012 result = detect_bnc(dev);
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1013 if (result != DETECTED_NONE)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1014 break;
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1015 }
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1016 pr_err("%s: no media detected\n", dev->name);
17a9440f7deb78 drivers/net/cs89x0.c Wang Chen 2008-05-30 1017 goto release_dma;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1018 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1019 switch (result) {
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1020 case DETECTED_NONE:
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1021 pr_err("%s: no network cable attached to configured media\n",
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1022 dev->name);
17a9440f7deb78 drivers/net/cs89x0.c Wang Chen 2008-05-30 1023 goto release_dma;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1024 case DETECTED_RJ45H:
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1025 pr_info("%s: using half-duplex 10Base-T (RJ-45)\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1026 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1027 case DETECTED_RJ45F:
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1028 pr_info("%s: using full-duplex 10Base-T (RJ-45)\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1029 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1030 case DETECTED_AUI:
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1031 pr_info("%s: using 10Base-5 (AUI)\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1032 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1033 case DETECTED_BNC:
dd92b9ade43907 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1034 pr_info("%s: using 10Base-2 (BNC)\n", dev->name);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1035 break;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1036 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1037
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1038 /* Turn on both receive and transmit operations */
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1039 writereg(dev, PP_LineCTL,
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1040 readreg(dev, PP_LineCTL) | SERIAL_RX_ON | SERIAL_TX_ON);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1041
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1042 /* Receive only error free packets addressed to this card */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1043 lp->rx_mode = 0;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1044 writereg(dev, PP_RxCTL, DEF_RX_ACCEPT);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1045
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1046 lp->curr_rx_cfg = RX_OK_ENBL | RX_CRC_ERROR_ENBL;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1047
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1048 if (lp->isa_config & STREAM_TRANSFER)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1049 lp->curr_rx_cfg |= RX_STREAM_ENBL;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1050 #if ALLOW_DMA
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1051 set_dma_cfg(dev);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1052 #endif
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1053 writereg(dev, PP_RxCFG, lp->curr_rx_cfg);
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1054
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1055 writereg(dev, PP_TxCFG, (TX_LOST_CRS_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1056 TX_SQE_ERROR_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1057 TX_OK_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1058 TX_LATE_COL_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1059 TX_JBR_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1060 TX_ANY_COL_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1061 TX_16_COL_ENBL));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1062
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1063 writereg(dev, PP_BufCFG, (READY_FOR_TX_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1064 RX_MISS_COUNT_OVRFLOW_ENBL |
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1065 #if ALLOW_DMA
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1066 dma_bufcfg(dev) |
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1067 #endif
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1068 TX_COL_COUNT_OVRFLOW_ENBL |
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1069 TX_UNDERRUN_ENBL));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1070
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1071 /* now that we've got our act together, enable everything */
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1072 writereg(dev, PP_BusCTL, (ENABLE_IRQ
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1073 | (dev->mem_start ? MEMORY_ON : 0) /* turn memory on */
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1074 #if ALLOW_DMA
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1075 | dma_busctl(dev)
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1076 #endif
ca034bcdb1786b drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1077 ));
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1078 netif_start_queue(dev);
808e9a77358995 drivers/net/ethernet/cirrus/cs89x0.c Joe Perches 2012-05-18 1079 cs89_dbg(1, debug, "net_open() succeeded\n");
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1080 return 0;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1081 bad_out:
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1082 return ret;
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1083 }
^1da177e4c3f41 drivers/net/cs89x0.c Linus Torvalds 2005-04-16 1084
:::::: The code at line 897 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[congwang:sch_bpf 2/2] net/sched/sch_bpf.c:103:39: error: 'TCA_SCH_BPF_ENQUEUE_PROG_TAG' undeclared; did you mean 'TCA_SCH_BPF_ENQUEUE_PROG_ID'?
by kernel test robot
tree: https://github.com/congwang/linux.git sch_bpf
head: a656e8aec8755a26268ca54b6fce76969dda9c2e
commit: a656e8aec8755a26268ca54b6fce76969dda9c2e [2/2] sch_bpf: draft
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.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
# https://github.com/congwang/linux/commit/a656e8aec8755a26268ca54b6fce7696...
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sch_bpf
git checkout a656e8aec8755a26268ca54b6fce76969dda9c2e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=ia64 SHELL=/bin/bash net/sched/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
net/sched/sch_bpf.c: In function 'sch_bpf_dump':
>> net/sched/sch_bpf.c:103:39: error: 'TCA_SCH_BPF_ENQUEUE_PROG_TAG' undeclared (first use in this function); did you mean 'TCA_SCH_BPF_ENQUEUE_PROG_ID'?
103 | TCA_SCH_BPF_ENQUEUE_PROG_ID, TCA_SCH_BPF_ENQUEUE_PROG_TAG))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| TCA_SCH_BPF_ENQUEUE_PROG_ID
net/sched/sch_bpf.c:103:39: note: each undeclared identifier is reported only once for each function it appears in
>> net/sched/sch_bpf.c:106:39: error: 'TCA_SCH_BPF_DEQUEUE_PROG_TAG' undeclared (first use in this function); did you mean 'TCA_SCH_BPF_DEQUEUE_PROG_ID'?
106 | TCA_SCH_BPF_DEQUEUE_PROG_ID, TCA_SCH_BPF_DEQUEUE_PROG_TAG))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| TCA_SCH_BPF_DEQUEUE_PROG_ID
net/sched/sch_bpf.c: In function 'sch_bpf_classify':
>> net/sched/sch_bpf.c:135:9: error: 'tcf' undeclared (first use in this function)
135 | while (tcf && (result = tcf_classify(skb, NULL, tcf, &res, false)) >= 0) {
| ^~~
net/sched/sch_bpf.c:129:20: warning: unused variable 'filter' [-Wunused-variable]
129 | struct tcf_proto *filter;
| ^~~~~~
net/sched/sch_bpf.c:128:24: warning: unused variable 'q' [-Wunused-variable]
128 | struct sch_bpf_qdisc *q = qdisc_priv(sch);
| ^
In file included from include/linux/rbtree.h:22,
from include/linux/mm_types.h:10,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from net/sched/sch_bpf.c:7:
net/sched/sch_bpf.c: In function 'sch_bpf_enqueue':
>> include/linux/rcupdate.h:389:9: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:173:13: note: in expansion of macro 'rcu_dereference'
173 | enqueue = rcu_dereference(q->enqueue_prog);
| ^~~~~~~~~~~~~~~
include/linux/rcupdate.h:389:35: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:173:13: note: in expansion of macro 'rcu_dereference'
173 | enqueue = rcu_dereference(q->enqueue_prog);
| ^~~~~~~~~~~~~~~
include/linux/rcupdate.h:392:11: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
392 | ((typeof(*p) __force __kernel *)(________p1)); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:173:13: note: in expansion of macro 'rcu_dereference'
173 | enqueue = rcu_dereference(q->enqueue_prog);
| ^~~~~~~~~~~~~~~
>> net/sched/sch_bpf.c:190:8: error: 'ret' undeclared (first use in this function); did you mean 'res'?
190 | if ((ret = qdisc_enqueue(skb, cl->qdisc,
| ^~~
| res
>> net/sched/sch_bpf.c:200:20: error: passing argument 2 of 'pq_push' from incompatible pointer type [-Werror=incompatible-pointer-types]
200 | pq_push(&cl->pq, &skb->rbnode);
| ^~~~~~~~~~~~
| |
| struct rb_node *
In file included from net/sched/sch_bpf.c:18:
include/linux/priority_queue.h:29:66: note: expected 'struct pq_node *' but argument is of type 'struct rb_node *'
29 | static inline void pq_push(struct pq_root *root, struct pq_node *node)
| ~~~~~~~~~~~~~~~~^~~~
In file included from include/linux/rbtree.h:22,
from include/linux/mm_types.h:10,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from net/sched/sch_bpf.c:7:
net/sched/sch_bpf.c: In function 'sch_bpf_dequeue':
>> include/linux/rcupdate.h:389:9: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:218:12: note: in expansion of macro 'rcu_dereference'
218 | dequeue = rcu_dereference(q->dequeue_prog);
| ^~~~~~~~~~~~~~~
include/linux/rcupdate.h:389:35: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
389 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:218:12: note: in expansion of macro 'rcu_dereference'
218 | dequeue = rcu_dereference(q->dequeue_prog);
| ^~~~~~~~~~~~~~~
include/linux/rcupdate.h:392:11: error: invalid type argument of unary '*' (have 'struct sch_bpf_prog')
392 | ((typeof(*p) __force __kernel *)(________p1)); \
| ^
include/linux/rcupdate.h:528:2: note: in expansion of macro '__rcu_dereference_check'
528 | __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:596:28: note: in expansion of macro 'rcu_dereference_check'
596 | #define rcu_dereference(p) rcu_dereference_check(p, 0)
| ^~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:218:12: note: in expansion of macro 'rcu_dereference'
218 | dequeue = rcu_dereference(q->dequeue_prog);
| ^~~~~~~~~~~~~~~
>> net/sched/sch_bpf.c:219:28: error: 'skb' undeclared (first use in this function)
219 | bpf_compute_data_pointers(skb);
| ^~~
>> net/sched/sch_bpf.c:230:11: error: assignment to 'struct sk_buff *' from incompatible pointer type 'struct pq_node *' [-Werror=incompatible-pointer-types]
230 | ctx.skb = pq_pop(&cl->pq);
| ^
>> net/sched/sch_bpf.c:236:13: error: 'SCH_BPF_RET_OK' undeclared (first use in this function)
236 | if (res == SCH_BPF_RET_OK) {
| ^~~~~~~~~~~~~~
>> net/sched/sch_bpf.c:238:20: error: 'SCH_BPF_RET_REQUEUE' undeclared (first use in this function)
238 | } else if (res == SCH_BPF_RET_REQUEUE) {
| ^~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:240:20: error: passing argument 2 of 'pq_push' from incompatible pointer type [-Werror=incompatible-pointer-types]
240 | pq_push(&cl->pq, &ctx.skb->rbnode);
| ^~~~~~~~~~~~~~~~
| |
| struct rb_node *
In file included from net/sched/sch_bpf.c:18:
include/linux/priority_queue.h:29:66: note: expected 'struct pq_node *' but argument is of type 'struct rb_node *'
29 | static inline void pq_push(struct pq_root *root, struct pq_node *node)
| ~~~~~~~~~~~~~~~~^~~~
net/sched/sch_bpf.c: In function 'sch_bpf_search':
>> net/sched/sch_bpf.c:283:37: warning: passing argument 1 of 'sch_bpf_find' makes pointer from integer without a cast [-Wint-conversion]
283 | return (unsigned long)sch_bpf_find(handle, sch);
| ^~~~~~
| |
| u32 {aka unsigned int}
net/sched/sch_bpf.c:115:57: note: expected 'struct Qdisc *' but argument is of type 'u32' {aka 'unsigned int'}
115 | static struct sch_bpf_class *sch_bpf_find(struct Qdisc *sch, u32 classid)
| ~~~~~~~~~~~~~~^~~
>> net/sched/sch_bpf.c:283:45: warning: passing argument 2 of 'sch_bpf_find' makes integer from pointer without a cast [-Wint-conversion]
283 | return (unsigned long)sch_bpf_find(handle, sch);
| ^~~
| |
| struct Qdisc *
net/sched/sch_bpf.c:115:66: note: expected 'u32' {aka 'unsigned int'} but argument is of type 'struct Qdisc *'
115 | static struct sch_bpf_class *sch_bpf_find(struct Qdisc *sch, u32 classid)
| ~~~~^~~~~~~
net/sched/sch_bpf.c: At top level:
>> net/sched/sch_bpf.c:297:3: error: 'TCA_SCH_BPF_ENQUEUE_PROG_FD' undeclared here (not in a function); did you mean 'TCA_SCH_BPF_ENQUEUE_PROG_ID'?
297 | [TCA_SCH_BPF_ENQUEUE_PROG_FD] = { .type = NLA_U32 },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| TCA_SCH_BPF_ENQUEUE_PROG_ID
>> net/sched/sch_bpf.c:297:3: error: array index in initializer not of integer type
net/sched/sch_bpf.c:297:3: note: (near initialization for 'sch_bpf_policy')
>> net/sched/sch_bpf.c:300:3: error: 'TCA_SCH_BPF_DEQUEUE_PROG_FD' undeclared here (not in a function); did you mean 'TCA_SCH_BPF_DEQUEUE_PROG_ID'?
300 | [TCA_SCH_BPF_DEQUEUE_PROG_FD] = { .type = NLA_U32 },
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| TCA_SCH_BPF_DEQUEUE_PROG_ID
net/sched/sch_bpf.c:300:3: error: array index in initializer not of integer type
net/sched/sch_bpf.c:300:3: note: (near initialization for 'sch_bpf_policy')
net/sched/sch_bpf.c: In function 'bpf_init_prog':
>> net/sched/sch_bpf.c:313:33: error: 'BPF_PROG_TYPE_SCHED_SCH' undeclared (first use in this function); did you mean 'BPF_PROG_TYPE_SCHED_ACT'?
313 | fp = bpf_prog_get_type(bpf_fd, BPF_PROG_TYPE_SCHED_SCH);
| ^~~~~~~~~~~~~~~~~~~~~~~
| BPF_PROG_TYPE_SCHED_ACT
net/sched/sch_bpf.c: At top level:
net/sched/sch_bpf.c:330:8: error: return type defaults to 'int' [-Werror=return-type]
330 | static bpf_cleanup_prog(struct sch_bpf_prog *prog)
| ^~~~~~~~~~~~~~~~
net/sched/sch_bpf.c: In function 'sch_bpf_change':
>> net/sched/sch_bpf.c:353:11: error: incompatible type for argument 2 of 'bpf_init_prog'
353 | opt[TCA_SCH_BPF_ENQUEUE_PROG_NAME], &q->enqueue_prog);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct nlattr
net/sched/sch_bpf.c:305:60: note: expected 'struct nlattr *' but argument is of type 'struct nlattr'
305 | static int bpf_init_prog(struct nlattr *fd, struct nlattr *name, struct sch_bpf_prog *prog)
| ~~~~~~~~~~~~~~~^~~~
net/sched/sch_bpf.c:357:11: error: incompatible type for argument 2 of 'bpf_init_prog'
357 | opt[TCA_SCH_BPF_DEQUEUE_PROG_NAME], &q->dequeue_prog);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct nlattr
net/sched/sch_bpf.c:305:60: note: expected 'struct nlattr *' but argument is of type 'struct nlattr'
305 | static int bpf_init_prog(struct nlattr *fd, struct nlattr *name, struct sch_bpf_prog *prog)
| ~~~~~~~~~~~~~~~^~~~
net/sched/sch_bpf.c:342:6: warning: unused variable 'gen_flags' [-Wunused-variable]
342 | u32 gen_flags = 0;
| ^~~~~~~~~
net/sched/sch_bpf.c: In function 'sch_bpf_init':
>> net/sched/sch_bpf.c:387:3: error: 'err' undeclared (first use in this function)
387 | err = sch_bpf_change(sch, opt, extack);
| ^~~
net/sched/sch_bpf.c: In function 'sch_bpf_change_class':
net/sched/sch_bpf.c:427:3: error: 'err' undeclared (first use in this function)
427 | err = -ENOBUFS;
| ^~~
>> net/sched/sch_bpf.c:430:4: error: label 'failure' used but not defined
430 | goto failure;
| ^~~~
net/sched/sch_bpf.c:423:60: warning: unused variable 'parent' [-Wunused-variable]
423 | struct sch_bpf_class *cl = (struct sch_bpf_class *)*arg, *parent;
| ^~~~~~
net/sched/sch_bpf.c: In function 'sch_bpf_delete':
net/sched/sch_bpf.c:449:1: error: no return statement in function returning non-void [-Werror=return-type]
449 | }
| ^
net/sched/sch_bpf.c: At top level:
net/sched/sch_bpf.c:480:13: error: initialization of 'int (*)(struct Qdisc *, long unsigned int, struct netlink_ext_ack *)' from incompatible pointer type 'int (*)(struct Qdisc *, long unsigned int)' [-Werror=incompatible-pointer-types]
480 | .delete = sch_bpf_delete,
| ^~~~~~~~~~~~~~
net/sched/sch_bpf.c:480:13: note: (near initialization for 'sch_bpf_class_ops.delete')
net/sched/sch_bpf.c:484:11: error: 'sch_bpf_dump_class' undeclared here (not in a function); did you mean 'sch_bpf_dump_prog'?
484 | .dump = sch_bpf_dump_class,
| ^~~~~~~~~~~~~~~~~~
| sch_bpf_dump_prog
net/sched/sch_bpf.c:485:16: error: 'sch_bpf_dump_class_stats' undeclared here (not in a function)
485 | .dump_stats = sch_bpf_dump_class_stats,
| ^~~~~~~~~~~~~~~~~~~~~~~~
net/sched/sch_bpf.c:497:12: error: 'sch_bpf_reset' undeclared here (not in a function); did you mean 'sch_bpf_delete'?
497 | .reset = sch_bpf_reset,
| ^~~~~~~~~~~~~
| sch_bpf_delete
net/sched/sch_bpf.c:501:16: error: 'sch_bpf_dump_stats' undeclared here (not in a function); did you mean 'sch_bpf_dump_prog'?
501 | .dump_stats = sch_bpf_dump_stats,
| ^~~~~~~~~~~~~~~~~~
| sch_bpf_dump_prog
net/sched/sch_bpf.c:505:19: error: conflicting types for 'sch_bpf_init'
505 | static int __init sch_bpf_init(void)
| ^~~~~~~~~~~~
net/sched/sch_bpf.c:381:12: note: previous definition of 'sch_bpf_init' was here
381 | static int sch_bpf_init(struct Qdisc *sch, struct nlattr *opt,
| ^~~~~~~~~~~~
In file included from net/sched/sch_bpf.c:7:
include/linux/module.h:133:6: warning: 'init_module' alias between functions of incompatible types 'int(void)' and 'int(struct Qdisc *, struct nlattr *, struct netlink_ext_ack *)' [-Wattribute-alias=]
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
net/sched/sch_bpf.c:515:1: note: in expansion of macro 'module_init'
515 | module_init(sch_bpf_init)
| ^~~~~~~~~~~
net/sched/sch_bpf.c:381:12: note: aliased declaration here
381 | static int sch_bpf_init(struct Qdisc *sch, struct nlattr *opt,
| ^~~~~~~~~~~~
In file included from net/sched/sch_bpf.c:7:
include/linux/module.h:133:6: error: section of alias 'init_module' must match section of its target
133 | int init_module(void) __copy(initfn) \
| ^~~~~~~~~~~
net/sched/sch_bpf.c:515:1: note: in expansion of macro 'module_init'
515 | module_init(sch_bpf_init)
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +103 net/sched/sch_bpf.c
92
93 static int sch_bpf_dump(struct Qdisc *sch, struct sk_buff *skb)
94 {
95 struct sch_bpf_qdisc *q = qdisc_priv(sch);
96 struct nlattr *opts;
97
98 opts = nla_nest_start_noflag(skb, TCA_OPTIONS);
99 if (opts == NULL)
100 goto nla_put_failure;
101
102 if (sch_bpf_dump_prog(&q->enqueue_prog, skb, TCA_SCH_BPF_ENQUEUE_PROG_NAME,
> 103 TCA_SCH_BPF_ENQUEUE_PROG_ID, TCA_SCH_BPF_ENQUEUE_PROG_TAG))
104 goto nla_put_failure;
105 if (sch_bpf_dump_prog(&q->dequeue_prog, skb, TCA_SCH_BPF_DEQUEUE_PROG_NAME,
> 106 TCA_SCH_BPF_DEQUEUE_PROG_ID, TCA_SCH_BPF_DEQUEUE_PROG_TAG))
107 goto nla_put_failure;
108
109 return nla_nest_end(skb, opts);
110
111 nla_put_failure:
112 return -1;
113 }
114
115 static struct sch_bpf_class *sch_bpf_find(struct Qdisc *sch, u32 classid)
116 {
117 struct sch_bpf_qdisc *q = qdisc_priv(sch);
118 struct Qdisc_class_common *clc;
119
120 clc = qdisc_class_find(&q->clhash, classid);
121 if (clc == NULL)
122 return NULL;
123 return container_of(clc, struct sch_bpf_class, common);
124 }
125
126 static struct sch_bpf_class *sch_bpf_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
127 {
128 struct sch_bpf_qdisc *q = qdisc_priv(sch);
129 struct tcf_proto *filter;
130 struct sch_bpf_class *cl;
131 struct tcf_result res;
132 int result;
133
134 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
> 135 while (tcf && (result = tcf_classify(skb, NULL, tcf, &res, false)) >= 0) {
136 #ifdef CONFIG_NET_CLS_ACT
137 switch (result) {
138 case TC_ACT_QUEUED:
139 case TC_ACT_STOLEN:
140 case TC_ACT_TRAP:
141 *qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
142 fallthrough;
143 case TC_ACT_SHOT:
144 return NULL;
145 }
146 #endif
147 cl = (void *)res.class;
148 if (!cl) {
149 cl = sch_bpf_find(sch, res.classid);
150 if (!cl)
151 break;
152 }
153
154 tcf = rcu_dereference_bh(cl->filter_list);
155 }
156
157 return cl;
158 }
159
160 static int sch_bpf_enqueue(struct sk_buff *skb, struct Qdisc *sch,
161 struct sk_buff **to_free)
162 {
163 struct sch_bpf_qdisc *q = qdisc_priv(sch);
164 unsigned int len = qdisc_pkt_len(skb);
165 struct sch_bpf_ctx ctx = {};
166 struct sch_bpf_class *cl;
167 int res;
168
169 cl = sch_bpf_classify(skb, sch, &res);
170 if (!cl) {
171 struct bpf_prog *enqueue;
172
173 enqueue = rcu_dereference(q->enqueue_prog);
174 bpf_compute_data_pointers(skb);
175
176 ctx.skb = skb;
177 ctx.nr_classes = q->clhash.hashelems;
178 ctx.nr_packets = sch->q.qlen;
179 res = BPF_PROG_RUN(enqueue, &ctx);
180 cl = sch_bpf_find(sch, ctx.classid);
181 if (!cl) {
182 if (res & __NET_XMIT_BYPASS)
183 qdisc_qstats_drop(sch);
184 __qdisc_drop(skb, to_free);
185 return res;
186 }
187 }
188
189 if (cl->qdisc) {
> 190 if ((ret = qdisc_enqueue(skb, cl->qdisc,
191 to_free)) != NET_XMIT_SUCCESS) {
192 if (net_xmit_drop_count(ret)) {
193 qdisc_qstats_drop(sch);
194 cl->drops++;
195 }
196 return ret;
197 }
198 } else {
199 sch_bpf_skb_cb(skb)->rank = ctx.rank;
> 200 pq_push(&cl->pq, &skb->rbnode);
201 }
202
203 sch->qstats.backlog += len;
204 sch->q.qlen++;
205 return res;
206 }
207
208 static struct sk_buff *sch_bpf_dequeue(struct Qdisc *sch)
209 {
210 struct sch_bpf_qdisc *q = qdisc_priv(sch);
211 struct sch_bpf_ctx ctx = {};
212 struct sk_buff *ret = NULL;
213 struct bpf_prog *dequeue;
214 struct sch_bpf_class *cl;
215 struct pq_node *flow;
216 int res;
217
218 dequeue = rcu_dereference(q->dequeue_prog);
> 219 bpf_compute_data_pointers(skb);
220
221 flow = pq_pop(&q->flows);
222 if (!flow)
223 return NULL;
224
225 cl = container_of(flow, struct sch_bpf_class, node);
226 if (cl->qdisc) {
227 ctx.skb = cl->qdisc->dequeue(cl->qdisc);
228 ctx.classid = cl->common.classid;
229 } else {
> 230 ctx.skb = pq_pop(&cl->pq);
231 ctx.classid = cl->rank;
232 }
233 ctx.nr_classes = q->clhash.hashelems;
234 ctx.nr_packets = sch->q.qlen;
235 res = BPF_PROG_RUN(dequeue, &ctx);
> 236 if (res == SCH_BPF_RET_OK) {
237 ret = ctx.skb;
> 238 } else if (res == SCH_BPF_RET_REQUEUE) {
239 sch_bpf_skb_cb(ctx.skb)->rank = ctx.rank;
240 pq_push(&cl->pq, &ctx.skb->rbnode);
241 ret = NULL;
242 } else {
243 kfree_skb(ctx.skb);
244 ret = NULL;
245 }
246
247 cl->rank = ctx.classid;
248 if (pq_top(&cl->pq)) {
249 pq_push(&q->flows, &cl->node);
250 }
251 return ret;
252 }
253
254 static struct Qdisc *sch_bpf_leaf(struct Qdisc *sch, unsigned long arg)
255 {
256 struct sch_bpf_class *cl = (struct sch_bpf_class *)arg;
257
258 return cl->qdisc;
259 }
260
261 static int sch_bpf_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
262 struct Qdisc **old, struct netlink_ext_ack *extack)
263 {
264 struct sch_bpf_class *cl = (struct sch_bpf_class *)arg;
265
266 if (new)
267 *old = qdisc_replace(sch, new, &cl->qdisc);
268 return 0;
269 }
270
271 static unsigned long sch_bpf_bind(struct Qdisc *sch, unsigned long parent,
272 u32 classid)
273 {
274 return 0;
275 }
276
277 static void sch_bpf_unbind(struct Qdisc *q, unsigned long cl)
278 {
279 }
280
281 static unsigned long sch_bpf_search(struct Qdisc *sch, u32 handle)
282 {
> 283 return (unsigned long)sch_bpf_find(handle, sch);
284 }
285
286 static struct tcf_block *sch_bpf_tcf_block(struct Qdisc *sch, unsigned long cl,
287 struct netlink_ext_ack *extack)
288 {
289 struct sch_bpf_qdisc *q = qdisc_priv(sch);
290
291 if (cl)
292 return NULL;
293 return q->block;
294 }
295
296 static const struct nla_policy sch_bpf_policy[TCA_SCH_BPF_MAX + 1] = {
> 297 [TCA_SCH_BPF_ENQUEUE_PROG_FD] = { .type = NLA_U32 },
298 [TCA_SCH_BPF_ENQUEUE_PROG_NAME] = { .type = NLA_NUL_STRING,
299 .len = ACT_BPF_NAME_LEN },
> 300 [TCA_SCH_BPF_DEQUEUE_PROG_FD] = { .type = NLA_U32 },
301 [TCA_SCH_BPF_DEQUEUE_PROG_NAME] = { .type = NLA_NUL_STRING,
302 .len = ACT_BPF_NAME_LEN },
303 };
304
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[kees:kspp/memcpy/next-20210803/v2-devel 77/86] include/linux/string.h:297:2: error: implicit declaration of function '__underlying_memcpy'; did you mean '__builtin_memcpy'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210803/v2-devel
head: 4752984fc24104f399e70f99d48afa047d86a381
commit: 0faff4e74f49485683ea9757f2e49fdab41c7f20 [77/86] netlink: Use flex_cpy() to avoid false-positive memcpy() warning
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 10.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
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210803/v2-devel
git checkout 0faff4e74f49485683ea9757f2e49fdab41c7f20
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/bitmap.h:10,
from include/linux/cpumask.h:12,
from include/linux/mm_types_task.h:14,
from include/linux/mm_types.h:5,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from net/netlink/af_netlink.c:21:
net/netlink/af_netlink.c: In function 'netlink_ack':
>> include/linux/string.h:297:2: error: implicit declaration of function '__underlying_memcpy'; did you mean '__builtin_memcpy'? [-Werror=implicit-function-declaration]
297 | __underlying_memcpy(dst, src, __src_bytes); \
| ^~~~~~~~~~~~~~~~~~~
net/netlink/af_netlink.c:2452:2: note: in expansion of macro 'flex_cpy'
2452 | flex_cpy(&errmsg->msg, errlen, nlh, errlen, nlmsg_content);
| ^~~~~~~~
cc1: some warnings being treated as errors
vim +297 include/linux/string.h
01f33c336e2d29 Martin Wilck 2017-08-14 274
1e9264c10e1d25 Kees Cook 2021-08-10 275 /** flex_cpy - Copy between two flexible array members.
1e9264c10e1d25 Kees Cook 2021-08-10 276 *
1e9264c10e1d25 Kees Cook 2021-08-10 277 * @dst: Destination pointer
1e9264c10e1d25 Kees Cook 2021-08-10 278 * @dst_count: Number of @member elements to copy at end of @dst struct
1e9264c10e1d25 Kees Cook 2021-08-10 279 * @src: Source pointer
1e9264c10e1d25 Kees Cook 2021-08-10 280 * @src_count: Number of @member elements to copy from end of @src struct
1e9264c10e1d25 Kees Cook 2021-08-10 281 * @member: The flexible array member of both @src and @dst
1e9264c10e1d25 Kees Cook 2021-08-10 282 *
1e9264c10e1d25 Kees Cook 2021-08-10 283 * The full structure of @src will be copied to @dst, as well as
1e9264c10e1d25 Kees Cook 2021-08-10 284 * @src_count @member elements. @src and @dst must reference the same type.
1e9264c10e1d25 Kees Cook 2021-08-10 285 * @dst_count must be >= @src_count.
1e9264c10e1d25 Kees Cook 2021-08-10 286 */
1e9264c10e1d25 Kees Cook 2021-08-10 287 #define flex_cpy(dst, dst_count, src, src_count, member) ({ \
1e9264c10e1d25 Kees Cook 2021-08-10 288 size_t __dst_bytes = struct_size(dst, member, dst_count); \
1e9264c10e1d25 Kees Cook 2021-08-10 289 size_t __src_bytes = struct_size(src, member, src_count); \
1e9264c10e1d25 Kees Cook 2021-08-10 290 BUILD_BUG_ON(!__same_type(*(dst), *(src))); \
1e9264c10e1d25 Kees Cook 2021-08-10 291 WARN_ONCE(IS_ENABLED(CONFIG_FORTIFY_SOURCE) && \
1e9264c10e1d25 Kees Cook 2021-08-10 292 __dst_bytes < __src_bytes, \
1e9264c10e1d25 Kees Cook 2021-08-10 293 "flex_cpy: detected write overflow (size %zu) of %s (size %zu)\n", \
1e9264c10e1d25 Kees Cook 2021-08-10 294 __src_bytes, \
1e9264c10e1d25 Kees Cook 2021-08-10 295 "field \"" #dst "\" at " __FILE__ ":" __stringify(__LINE__), \
1e9264c10e1d25 Kees Cook 2021-08-10 296 __dst_bytes); \
1e9264c10e1d25 Kees Cook 2021-08-10 @297 __underlying_memcpy(dst, src, __src_bytes); \
1e9264c10e1d25 Kees Cook 2021-08-10 298 })
1e9264c10e1d25 Kees Cook 2021-08-10 299
:::::: The code at line 297 was first introduced by commit
:::::: 1e9264c10e1d259549421c6f5adfedb80144a6b3 string: Introduce flexible array memcpy() helpers
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Kees Cook <keescook(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 5214/6860] kernel/sys.c:1896:19: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8ca403f3e7a23c4513046ad8d107adfbe4703362
commit: 9cf1d7d830f4a586dfa4ddcaf9eae3959e0708ef [5214/6860] ARC: cmpxchg/xchg: rewrite as macros to make type safe
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 9cf1d7d830f4a586dfa4ddcaf9eae3959e0708ef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/sys.c:1896:19: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct file [noderef] __rcu *_val_ @@ got struct file *[assigned] file @@
kernel/sys.c:1896:19: sparse: expected struct file [noderef] __rcu *_val_
kernel/sys.c:1896:19: sparse: got struct file *[assigned] file
kernel/sys.c:1896:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *old_exe @@ got struct file [noderef] __rcu *[assigned] _val_ @@
kernel/sys.c:1896:17: sparse: expected struct file *old_exe
kernel/sys.c:1896:17: sparse: got struct file [noderef] __rcu *[assigned] _val_
kernel/sys.c:1067:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p1 @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/sys.c:1067:32: sparse: expected struct task_struct *p1
kernel/sys.c:1067:32: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/sys.c: note: in included file (through include/linux/rcuwait.h, include/linux/percpu-rwsem.h, include/linux/fs.h, ...):
include/linux/sched/signal.h:714:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
include/linux/sched/signal.h:714:37: sparse: expected struct spinlock [usertype] *lock
include/linux/sched/signal.h:714:37: sparse: got struct spinlock [noderef] __rcu *
--
>> net/ipv4/tcp_cong.c:238:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct tcp_congestion_ops const [noderef] __rcu *_val_ @@ got struct tcp_congestion_ops *[assigned] ca @@
net/ipv4/tcp_cong.c:238:24: sparse: expected struct tcp_congestion_ops const [noderef] __rcu *_val_
net/ipv4/tcp_cong.c:238:24: sparse: got struct tcp_congestion_ops *[assigned] ca
net/ipv4/tcp_cong.c:238:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct tcp_congestion_ops const *prev @@ got struct tcp_congestion_ops const [noderef] __rcu *[assigned] _val_ @@
net/ipv4/tcp_cong.c:238:22: sparse: expected struct tcp_congestion_ops const *prev
net/ipv4/tcp_cong.c:238:22: sparse: got struct tcp_congestion_ops const [noderef] __rcu *[assigned] _val_
vim +1896 kernel/sys.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1845
6e399cd144d850 Davidlohr Bueso 2015-04-16 1846 static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1847 {
2903ff019b346a Al Viro 2012-08-28 1848 struct fd exe;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1849 struct file *old_exe, *exe_file;
496ad9aa8ef448 Al Viro 2013-01-23 1850 struct inode *inode;
2903ff019b346a Al Viro 2012-08-28 1851 int err;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1852
2903ff019b346a Al Viro 2012-08-28 1853 exe = fdget(fd);
2903ff019b346a Al Viro 2012-08-28 1854 if (!exe.file)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1855 return -EBADF;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1856
496ad9aa8ef448 Al Viro 2013-01-23 1857 inode = file_inode(exe.file);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1858
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1859 /*
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1860 * Because the original mm->exe_file points to executable file, make
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1861 * sure that this one is executable as well, to avoid breaking an
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1862 * overall picture.
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1863 */
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1864 err = -EACCES;
90f8572b0f021f Eric W. Biederman 2015-06-29 1865 if (!S_ISREG(inode->i_mode) || path_noexec(&exe.file->f_path))
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1866 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1867
02f92b3868a1b3 Christian Brauner 2021-01-21 1868 err = file_permission(exe.file, MAY_EXEC);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1869 if (err)
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1870 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1871
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1872 /*
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1873 * Forbid mm->exe_file change if old file still mapped.
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1874 */
6e399cd144d850 Davidlohr Bueso 2015-04-16 1875 exe_file = get_mm_exe_file(mm);
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1876 err = -EBUSY;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1877 if (exe_file) {
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1878 struct vm_area_struct *vma;
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1879
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1880 mmap_read_lock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1881 for (vma = mm->mmap; vma; vma = vma->vm_next) {
6e399cd144d850 Davidlohr Bueso 2015-04-16 1882 if (!vma->vm_file)
6e399cd144d850 Davidlohr Bueso 2015-04-16 1883 continue;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1884 if (path_equal(&vma->vm_file->f_path,
6e399cd144d850 Davidlohr Bueso 2015-04-16 1885 &exe_file->f_path))
6e399cd144d850 Davidlohr Bueso 2015-04-16 1886 goto exit_err;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1887 }
6e399cd144d850 Davidlohr Bueso 2015-04-16 1888
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1889 mmap_read_unlock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1890 fput(exe_file);
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1891 }
bafb282df29c15 Konstantin Khlebnikov 2012-06-07 1892
4229fb1dc6843c Konstantin Khlebnikov 2012-07-11 1893 err = 0;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1894 /* set the new file, lockless */
6e399cd144d850 Davidlohr Bueso 2015-04-16 1895 get_file(exe.file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 @1896 old_exe = xchg(&mm->exe_file, exe.file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1897 if (old_exe)
6e399cd144d850 Davidlohr Bueso 2015-04-16 1898 fput(old_exe);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1899 exit:
2903ff019b346a Al Viro 2012-08-28 1900 fdput(exe);
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1901 return err;
6e399cd144d850 Davidlohr Bueso 2015-04-16 1902 exit_err:
d8ed45c5dcd455 Michel Lespinasse 2020-06-08 1903 mmap_read_unlock(mm);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1904 fput(exe_file);
6e399cd144d850 Davidlohr Bueso 2015-04-16 1905 goto exit;
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1906 }
b32dfe377102ce Cyrill Gorcunov 2012-05-31 1907
:::::: The code at line 1896 was first introduced by commit
:::::: 6e399cd144d8500ffb5d40fa6848890e2580a80a prctl: avoid using mmap_sem for exe_file serialization
:::::: TO: Davidlohr Bueso <dave(a)stgolabs.net>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH mptcp-next 4/5] mptcp: add MPTCP_SUBFLOW_ADDRS getsockopt support
by kernel test robot
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on kselftest/next]
[also build test ERROR on mptcp/export linus/master v5.14-rc5 next-20210811]
[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/Florian-Westphal/mptcp-add-SOL_M...
base: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
config: i386-randconfig-a004-20210811 (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/bd7031682bfb2cfd717fde49bd7f943c0...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/mptcp-add-SOL_MPTCP-getsockopt-support/20210811-212510
git checkout bd7031682bfb2cfd717fde49bd7f943c09f7a9a5
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:32:
>> ./usr/include/linux/mptcp.h:205:3: error: unknown type name 'sa_family_t'
205 | sa_family_t sa_family;
| ^~~~~~~~~~~
>> ./usr/include/linux/mptcp.h:206:19: error: field 'sa_local' has incomplete type
206 | struct sockaddr sa_local;
| ^~~~~~~~
>> ./usr/include/linux/mptcp.h:208:23: error: field 'sin6_local' has incomplete type
208 | struct sockaddr_in6 sin6_local;
| ^~~~~~~~~~
>> ./usr/include/linux/mptcp.h:209:27: error: field 'ss_local' has incomplete type
209 | struct sockaddr_storage ss_local;
| ^~~~~~~~
>> ./usr/include/linux/mptcp.h:212:19: error: field 'sa_remote' has incomplete type
212 | struct sockaddr sa_remote;
| ^~~~~~~~~
>> ./usr/include/linux/mptcp.h:214:23: error: field 'sin6_remote' has incomplete type
214 | struct sockaddr_in6 sin6_remote;
| ^~~~~~~~~~~
>> ./usr/include/linux/mptcp.h:215:27: error: field 'ss_remote' has incomplete type
215 | struct sockaddr_storage ss_remote;
| ^~~~~~~~~
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v2 40/60] KVM: PPC: Book3S HV P9: Implement TM fastpath for guest entry/exit
by kernel test robot
Hi Nicholas,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v5.14-rc5 next-20210811]
[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/Nicholas-Piggin/KVM-PPC-Book3S-H...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r024-20210811 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/30a3a9ae99f124a863c41f268c68b647d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nicholas-Piggin/KVM-PPC-Book3S-HV-P9-entry-exit-optimisations/20210812-000748
git checkout 30a3a9ae99f124a863c41f268c68b647d7116b65
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kvm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/processor.h:11,
from arch/powerpc/include/asm/thread_info.h:40,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/powerpc/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/powerpc/kvm/book3s_hv_p9_entry.c:3:
arch/powerpc/kvm/book3s_hv_p9_entry.c: In function 'load_vcpu_state':
>> arch/powerpc/kvm/book3s_hv_p9_entry.c:297:33: error: 'struct kvm_vcpu_arch' has no member named 'texasr'
297 | mtspr(SPRN_TEXASR, vcpu->arch.texasr);
| ^
arch/powerpc/include/asm/reg.h:1396:33: note: in definition of macro 'mtspr'
1396 | : "r" ((unsigned long)(v)) \
| ^
>> arch/powerpc/kvm/book3s_hv_p9_entry.c:298:33: error: 'struct kvm_vcpu_arch' has no member named 'tfhar'; did you mean 'tar'?
298 | mtspr(SPRN_TFHAR, vcpu->arch.tfhar);
| ^~~~~
arch/powerpc/include/asm/reg.h:1396:33: note: in definition of macro 'mtspr'
1396 | : "r" ((unsigned long)(v)) \
| ^
>> arch/powerpc/kvm/book3s_hv_p9_entry.c:299:33: error: 'struct kvm_vcpu_arch' has no member named 'tfiar'; did you mean 'tar'?
299 | mtspr(SPRN_TFIAR, vcpu->arch.tfiar);
| ^~~~~
arch/powerpc/include/asm/reg.h:1396:33: note: in definition of macro 'mtspr'
1396 | : "r" ((unsigned long)(v)) \
| ^
arch/powerpc/kvm/book3s_hv_p9_entry.c: In function 'store_vcpu_state':
arch/powerpc/kvm/book3s_hv_p9_entry.c:331:14: error: 'struct kvm_vcpu_arch' has no member named 'texasr'
331 | vcpu->arch.texasr = mfspr(SPRN_TEXASR);
| ^
arch/powerpc/kvm/book3s_hv_p9_entry.c:332:15: error: 'struct kvm_vcpu_arch' has no member named 'tfhar'; did you mean 'tar'?
332 | vcpu->arch.tfhar = mfspr(SPRN_TFHAR);
| ^~~~~
| tar
arch/powerpc/kvm/book3s_hv_p9_entry.c:333:15: error: 'struct kvm_vcpu_arch' has no member named 'tfiar'; did you mean 'tar'?
333 | vcpu->arch.tfiar = mfspr(SPRN_TFIAR);
| ^~~~~
| tar
vim +297 arch/powerpc/kvm/book3s_hv_p9_entry.c
283
284 /* Returns true if current MSR and/or guest MSR may have changed */
285 bool load_vcpu_state(struct kvm_vcpu *vcpu,
286 struct p9_host_os_sprs *host_os_sprs)
287 {
288 bool ret = false;
289
290 if (cpu_has_feature(CPU_FTR_TM) ||
291 cpu_has_feature(CPU_FTR_P9_TM_HV_ASSIST)) {
292 unsigned long guest_msr = vcpu->arch.shregs.msr;
293 if (MSR_TM_ACTIVE(guest_msr)) {
294 kvmppc_restore_tm_hv(vcpu, guest_msr, true);
295 ret = true;
296 } else {
> 297 mtspr(SPRN_TEXASR, vcpu->arch.texasr);
> 298 mtspr(SPRN_TFHAR, vcpu->arch.tfhar);
> 299 mtspr(SPRN_TFIAR, vcpu->arch.tfiar);
300 }
301 }
302
303 load_spr_state(vcpu, host_os_sprs);
304
305 load_fp_state(&vcpu->arch.fp);
306 #ifdef CONFIG_ALTIVEC
307 load_vr_state(&vcpu->arch.vr);
308 #endif
309 mtspr(SPRN_VRSAVE, vcpu->arch.vrsave);
310
311 return ret;
312 }
313 EXPORT_SYMBOL_GPL(load_vcpu_state);
314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[avpatel:riscv_kvm_aia_v1 39/41] include/linux/irqchip/riscv-imsic.h:61:10: error: use of undeclared identifier 'ENODEV'
by kernel test robot
tree: https://github.com/avpatel/linux.git riscv_kvm_aia_v1
head: 9a2d1d388df8ab52feb55ad9ef378b083fdab478
commit: 3239d0fad48d4b7fab5b275cef7889fac99f53ca [39/41] RISC-V: KVM: Initial skeletal support for in-kernel AIA irqchip
config: riscv-randconfig-r022-20210810 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d39ebdae674c8efc84ebe8dc32716ec353220530)
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
# https://github.com/avpatel/linux/commit/3239d0fad48d4b7fab5b275cef7889fac...
git remote add avpatel https://github.com/avpatel/linux.git
git fetch --no-tags avpatel riscv_kvm_aia_v1
git checkout 3239d0fad48d4b7fab5b275cef7889fac99f53ca
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/kvm/aia/aia.c:10:
>> include/linux/irqchip/riscv-imsic.h:61:10: error: use of undeclared identifier 'ENODEV'
return -ENODEV;
^
1 error generated.
vim +/ENODEV +61 include/linux/irqchip/riscv-imsic.h
b6d8139e22dcf8 Anup Patel 2021-04-26 56
b6d8139e22dcf8 Anup Patel 2021-04-26 57 static inline int imsic_cpu_page_phys(unsigned int cpu,
b6d8139e22dcf8 Anup Patel 2021-04-26 58 unsigned int guest_index,
b6d8139e22dcf8 Anup Patel 2021-04-26 59 phys_addr_t *out_msi_pa)
b6d8139e22dcf8 Anup Patel 2021-04-26 60 {
b6d8139e22dcf8 Anup Patel 2021-04-26 @61 return -ENODEV;
b6d8139e22dcf8 Anup Patel 2021-04-26 62 }
b6d8139e22dcf8 Anup Patel 2021-04-26 63
:::::: The code at line 61 was first introduced by commit
:::::: b6d8139e22dcf8bcfe9a4c89b1dde6c59591eab8 irqchip: Add RISC-V incoming MSI controller driver
:::::: TO: Anup Patel <anup.patel(a)wdc.com>
:::::: CC: Anup Patel <anup(a)brainfault.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH] ARM/smp_twd: Cleanup the unnecessary cast
by kernel test robot
Hi Tang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on xlnx/master]
[also build test WARNING on arm/for-next keystone/next soc/for-next rockchip/for-next arm64/for-next/core shawnguo/for-next clk/clk-next linus/master v5.14-rc5 next-20210811]
[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/Tang-Bin/ARM-smp_twd-Cleanup-the...
base: https://github.com/Xilinx/linux-xlnx master
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.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
# https://github.com/0day-ci/linux/commit/d796b458f195f35962a4ca889134f542e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tang-Bin/ARM-smp_twd-Cleanup-the-unnecessary-cast/20210811-211613
git checkout d796b458f195f35962a4ca889134f542e2186b1f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arm
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 >>):
In file included from include/linux/printk.h:7,
from include/linux/kernel.h:16,
from arch/arm/kernel/smp_twd.c:9:
arch/arm/kernel/smp_twd.c: In function 'twd_get_clock':
>> include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH'
11 | #define KERN_ERR KERN_SOH "3" /* error conditions */
| ^~~~~~~~
include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR'
343 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~
arch/arm/kernel/smp_twd.c:202:3: note: in expansion of macro 'pr_err'
202 | pr_err("smp_twd: clock not found %d\n", PTR_ERR(twd_clk));
| ^~~~~~
vim +5 include/linux/kern_levels.h
314ba3520e513a Joe Perches 2012-07-30 4
04d2c8c83d0e3a Joe Perches 2012-07-30 @5 #define KERN_SOH "\001" /* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30 6 #define KERN_SOH_ASCII '\001'
04d2c8c83d0e3a Joe Perches 2012-07-30 7
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month