All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ernst Herzberg <earny-euM3SP4ZHrg@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: "Grover,
	Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Moore,
	Robert" <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: acpi_battery_read_info kernel Oops
Date: Sat, 22 Feb 2003 01:31:57 +0100	[thread overview]
Message-ID: <200302220131.57228.earny@net4u.de> (raw)
In-Reply-To: <200302110423.35001.earny-euM3SP4ZHrg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 652 bytes --]

On Freitag, 21. Februar 2003 02:48, Grover, Andrew wrote:
> Hi Ernst,
>
> Could you see if this patch fixes the issue?

Yupp. Look like the 'serial number' was the problem.

lidl ~ # cat /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         54720 mWh
last full capacity:      47600 mWh
battery technology:      rechargeable
design voltage:          14400 mV
design capacity warning: 3808 mWh
design capacity low:     1428 mWh
capacity granularity 1:  238 mWh
capacity granularity 2:  238 mWh
model number:            PC-VP-WP22/OP-570-74001
serial number:
battery type:            Lion
OEM info:                NEC

<Earny>

[-- Attachment #2: utcopy.diff --]
[-- Type: text/x-diff, Size: 1343 bytes --]

===== drivers/acpi/utilities/utcopy.c 1.22 vs edited =====
--- 1.22/drivers/acpi/utilities/utcopy.c	Tue Feb 18 15:32:34 2003
+++ edited/drivers/acpi/utilities/utcopy.c	Thu Feb 20 17:44:54 2003
@@ -645,11 +645,11 @@
 
 		/*
 		 * Allocate and copy the actual buffer if and only if:
-		 * 1) There is a valid buffer (length > 0)
+		 * 1) There is a valid buffer pointer
 		 * 2) The buffer is not static (not in an ACPI table) (in this case,
 		 *    the actual pointer was already copied above)
 		 */
-		if ((source_desc->buffer.length) &&
+		if ((source_desc->buffer.pointer) &&
 			(!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) {
 			dest_desc->buffer.pointer = ACPI_MEM_ALLOCATE (source_desc->buffer.length);
 			if (!dest_desc->buffer.pointer) {
@@ -665,11 +665,11 @@
 
 		/*
 		 * Allocate and copy the actual string if and only if:
-		 * 1) There is a valid string (length > 0)
+		 * 1) There is a valid string pointer
 		 * 2) The string is not static (not in an ACPI table) (in this case,
 		 *    the actual pointer was already copied above)
 		 */
-		if ((source_desc->string.length) &&
+		if ((source_desc->string.pointer) &&
 			(!(source_desc->common.flags & AOPOBJ_STATIC_POINTER))) {
 			dest_desc->string.pointer = ACPI_MEM_ALLOCATE ((acpi_size) source_desc->string.length + 1);
 			if (!dest_desc->string.pointer) {

  parent reply	other threads:[~2003-02-22  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-11  3:23 Oops: Battery and KDE 3.1 Ernst Herzberg
     [not found] ` <200302110423.35001.earny-euM3SP4ZHrg@public.gmane.org>
2003-02-22  0:31   ` Ernst Herzberg [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-28  1:14 acpi_battery_read_info kernel Oops Ernst Herzberg

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=200302220131.57228.earny@net4u.de \
    --to=earny-eum3sp4zhrg@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 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.