• Mika Westerberg's avatar
    net: thunderbolt: Fix sparse warnings in tbnet_check_frame() and tbnet_poll() · 18536722
    Mika Westerberg authored
    Fixes the following warnings when the driver is built with sparse
    checks enabled:
    
    main.c:767:47: warning: restricted __le32 degrades to integer
    main.c:775:47: warning: restricted __le16 degrades to integer
    main.c:776:44: warning: restricted __le16 degrades to integer
    main.c:876:40: warning: incorrect type in assignment (different base types)
    main.c:876:40:    expected restricted __le32 [usertype] frame_size
    main.c:876:40:    got unsigned int [assigned] [usertype] frame_size
    main.c:877:41: warning: incorrect type in assignment (different base types)
    main.c:877:41:    expected restricted __le32 [usertype] frame_count
    main.c:877:41:    got unsigned int [usertype]
    main.c:878:41: warning: incorrect type in assignment (different base types)
    main.c:878:41:    expected restricted __le16 [usertype] frame_index
    main.c:878:41:    got unsigned short [usertype]
    main.c:879:38: warning: incorrect type in assignment (different base types)
    main.c:879:38:    expected restricted __le16 [usertype] frame_id
    main.c:879:38:    got unsigned short [usertype]
    main.c:880:62: warning: restricted __le32 degrades to integer
    main.c:880:35: warning: restricted __le16 degrades to integer
    
    No functional changes intended.
    Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
    Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
    Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    18536722
main.c 37.8 KB