[PATCH 1/1] Simplify, statement is always true.
Hans de Goede
hdegoede at redhat.com
Fri Sep 23 07:17:31 UTC 2016
Hi,
On 09/22/2016 03:08 AM, Maya Rashish wrote:
> pVideo->bus is uint8_t, always less than 256.
>
> Signed-off-by: Maya Rashish <coypu at sdf.org>
LGTM:
Reviewed-by: Hans de Goede <hdegoede at redhat.com>
Regards,
Hans
> ---
> hw/xfree86/common/xf86pciBus.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
> index 8158c2b..bed4434 100644
> --- a/hw/xfree86/common/xf86pciBus.c
> +++ b/hw/xfree86/common/xf86pciBus.c
> @@ -1457,11 +1457,7 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
>
> pVideo = (struct pci_device *) busData;
>
> - if (pVideo->bus < 256)
> - snprintf(busnum, sizeof(busnum), "%d", pVideo->bus);
> - else
> - snprintf(busnum, sizeof(busnum), "%d@%d",
> - pVideo->bus & 0x00ff, pVideo->bus >> 8);
> + snprintf(busnum, sizeof(busnum), "%d", pVideo->bus);
>
> XNFasprintf(&tmp, "PCI:%s:%d:%d",
> busnum, pVideo->dev, pVideo->func);
>
More information about the xorg-devel
mailing list