mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/1 linux-next] ACPI: remove unnecessary sizeof(u8)
Date: Wed, 19 Nov 2014 00:28:32 +0100	[thread overview]
Message-ID: <3970319.cPmRxBPPro@vostro.rjw.lan> (raw)
In-Reply-To: <1416131820-7336-1-git-send-email-fabf@skynet.be>

On Sunday, November 16, 2014 10:57:00 AM Fabian Frederick wrote:
> sizeof(u8) is always 1.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

Queued up for 3.19-rc1, thanks!

> ---
>  drivers/acpi/utils.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index 371ac12..dd8ff63 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -136,8 +136,7 @@ acpi_extract_package(union acpi_object *package,
>  				break;
>  			case 'B':
>  				size_required +=
> -				    sizeof(u8 *) +
> -				    (element->buffer.length * sizeof(u8));
> +				    sizeof(u8 *) + element->buffer.length;
>  				tail_offset += sizeof(u8 *);
>  				break;
>  			default:
> @@ -255,7 +254,7 @@ acpi_extract_package(union acpi_object *package,
>  				memcpy(tail, element->buffer.pointer,
>  				       element->buffer.length);
>  				head += sizeof(u8 *);
> -				tail += element->buffer.length * sizeof(u8);
> +				tail += element->buffer.length;
>  				break;
>  			default:
>  				/* Should never get here */
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

      reply	other threads:[~2014-11-18 23:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-16  9:57 Fabian Frederick
2014-11-18 23:28 ` Rafael J. Wysocki [this message]

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=3970319.cPmRxBPPro@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=fabf@skynet.be \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®