• Louis Taylor's avatar
    vfio/pci: use correct format characters · 53ffab7d
    Louis Taylor authored
    [ Upstream commit 426b046b ]
    
    When compiling with -Wformat, clang emits the following warnings:
    
    drivers/vfio/pci/vfio_pci.c:1601:5: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                    ^~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1601:13: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                            ^~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1601:21: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                                    ^~~~~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1601:32: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                                               ^~~~~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1605:5: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                    ^~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1605:13: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                            ^~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1605:21: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                                    ^~~~~~~~~
    
    drivers/vfio/pci/vfio_pci.c:1605:32: warning: format specifies type
          'unsigned short' but the argument has type 'unsigned int' [-Wformat]
                                    vendor, device, subvendor, subdevice,
                                                               ^~~~~~~~~
    The types of these arguments are unconditionally defined, so this patch
    updates the format character to the correct ones for unsigned ints.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/378Signed-off-by: default avatarLouis Taylor <louis@kragniz.eu>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    53ffab7d
vfio_pci.c 37.5 KB