All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sander Smeenk <ssmeenk-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: DSDT Fix, one question ...
Date: Thu, 27 Feb 2003 11:41:22 +0100	[thread overview]
Message-ID: <20030227104122.GG21631@freshdot.net> (raw)

Hi,

I'm trying to fix the DSDT on my desktop machine just to "learn" a bit
about this. I fixed all compile errors, but for one I am not sure if I
did the Right Thing (TM):

iasl tells me:
| dsdt.asl:1830: Method(STM_, 0, Serialized) {
| Warning  2019 -          ^ Not all control paths return a value (STM_)

And indeed, there is no Return() at the end of this method. So I added
'Return(TMD0)', because I saw that in other methods too. It fixes the
compile warning, but I am not sure what TMD0 is, and wether it is the
right thing to return or not.

Especially because of this if-block at the top:

| If(REGF) {
| }
| Else {
|     Return(TMD0)
| }

It seems to only return TMD0 if REGF is not set.
What is the correct way of finding out what it should return?

Or should I just return 0x00 ? :)

Thanks,
Sander.

Method-with-error:

| Method(STM_, 0, Serialized) {
|     If(REGF) {
|     }
|     Else {
|         Return(TMD0)
|     }
|     Store(0x0, GMUE)
|     Store(0x7, GMUT)
|     Store(0x0, GSUE)
|     Store(0x7, GSUT)
|     If(And(CHNF, 0x1, )) {
|         Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA0, MTR, 0x0, 0x0), Local0)
|         If(LGreater(Local0, 0x6)) {
|             Store(0x6, Local0)
|         }
|         If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147), LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
|             Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9, )), Local0, )), GMUT)
|         }
|         Else {
|             Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4, )), Local0, )), GMUT)
|         }
|         Or(GMUE, 0x7, GMUE)
|     }
|     Else {
|         If(Or(LEqual(PIO0, Ones), LEqual(PIO0, 0x0), )) {
|             If(And(LLess(DMA0, Ones), LGreater(DMA0, 0x0), )) {
|                 Store(DMA0, PIO0)
|             }
|         }
|     }
|     If(And(CHNF, 0x4, )) {
|         Store(Match(DerefOf(Index(TIM0, 0x3, )), MLE, DMA1, MTR, 0x0, 0x0), Local0)
|         If(LGreater(Local0, 0x6)) {
|             Store(0x6, Local0)
|         }
|         If(LOr(LEqual(\_SB_.PCI0.SBRG.D147, 0x3147), LEqual(\_SB_.PCI0.SBRG.D147, 0x3177))) {
|             Store(DerefOf(Index(DerefOf(Index(TIM0, 0x9, )), Local0, )), GSUT)
|         }
|         Else {
|             Store(DerefOf(Index(DerefOf(Index(TIM0, 0x4, )), Local0, )), GSUT)
|         }
|         Or(GSUE, 0x7, GSUE)
|     }
|     Else {
|         If(Or(LEqual(PIO1, Ones), LEqual(PIO1, 0x0), )) {
|             If(And(LLess(DMA1, Ones), LGreater(DMA1, 0x0), )) {
|                 Store(DMA1, PIO1)
|             }
|         }
|     }
|     And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO0, MTR, 0x0, 0x0), 0x7, Local0)
|     Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )), Local0, )), Local1)
|     Store(Local1, GMPT)
|     And(Match(DerefOf(Index(TIM0, 0x0, )), MGE, PIO1, MTR, 0x0, 0x0), 0x7, Local0)
|     Store(DerefOf(Index(DerefOf(Index(TIM0, 0x1, )), Local0, )), Local1)
|     Store(Local1, GSPT)
| }

-- 
| Why is the time of day with the slowest traffic called rush hour?
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

             reply	other threads:[~2003-02-27 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-27 10:41 Sander Smeenk [this message]
     [not found] ` <20030227104122.GG21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
2003-02-27 12:18   ` DSDT Fix, one question Adachi, Kenichi
     [not found]     ` <000001c2de5a$55d99160$7c4425db-F8JvWDuGsZU@public.gmane.org>
2003-02-27 12:53       ` Sander Smeenk
     [not found]         ` <20030227125318.GI21631-ntXksADE/7Pk1uMJSBkQmQ@public.gmane.org>
2003-02-27 15:40           ` Adachi, Kenichi

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=20030227104122.GG21631@freshdot.net \
    --to=ssmeenk-ntxksade/7pk1umjsbkqmq@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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.