lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44C25392.5000508@garzik.org>
Date:	Sat, 22 Jul 2006 12:34:26 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Dave Airlie <airlied@...ux.ie>
CC:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: remove pci domain local copy (02/07)

Dave Airlie wrote:
> Just call a function to retrieve the pci domain, this isn't exactly
> hotpath code.
> 
> Signed-off-by: Dave Airlie <airlied@...ux.ie>
> (cherry picked from 01852d755753bbfcd5434c55d4d7375580f8338f commit)
> ---
>  drivers/char/drm/drmP.h      |   10 +++++++++-
>  drivers/char/drm/drm_ioctl.c |    4 ++--
>  drivers/char/drm/drm_irq.c   |    2 +-
>  3 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
> index 5c8f245..4dd28e1 100644
> --- a/drivers/char/drm/drmP.h
> +++ b/drivers/char/drm/drmP.h
> @@ -711,7 +711,6 @@ typedef struct drm_device {
>  	drm_agp_head_t *agp;	/**< AGP data */
>  
>  	struct pci_dev *pdev;		/**< PCI device structure */
> -	int pci_domain;			/**< PCI bus domain number */
>  #ifdef __alpha__
>  	struct pci_controller *hose;
>  #endif
> @@ -733,6 +732,15 @@ static __inline__ int drm_core_check_fea

I would presume that hose goes away too?


> +static inline int drm_get_pci_domain(struct drm_device *dev)
> +{
> +#ifdef __alpha__
> +	return dev->hose->bus->number;
> +#else
> +	return 0;
> +#endif
> +}

Please use the always-present pci_domain_nr() rather than inventing a 
DRM-specific function that does the same thing.

	Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ