[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202003190735.DDDoehHD%lkp@intel.com>
Date: Thu, 19 Mar 2020 07:33:48 +0800
From: kbuild test robot <lkp@...el.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Li Yang <leoyang.li@....com>, Timur Tabi <timur@...nel.org>
Subject: drivers/usb/gadget/udc/fsl_qe_udc.c:836:13: warning: cast from
pointer to integer of different size
Hi Rasmus,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5076190daded2197f62fe92cf69674488be44175
commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE
date: 3 months ago
config: powerpc-randconfig-a001-20200319 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.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 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'qe_ep0_rx':
>> drivers/usb/gadget/udc/fsl_qe_udc.c:836:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
836 | vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
| ^
In file included from drivers/usb/gadget/udc/fsl_qe_udc.c:41:
>> drivers/usb/gadget/udc/fsl_qe_udc.c:837:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
837 | frame_set_data(pframe, (u8 *)vaddr);
| ^
drivers/usb/gadget/udc/fsl_qe_udc.h:229:47: note: in definition of macro 'frame_set_data'
229 | #define frame_set_data(frm, dat) (frm->data = dat)
| ^~~
drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'ep_rx_tasklet':
drivers/usb/gadget/udc/fsl_qe_udc.c:964:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
964 | vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
| ^
In file included from drivers/usb/gadget/udc/fsl_qe_udc.c:41:
drivers/usb/gadget/udc/fsl_qe_udc.c:965:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
965 | frame_set_data(pframe, (u8 *)vaddr);
| ^
drivers/usb/gadget/udc/fsl_qe_udc.h:229:47: note: in definition of macro 'frame_set_data'
229 | #define frame_set_data(frm, dat) (frm->data = dat)
| ^~~
drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'ep_req_rx':
drivers/usb/gadget/udc/fsl_qe_udc.c:1490:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1490 | vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
| ^
In file included from drivers/usb/gadget/udc/fsl_qe_udc.c:41:
drivers/usb/gadget/udc/fsl_qe_udc.c:1491:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1491 | frame_set_data(pframe, (u8 *)vaddr);
| ^
drivers/usb/gadget/udc/fsl_qe_udc.h:229:47: note: in definition of macro 'frame_set_data'
229 | #define frame_set_data(frm, dat) (frm->data = dat)
| ^~~
drivers/usb/gadget/udc/fsl_qe_udc.c: In function 'qe_ep_init':
drivers/usb/gadget/udc/fsl_qe_udc.c:542:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
542 | if ((max == 128) || (max == 256) || (max == 512))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:544:4: note: here
544 | default:
| ^~~~~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:563:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
563 | if (max <= 1024)
| ^
drivers/usb/gadget/udc/fsl_qe_udc.c:565:4: note: here
565 | case USB_SPEED_FULL:
| ^~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:566:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
566 | if (max <= 64)
| ^
drivers/usb/gadget/udc/fsl_qe_udc.c:568:4: note: here
568 | default:
| ^~~~~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:580:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
580 | if (max <= 1024)
| ^
drivers/usb/gadget/udc/fsl_qe_udc.c:582:4: note: here
582 | case USB_SPEED_FULL:
| ^~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:596:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
596 | switch (max) {
| ^~~~~~
drivers/usb/gadget/udc/fsl_qe_udc.c:608:4: note: here
608 | case USB_SPEED_LOW:
| ^~~~
vim +836 drivers/usb/gadget/udc/fsl_qe_udc.c
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 807
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 808 static int qe_ep0_rx(struct qe_udc *udc)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 809 {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 810 struct qe_ep *ep = &udc->eps[0];
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 811 struct qe_frame *pframe;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 812 struct qe_bd __iomem *bd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 813 u32 bdstatus, length;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 814 u32 vaddr;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 815
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 816 pframe = ep->rxframe;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 817
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 818 if (ep->dir == USB_DIR_IN) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 819 dev_err(udc->dev, "ep0 not a control endpoint\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 820 return -EINVAL;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 821 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 822
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 823 bd = ep->n_rxbd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 824 bdstatus = in_be32((u32 __iomem *)bd);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 825 length = bdstatus & BD_LENGTH_MASK;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 826
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 827 while (!(bdstatus & R_E) && length) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 828 if ((bdstatus & R_F) && (bdstatus & R_L)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 829 && !(bdstatus & R_ERROR)) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 830 if (length == USB_CRC_SIZE) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 831 udc->ep0_state = WAIT_FOR_SETUP;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 832 dev_vdbg(udc->dev,
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 833 "receive a ZLP in status phase\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 834 } else {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 835 qe_frame_clean(pframe);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 @836 vaddr = (u32)phys_to_virt(in_be32(&bd->buf));
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 @837 frame_set_data(pframe, (u8 *)vaddr);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 838 frame_set_length(pframe,
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 839 (length - USB_CRC_SIZE));
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 840 frame_set_status(pframe, FRAME_OK);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 841 switch (bdstatus & R_PID) {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 842 case R_PID_SETUP:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 843 frame_set_info(pframe, PID_SETUP);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 844 break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 845 case R_PID_DATA1:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 846 frame_set_info(pframe, PID_DATA1);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 847 break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 848 default:
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 849 frame_set_info(pframe, PID_DATA0);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 850 break;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 851 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 852
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 853 if ((bdstatus & R_PID) == R_PID_SETUP)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 854 ep0_setup_handle(udc);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 855 else
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 856 qe_ep_rxframe_handle(ep);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 857 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 858 } else {
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 859 dev_err(udc->dev, "The receive frame with error!\n");
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 860 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 861
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 862 /* note: don't clear the rxbd's buffer address */
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 863 recycle_one_rxbd(ep);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 864
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 865 /* Get next BD */
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 866 if (bdstatus & R_W)
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 867 bd = ep->rxbase;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 868 else
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 869 bd++;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 870
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 871 bdstatus = in_be32((u32 __iomem *)bd);
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 872 length = bdstatus & BD_LENGTH_MASK;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 873
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 874 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 875
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 876 ep->n_rxbd = bd;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 877
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 878 return 0;
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 879 }
3948f0e0c999a6 drivers/usb/gadget/fsl_qe_udc.c Li Yang 2008-09-02 880
:::::: The code at line 836 was first introduced by commit
:::::: 3948f0e0c999a6201e9898bb8fbe3c6cc1199276 usb: add Freescale QE/CPM USB peripheral controller driver
:::::: TO: Li Yang <leoli@...escale.com>
:::::: CC: Greg Kroah-Hartman <gregkh@...e.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (26800 bytes)
Powered by blists - more mailing lists