[PATCH v1] drm/tiny: correctly print `struct resource *` on error

Thomas Zimmermann tzimmermann at suse.de
Wed Oct 11 07:19:21 UTC 2023



Am 10.10.23 um 19:46 schrieb Joey Gouly:
> The `res` variable is already a `struct resource *`, don't take the address of it.
> 
> Fixes incorrect output:
> 
> 	simple-framebuffer 9e20dc000.framebuffer: [drm] *ERROR* could not acquire memory range [??? 0xffff4be88a387d00-0xfffffefffde0a240 flags 0x0]: -16
> 
> To be correct:
> 
> 	simple-framebuffer 9e20dc000.framebuffer: [drm] *ERROR* could not acquire memory range [mem 0x9e20dc000-0x9e307bfff flags 0x200]: -16
> 
> Signed-off-by: Joey Gouly <joey.gouly at arm.com>
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: Javier Martinez Canillas <javierm at redhat.com>

Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>

Thanks for the patch.

> ---
>   drivers/gpu/drm/tiny/simpledrm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
> index ff86ba1ae1b8..8ea120eb8674 100644
> --- a/drivers/gpu/drm/tiny/simpledrm.c
> +++ b/drivers/gpu/drm/tiny/simpledrm.c
> @@ -745,7 +745,7 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv,
>   
>   		ret = devm_aperture_acquire_from_firmware(dev, res->start, resource_size(res));
>   		if (ret) {
> -			drm_err(dev, "could not acquire memory range %pr: %d\n", &res, ret);
> +			drm_err(dev, "could not acquire memory range %pr: %d\n", res, ret);
>   			return ERR_PTR(ret);
>   		}
>   

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20231011/1735c5d8/attachment.sig>


More information about the dri-devel mailing list