All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Kristen Accardi <kristen.c.accardi@intel.com>
Cc: pcihpd-discuss@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [patch] pci hotplug: add common acpi functions to core
Date: Tue, 28 Feb 2006 16:53:16 -0800	[thread overview]
Message-ID: <20060301005316.GA3681@kroah.com> (raw)
In-Reply-To: <1141174017.28842.6.camel@whizzy>

On Tue, Feb 28, 2006 at 04:46:57PM -0800, Kristen Accardi wrote:
> shpchprm_acpi.c and pciehprm_acpi.c are nearly identical.
> In addition, there are functions in both these files that
> are also in acpiphp_glue.c.  This patch will remove duplicate 
> functions from shpchp, pciehp, and acpiphp and move this 
> functionality to pci_hotplug, as it is not hardware specific.  
> Get rid of shpchprm* and pciehprm* files since they are no longer needed.
> shpchprm_nonacpi.c and pciehprm_nonacpi.c are identical, as well
> as shpchprm_legacy.c and can be replaced with a macro.

Looks good, only a minor comment:

> +u8 * acpi_path_name( acpi_handle	handle)

Funky spacing here.

> +int is_root_bridge(acpi_handle handle)
> +{
> +	acpi_status status;
> +	struct acpi_device_info *info;
> +	struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
> +	int i;
> +
> +	status = acpi_get_object_info(handle, &buffer);
> +	if (ACPI_SUCCESS(status)) {
> +		info = buffer.pointer;
> +		if ((info->valid & ACPI_VALID_HID) &&
> +			!strcmp(PCI_ROOT_HID_STRING,
> +					info->hardware_id.value)) {
> +			acpi_os_free(buffer.pointer);
> +			return 1;
> +		}
> +		if (info->valid & ACPI_VALID_CID) {
> +			for (i=0; i < info->compatibility_id.count; i++) {
> +				if (!strcmp(PCI_ROOT_HID_STRING,
> +					info->compatibility_id.id[i].value)) {
> +					acpi_os_free(buffer.pointer);
> +					return 1;
> +				}
> +			}
> +		}
> +	}
> +	return 0;
> +}
> +EXPORT_SYMBOL_GPL(is_root_bridge);

The name "is_root_bridge" is pretty generic.  Especially as it wants an
acpi handle.  "acpi_is_root_bridge" perhaps?

thanks,

greg k-h

  reply	other threads:[~2006-03-01  0:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01  0:46 [patch] pci hotplug: add common acpi functions to core Kristen Accardi
2006-03-01  0:53 ` Greg KH [this message]
2006-03-01  2:01 ` Randy.Dunlap
2006-03-01  2:03 ` [Pcihpd-discuss] " Kenji Kaneshige
2006-03-01 22:56   ` Kristen Accardi
2006-03-01  2:42 ` Kenji Kaneshige
2006-03-01 22:42   ` Kristen Accardi
2006-03-02  3:18     ` Kenji Kaneshige
2006-03-02 23:38       ` Kristen Accardi
2006-03-03 18:16 ` [patch] pci hotplug: add common acpi functions to core v2 Kristen Accardi

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=20060301005316.GA3681@kroah.com \
    --to=greg@kroah.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    /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.