public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: yakui_zhao <yakui.zhao@intel.com>
Cc: "lenb@kernel.org" <lenb@kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [Resend] [PATCH]: ACPI: Rename ACPI processor device bus ID
Date: Wed, 3 Jun 2009 11:14:32 +0200	[thread overview]
Message-ID: <200906031114.33233.trenn@suse.de> (raw)
In-Reply-To: <1243996446.3558.202.camel@localhost.localdomain>

On Wednesday 03 June 2009 04:34:06 yakui_zhao wrote:
> On Tue, 2009-06-02 at 21:19 +0800, Thomas Renninger wrote:
> > On Sunday 31 May 2009 04:31:51 yakui_zhao wrote:
> > 
> > > +	/*
> > > +	 * On some boxes several processors use the same processor bus id.
> > > +	 * But they are located in different scope. For example:
> > > +	 * \_SB.SCK0.CPU0
> > > +	 * \_SB.SCK1.CPU0
> > > +	 * Rename the processor device bus id. And the new bus id will be
> > > +	 * generated as the following format:
> > > +	 * CPU+CPU ID.
> > > +	 */
> > > +	sprintf(acpi_device_bid(device), "CPU%X", pr->id);
> > Hm, there were several attempts to get rid of acpi_device_bid and 
> > friends.
> > Especially here, sprintfing into something function like looks really 
> > wrong.
> > Len, do you agree that not introducing new ones and at some point of
> > time replacing:
> > acpi_device_bid(device)
> > with
> > device->pnp.bus_id
> > is the way to go?
> The acpi_device_bid is not a function. It is equal to the
> device->pnp.bus_id for the ACPI device.
> #define acpi_device_bid(d)      ((d)->pnp.bus_id)
this #define should vanish sooner or later.
Several people suggested to get rid of these already.
Why don't you use:
sprintf(device->pnp.bus_id, "CPU%X", pr->id);
Unfortunately these constructs are rather common in drivers/acpi,
thus I ask whether these should be avoided or not.

   Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-06-03  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-31  2:31 [Resend] [PATCH]: ACPI: Rename ACPI processor device bus ID yakui_zhao
2009-06-02 13:19 ` Thomas Renninger
2009-06-03  2:34   ` yakui_zhao
2009-06-03  9:14     ` Thomas Renninger [this message]
2009-06-06  1:51 ` Len Brown
2009-06-08  8:03   ` yakui_zhao

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=200906031114.33233.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox