Re: [PATCH 1/2] usb: cdnsp: Fixes for sparse warnings

From: Peter Chen
Date: Tue Dec 15 2020 - 01:57:18 EST


On 20-12-15 06:14:07, Pawel Laszczak wrote:
> >On 20-12-15 05:27:38, Pawel Laszczak wrote:
> >> >
> >> >
> >> >On 20-12-14 13:03:44, Pawel Laszczak wrote:
> >> >> Patch fixes all sparse warnings in cdsnp driver.
> >> >>
> >> >> It fixes the following warnings:
> >> >> cdnsp-ring.c:1441: warning: incorrect type in assignment
> >> >> cdnsp-ring.c:1444: warning: restricted __le32 degrades to integer
> >> >> cdnsp-ring.c:2200: warning: dubious: x | !y
> >> >> cdnsp-gadget.c:501: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:504: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:507: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:508: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:509: warning: invalid assignment: |=
> >> >> cdnsp-gadget.c:510: warning: cast from restricted __le32
> >> >> cdnsp-gadget.c:558: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:561: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:570: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:1571: warning: incorrect type in argument 1
> >> >> cdnsp-gadget.c:1602: warning: restricted __le32 degrades to integer
> >> >> cdnsp-gadget.c:1760: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1762: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1763: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1764: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1765: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1766: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:1767: warning: incorrect type in assignment
> >> >> cdnsp-gadget.c:458: warning: cast truncates bits from constant value
> >> >> (ffffffff07ffffff becomes 7ffffff)
> >> >> cdnsp-gadget.c:666: warning: cast truncates bits from constant value
> >> >> (ffffffff07ffffff becomes 7ffffff)
> >> >> cdnsp-mem.c:762: warning: incorrect type in assignment
> >> >> cdnsp-mem.c:763: warning: incorrect type in assignment
> >> >> cdnsp-mem.c:928: warning: cast from restricted __le16
> >> >> cdnsp-mem.c:1187: warning: incorrect type in assignment
> >> >> cdnsp-mem.c:1191: warning: incorrect type in assignment
> >> >> cdnsp-ep0.c:142: warning: incorrect type in assignment
> >> >> cdnsp-ep0.c:144: warning: restricted __le32 degrades to integer
> >> >> cdnsp-ep0.c:147: warning: restricted __le32 degrades to integer
> >> >> cdnsp-ep0.c:148: warning: restricted __le32 degrades to integer
> >> >> cdnsp-ep0.c:179: warning: incorrect type in argument 1
> >> >> cdnsp-ep0.c:311: warning: incorrect type in argument 1
> >> >> cdnsp-ep0.c:469: warning: incorrect type in assignment
> >> >> cdnsp-trace.h:611:1: warning: cast from restricted __le32
> >> >>
> >> >> Signed-off-by: Pawel Laszczak <pawell@xxxxxxxxxxx>
> >> >> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> >> >
> >> >Hi Pawel,
> >> >
> >> >The Reported-by tag should be above your Sob tag, I will change it.
> >> >Except the patch reported build error by kernel test robot, I will apply
> >> >your other four patches after finishing the compile test.
> >> >
> >> >Peter
> >>
> >> Hi Peter,
> >>
> >> I'm going to fix the "usb: cdns3: Adds missing __iomem markers" today.
> >> I haven't seen any issue on ARCH=parisc. Maybe it's some specific riscv arch issue.
> >>
> >> I believe that:
> >> [auto build test WARNING on next-20201211]
> >> [cannot apply to peter.chen-usb/ci-for-usb-next v5.10 v5.10-rc7 v5.10-rc6 v5.10]
> >>
> >> is not the problem. I based on peter.chen-usb/for-usb-next.
> >>
> >> Also I can't open the url from kernel test robot report.
> >> Maybe there is some temporary issue with server.
> >>
> >
> >Thanks for checking it, I have already pushed your other four patches.
> >Besides, there is still a build error issue for new cdns3 driver.
> >
> >https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fwww.spinics.net%2Flists%2Flinux-&amp;data=04%7C01%7Cpeter.chen%40nxp.com%7Cf036cd7630664c9e0c5c08d8a0c0a637%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637436096594708469%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=DLBFVB2px5GgA6Y%2FTU4DrfVru6z3P4RXz2x7BSpdE4o%3D&amp;reserved=0
> >usb/msg206073.html__;!!EHscmS1ygiU1lA!X6rYk64ILtzjyHW903LAhBRjMKi9C2eyJWEXVlEZm0ly2BiNzY2wK46Ulq7q5w$
> >
>
> Did you applied: [PATCH] usb: cdnsp: Fix for undefined reference to `usb_hcd_is_primary_hcd' ?
>

Applied now.

--

Thanks,
Peter Chen