All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object
@ 2021-10-20 12:51 Andy Shevchenko
  2021-10-24 19:53 ` Simon Glass
  2021-10-27  3:05 ` Bin Meng
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2021-10-20 12:51 UTC (permalink / raw)
  To: Andy Shevchenko, u-boot; +Cc: Simon Glass, Bin Meng

There is no point to use Method() for the constant.
Replace it with Name() defined object. For the _STA
case it saves 3 bytes per each entry.

Before: 2881
After: 2833

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 .../asm/arch-tangier/acpi/southcluster.asl    | 81 ++++---------------
 1 file changed, 17 insertions(+), 64 deletions(-)

diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
index a8852f8202c7..4a7c85426182 100644
--- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
+++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl
@@ -123,10 +123,7 @@ Device (PCI0)
             }
         })
 
-        Method (_STA)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
     }
 
     Device (SDHC)
@@ -138,10 +135,7 @@ Device (PCI0)
         })
         Name (PSTS, Zero)
 
-        Method (_STA)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Method (_PS3, 0, NotSerialized)
         {
@@ -168,10 +162,7 @@ Device (PCI0)
                 GPIO
             })
 
-            Method (_STA)
-            {
-                Return (STA_VISIBLE)
-            }
+            Name (_STA, STA_VISIBLE)
 
             Method (_RMV, 0, NotSerialized)
             {
@@ -203,10 +194,8 @@ Device (PCI0)
         Device (BRC2)
         {
             Name (_ADR, 0x02)
-            Method (_STA, 0, NotSerialized)
-            {
-                Return (STA_VISIBLE)
-            }
+
+            Name (_STA, STA_VISIBLE)
 
             Method (_RMV, 0, NotSerialized)
             {
@@ -257,20 +246,14 @@ Device (PCI0)
             }
         })
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
     }
 
     Device (I2C1)
     {
         Name (_ADR, 0x00080000)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Name (SSCN, Package ()
         {
@@ -303,10 +286,7 @@ Device (PCI0)
     {
         Name (_ADR, 0x00090001)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Name (SSCN, Package ()
         {
@@ -328,10 +308,7 @@ Device (PCI0)
     {
         Name (_ADR, 0x000c0000)
 
-        Method (_STA)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Name (AVBL, Zero)
         Method (_REG, 2, NotSerialized)
@@ -361,10 +338,7 @@ Device (PCI0)
             ^IPC1.PMIC
         })
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Device (RHUB)
         {
@@ -404,20 +378,14 @@ Device (PCI0)
     {
         Name (_ADR, 0x00170000)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
     }
 
     Device (HSU0)
     {
         Name (_ADR, 0x00040001)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Device (BTH0)
         {
@@ -428,10 +396,7 @@ Device (PCI0)
                 HSU0
             })
 
-            Method (_STA, 0, NotSerialized)
-            {
-                Return (STA_VISIBLE)
-            }
+            Name (_STA, STA_VISIBLE)
 
             Name (RBUF, ResourceTemplate()
             {
@@ -466,10 +431,7 @@ Device (PCI0)
     {
         Name (_ADR, 0x00130000)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Device (PMIC)
         {
@@ -481,10 +443,7 @@ Device (PCI0)
                 IPC1
             })
 
-            Method (_STA, 0, NotSerialized)
-            {
-                Return (STA_VISIBLE)
-            }
+            Name (_STA, STA_VISIBLE)
 
             Name (RBUF, ResourceTemplate()
             {
@@ -554,10 +513,7 @@ Device (PCI0)
         Name (_ADR, 0x00150000)
         Name (_UID, Zero)
 
-        Method (_STA, 0, NotSerialized)
-        {
-            Return (STA_VISIBLE)
-        }
+        Name (_STA, STA_VISIBLE)
 
         Name (RBUF, ResourceTemplate ()
         {
@@ -594,8 +550,5 @@ Device (FLIS)
         Return (RBUF)
     }
 
-    Method (_STA, 0, NotSerialized)
-    {
-        Return (STA_VISIBLE)
-    }
+    Name (_STA, STA_VISIBLE)
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object
  2021-10-20 12:51 [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object Andy Shevchenko
@ 2021-10-24 19:53 ` Simon Glass
  2021-10-27  3:05 ` Bin Meng
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Glass @ 2021-10-24 19:53 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: U-Boot Mailing List, Bin Meng

On Wed, 20 Oct 2021 at 06:51, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> There is no point to use Method() for the constant.
> Replace it with Name() defined object. For the _STA
> case it saves 3 bytes per each entry.
>
> Before: 2881
> After: 2833
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  .../asm/arch-tangier/acpi/southcluster.asl    | 81 ++++---------------
>  1 file changed, 17 insertions(+), 64 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object
  2021-10-20 12:51 [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object Andy Shevchenko
  2021-10-24 19:53 ` Simon Glass
@ 2021-10-27  3:05 ` Bin Meng
  2021-10-27  3:26   ` Bin Meng
  1 sibling, 1 reply; 4+ messages in thread
From: Bin Meng @ 2021-10-27  3:05 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: U-Boot Mailing List, Simon Glass

On Wed, Oct 20, 2021 at 8:51 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> There is no point to use Method() for the constant.
> Replace it with Name() defined object. For the _STA
> case it saves 3 bytes per each entry.
>
> Before: 2881
> After: 2833
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  .../asm/arch-tangier/acpi/southcluster.asl    | 81 ++++---------------
>  1 file changed, 17 insertions(+), 64 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object
  2021-10-27  3:05 ` Bin Meng
@ 2021-10-27  3:26   ` Bin Meng
  0 siblings, 0 replies; 4+ messages in thread
From: Bin Meng @ 2021-10-27  3:26 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: U-Boot Mailing List, Simon Glass

On Wed, Oct 27, 2021 at 11:05 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Oct 20, 2021 at 8:51 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > There is no point to use Method() for the constant.
> > Replace it with Name() defined object. For the _STA
> > case it saves 3 bytes per each entry.
> >
> > Before: 2881
> > After: 2833
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  .../asm/arch-tangier/acpi/southcluster.asl    | 81 ++++---------------
> >  1 file changed, 17 insertions(+), 64 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-27  3:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 12:51 [PATCH v1 1/1] x86: tangier: Replace Method() by Name() for _STA object Andy Shevchenko
2021-10-24 19:53 ` Simon Glass
2021-10-27  3:05 ` Bin Meng
2021-10-27  3:26   ` Bin Meng

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.