From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
pjones@redhat.com, deller@gmx.de, ardb@kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device
Date: Mon, 29 Jan 2024 12:04:33 +0100 [thread overview]
Message-ID: <87ttmwv1ry.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20240117125527.23324-3-tzimmermann@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
> Add screen_info_get_pci_dev() to find the PCI device of an instance
> of screen_info. Does nothing on systems without PCI bus.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
[...]
> +struct pci_dev *screen_info_pci_dev(const struct screen_info *si)
> +{
> + struct resource res[SCREEN_INFO_MAX_RESOURCES];
> + size_t i, numres;
> + int ret;
> +
> + ret = screen_info_resources(si, res, ARRAY_SIZE(res));
> + if (ret < 0)
> + return ERR_PTR(ret);
> + numres = ret;
> +
I would just drop the ret variable and assign the screen_info_resources()
return value to numres. I think that makes the code easier to follow.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
pjones@redhat.com, deller@gmx.de, ardb@kernel.org
Cc: linux-fbdev@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device
Date: Mon, 29 Jan 2024 12:04:33 +0100 [thread overview]
Message-ID: <87ttmwv1ry.fsf@minerva.mail-host-address-is-not-set> (raw)
In-Reply-To: <20240117125527.23324-3-tzimmermann@suse.de>
Thomas Zimmermann <tzimmermann@suse.de> writes:
> Add screen_info_get_pci_dev() to find the PCI device of an instance
> of screen_info. Does nothing on systems without PCI bus.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
[...]
> +struct pci_dev *screen_info_pci_dev(const struct screen_info *si)
> +{
> + struct resource res[SCREEN_INFO_MAX_RESOURCES];
> + size_t i, numres;
> + int ret;
> +
> + ret = screen_info_resources(si, res, ARRAY_SIZE(res));
> + if (ret < 0)
> + return ERR_PTR(ret);
> + numres = ret;
> +
I would just drop the ret variable and assign the screen_info_resources()
return value to numres. I think that makes the code easier to follow.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2024-01-29 11:04 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 12:39 [PATCH 0/8] firmware/sysfb: Track parent device for screen_info Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-17 12:39 ` [PATCH 1/8] video: Add helpers for decoding screen_info Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 10:41 ` Javier Martinez Canillas
2024-01-29 10:41 ` Javier Martinez Canillas
2024-01-30 13:12 ` Thomas Zimmermann
2024-01-30 13:12 ` Thomas Zimmermann
2024-01-17 12:39 ` [PATCH 2/8] video: Provide screen_info_get_pci_dev() to find screen_info's PCI device Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:04 ` Javier Martinez Canillas [this message]
2024-01-29 11:04 ` Javier Martinez Canillas
2024-01-30 10:12 ` Thomas Zimmermann
2024-01-30 10:12 ` Thomas Zimmermann
2024-01-30 10:23 ` Javier Martinez Canillas
2024-01-30 10:23 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 3/8] firmware/sysfb: Set firmware-framebuffer parent device Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:28 ` Javier Martinez Canillas
2024-01-29 11:28 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 4/8] fbdev/efifb: Remove PM for " Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:30 ` Javier Martinez Canillas
2024-01-29 11:30 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 5/8] firmware/sysfb: Create firmware device only for enabled PCI devices Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:36 ` Javier Martinez Canillas
2024-01-29 11:36 ` Javier Martinez Canillas
2024-01-30 12:52 ` Thomas Zimmermann
2024-01-30 12:52 ` Thomas Zimmermann
2024-01-17 12:39 ` [PATCH 6/8] fbdev/efifb: Do not track parent device status Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:38 ` Javier Martinez Canillas
2024-01-29 11:38 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 7/8] firmware/sysfb: Update screen_info for relocated EFI framebuffers Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 11:52 ` Javier Martinez Canillas
2024-01-29 11:52 ` Javier Martinez Canillas
2024-01-29 12:03 ` Javier Martinez Canillas
2024-01-29 12:03 ` Javier Martinez Canillas
2024-01-17 12:39 ` [PATCH 8/8] fbdev/efifb: Remove framebuffer relocation tracking Thomas Zimmermann
2024-01-17 12:39 ` Thomas Zimmermann
2024-01-29 12:03 ` Javier Martinez Canillas
2024-01-29 12:03 ` Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ttmwv1ry.fsf@minerva.mail-host-address-is-not-set \
--to=javierm@redhat.com \
--cc=ardb@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=pjones@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.