linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Joe Perches <joe@perches.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>, Len Brown <lenb@kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	linux-acpi@vger.kernel.org, Rene Herman <rene.herman@gmail.com>,
	linux-kernel@vger.kernel.org, Adam Belay <ambx1@neo.rr.com>,
	Adam M Belay <abelay@mit.edu>, Li Shaohua <shaohua.li@intel.com>,
	Matthieu Castet <castet.matthieu@free.fr>,
	Thomas Renninger <trenn@suse.de>,
	Jaroslav Kysela <perex@perex.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	Takashi Iwai <tiwai@suse.de>, Jiri Slaby <jirislaby@gmail.com>,
	David Howells <dhowells@redhat.com>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: [patch 11/28] PNP: whitespace/coding style fixes
Date: Sat, 28 Jun 2008 22:02:44 +0200	[thread overview]
Message-ID: <486698E4.4030905@keyaccess.nl> (raw)
In-Reply-To: <1214682983.8758.66.camel@localhost>

On 28-06-08 21:56, Joe Perches wrote:
> On Fri, 2008-06-27 at 16:57 -0600, Bjorn Helgaas wrote:
>> Index: work10/drivers/pnp/interface.c
>> ===================================================================
>> --- work10.orig/drivers/pnp/interface.c	2008-05-09 14:42:25.000000000 -0600
>> +++ work10/drivers/pnp/interface.c	2008-05-09 14:45:57.000000000 -0600
>> @@ -216,12 +216,12 @@ static ssize_t pnp_show_options(struct d
>>  				struct device_attribute *attr, char *buf)
>>  {
>>  	struct pnp_dev *dev = to_pnp_dev(dmdev);
>> +	pnp_info_buffer_t *buffer;
>>  	struct pnp_option *independent = dev->independent;
>>  	struct pnp_option *dependent = dev->dependent;
>>  	int ret, dep = 1;
>>  
>> -	pnp_info_buffer_t *buffer = (pnp_info_buffer_t *)
>> -	    pnp_alloc(sizeof(pnp_info_buffer_t));
>> +	buffer = pnp_alloc(sizeof(pnp_info_buffer_t));
>>  	if (!buffer)
>>  		return -ENOMEM;
> 
> Wouldn't it be nicer without the unnecessary cast?
> 
> 	pnp_info_buffer_t *buffer = pnp_alloc(sizeof(*buffer));

He deleted the cast (the sizeof(type) versus sizeof(var) thing is mostly 
personal preference).

Rene.

  reply	other threads:[~2008-06-28 20:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080627225651.663174474@ldl.fc.hp.com>
2008-06-28  4:36 ` [patch 00/28] PNP: convert fixed tables to lists, v4 Len Brown
     [not found] ` <20080627225800.517972351@ldl.fc.hp.com>
2008-06-28 19:56   ` [patch 11/28] PNP: whitespace/coding style fixes Joe Perches
2008-06-28 20:02     ` Rene Herman [this message]
2008-06-17 22:58 [patch 00/28] PNP: convert fixed tables to lists, v3 Bjorn Helgaas
2008-06-17 22:58 ` [patch 11/28] PNP: whitespace/coding style fixes Bjorn Helgaas

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=486698E4.4030905@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=abelay@mit.edu \
    --cc=akpm@linux-foundation.org \
    --cc=ambx1@neo.rr.com \
    --cc=andi@firstfloor.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=bzolnier@gmail.com \
    --cc=castet.matthieu@free.fr \
    --cc=dhowells@redhat.com \
    --cc=jirislaby@gmail.com \
    --cc=joe@perches.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=rene.herman@gmail.com \
    --cc=shaohua.li@intel.com \
    --cc=tiwai@suse.de \
    --cc=trenn@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).