• Randy Dunlap's avatar
    drm: simpledrm: print resource info using '%pr' · d84680d3
    Randy Dunlap authored
    struct resource start and end fields are not always long long,
    so using %llx to print them can cause build warnings (below).
    Fix these by using the special "%pr" for printing struct resource info.
    
    ../drivers/gpu/drm/tiny/simpledrm.c: In function ‘simpledrm_device_init_mm’:
    ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=]
    ../drivers/gpu/drm/tiny/simpledrm.c:533:54: note: format string is defined here
       drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n",
                                                       ~~~^
                                                       %x
    ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=]
    ../drivers/gpu/drm/tiny/simpledrm.c:533:61: note: format string is defined here
       drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n",
                                                              ~~~^
                                                              %x
    
    Fixes: 4aae79f7 ("drm/simpledrm: Acquire memory aperture for framebuffer")
    Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
    Cc: Thomas Zimmermann <tzimmermann@suse.de>
    Cc: dri-devel@lists.freedesktop.org
    Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210512233459.19534-1-rdunlap@infradead.org
    d84680d3
simpledrm.c 22.5 KB