2013-10-27 06:57:01

by Michael Opdenacker

[permalink] [raw]
Subject: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

This patch removes the ACPI_PROCFS parameter
(support for legacy /proc/acpi), which is defined
but no longer used anywhere in the makefiles and source code.

Signed-off-by: Michael Opdenacker <[email protected]>
---
drivers/acpi/Kconfig | 13 -------------
1 file changed, 13 deletions(-)

diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 6efe2ac..201cfb7 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -43,19 +43,6 @@ config ACPI_SLEEP
depends on SUSPEND || HIBERNATION
default y

-config ACPI_PROCFS
- bool "Deprecated /proc/acpi files"
- depends on PROC_FS
- help
- For backwards compatibility, this option allows
- deprecated /proc/acpi/ files to exist, even when
- they have been replaced by functions in /sys.
-
- This option has no effect on /proc/acpi/ files
- and functions which do not yet exist in /sys.
-
- Say N to delete /proc/acpi/ files that have moved to /sys/
-
config ACPI_PROCFS_POWER
bool "Deprecated power /proc/acpi directories"
depends on PROC_FS
--
1.8.1.2


2013-10-28 06:13:05

by Tianyu Lan

[permalink] [raw]
Subject: Re: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

2013/10/27 Michael Opdenacker <[email protected]>:
> This patch removes the ACPI_PROCFS parameter
> (support for legacy /proc/acpi), which is defined
> but no longer used anywhere in the makefiles and source code.
>

I think this should be not removed now. Since there are still interfaces
under /proc/acpi (E.G, /proc/acpi/wakeup and /proc/acpi/lid/*).

The origin commit which introduces the kconfig is to make some
interfaces that have backup interfaces in the sysfs configurable before
removing them actually.

So we still need this kconfig when try to remove remaining /proc/acpi
interfaces.

commit b981c591891dc8885de36498d38fa8d8a5481069
Author: Zhang Rui <[email protected]>
Date: Mon Jan 29 11:02:30 2007 +0800

ACPI: add a Kconfig option for ACPI procfs interface

Add a kconfig option CONFIG_ACPI_PROCFS to make procfs interface
a configurable attribute of ACPI.

No procfs interface is actually deprecated,
and no sysfs interface is added in this patch.

CONGI_ACPI_PROCFS is used to mark procfs interface as deprecated
once the same function is duplicated in sysfs.


> Signed-off-by: Michael Opdenacker <[email protected]>
> ---
> drivers/acpi/Kconfig | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 6efe2ac..201cfb7 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -43,19 +43,6 @@ config ACPI_SLEEP
> depends on SUSPEND || HIBERNATION
> default y
>
> -config ACPI_PROCFS
> - bool "Deprecated /proc/acpi files"
> - depends on PROC_FS
> - help
> - For backwards compatibility, this option allows
> - deprecated /proc/acpi/ files to exist, even when
> - they have been replaced by functions in /sys.
> -
> - This option has no effect on /proc/acpi/ files
> - and functions which do not yet exist in /sys.
> -
> - Say N to delete /proc/acpi/ files that have moved to /sys/
> -
> config ACPI_PROCFS_POWER
> bool "Deprecated power /proc/acpi directories"
> depends on PROC_FS
> --
> 1.8.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Best regards
Tianyu Lan

2013-10-28 06:22:14

by Michael Opdenacker

[permalink] [raw]
Subject: Re: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

Hi Lan,

Thank you very much for this review!

On 10/28/2013 07:13 AM, Lan Tianyu wrote:
> 2013/10/27 Michael Opdenacker <[email protected]>:
>> This patch removes the ACPI_PROCFS parameter
>> (support for legacy /proc/acpi), which is defined
>> but no longer used anywhere in the makefiles and source code.
>>
> I think this should be not removed now. Since there are still interfaces
> under /proc/acpi (E.G, /proc/acpi/wakeup and /proc/acpi/lid/*).
>
> The origin commit which introduces the kconfig is to make some
> interfaces that have backup interfaces in the sysfs configurable before
> removing them actually.
>
> So we still need this kconfig when try to remove remaining /proc/acpi
> interfaces.

I agree that keeping this legacy interface would still be useful.
However, CONFIG_ACPI_PROCFS is no longer used anywhere, neither in
Makefiles nor in the source code. ACPI_PROCFS isn't event used in
Kconfig files as an intermediate dependency.

What I deduce from that is that even if you set CONFIG_ACPI_PROCFS=y in
the kernel configuration, this will have no impact at all.

That's why I proposed to remove this Kconfig parameter.

Another option would be to fix the issue, and get CONFIG_ACPI_PROCFS to
be properly taken into account again.

Cheers,

Michael.

--
Michael Opdenacker, CEO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
+33 484 258 098

2013-10-28 08:27:39

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

On Mon, 2013-10-28 at 07:22 +0100, Michael Opdenacker wrote:
> [...] CONFIG_ACPI_PROCFS is no longer used anywhere, neither in
> Makefiles nor in the source code. ACPI_PROCFS isn't event used in
> Kconfig files as an intermediate dependency.
>
> What I deduce from that is that even if you set CONFIG_ACPI_PROCFS=y in
> the kernel configuration, this will have no impact at all.

About half a year ago I noticed that this Kconfig symbol is unused since
v2.6.38 [0]. As, apparently, nothing has changed it is currently unused
for over two and a half years.

I still don't really understand the purpose of this symbol. But whatever
it is, it might as well be dropped. If it's ever needed again it could
be re-added. Or, perhaps, an entirely different approach could be used
to accomplish what that symbol is supposed to do.


Paul Bolle

[0] http://marc.info/?l=linux-acpi&m=136398635322975

2013-10-28 08:42:59

by Michael Opdenacker

[permalink] [raw]
Subject: Re: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

Hi Paul,

On 10/28/2013 09:27 AM, Paul Bolle wrote:
> On Mon, 2013-10-28 at 07:22 +0100, Michael Opdenacker wrote:
>> [...] CONFIG_ACPI_PROCFS is no longer used anywhere, neither in
>> Makefiles nor in the source code. ACPI_PROCFS isn't event used in
>> Kconfig files as an intermediate dependency.
>>
>> What I deduce from that is that even if you set CONFIG_ACPI_PROCFS=y in
>> the kernel configuration, this will have no impact at all.
> About half a year ago I noticed that this Kconfig symbol is unused since
> v2.6.38 [0]. As, apparently, nothing has changed it is currently unused
> for over two and a half years.
>
> I still don't really understand the purpose of this symbol. But whatever
> it is, it might as well be dropped. If it's ever needed again it could
> be re-added. Or, perhaps, an entirely different approach could be used
> to accomplish what that symbol is supposed to do.
>
>
> Paul Bolle
>
> [0] http://marc.info/?l=linux-acpi&m=136398635322975
Good to know that nobody has complained about this for two and half
years :) This is then probably safe to remove this symbol for good.

Thanks again,

Michael.

--
Michael Opdenacker, CEO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
+33 484 258 098

2013-10-29 05:51:40

by Tianyu Lan

[permalink] [raw]
Subject: Re: [PATCH] ACPI: remove unused ACPI_PROCFS Kconfig param

2013/10/28 Paul Bolle <[email protected]>:
> On Mon, 2013-10-28 at 07:22 +0100, Michael Opdenacker wrote:
>> [...] CONFIG_ACPI_PROCFS is no longer used anywhere, neither in
>> Makefiles nor in the source code. ACPI_PROCFS isn't event used in
>> Kconfig files as an intermediate dependency.
>>
>> What I deduce from that is that even if you set CONFIG_ACPI_PROCFS=y in
>> the kernel configuration, this will have no impact at all.
>
> About half a year ago I noticed that this Kconfig symbol is unused since
> v2.6.38 [0]. As, apparently, nothing has changed it is currently unused
> for over two and a half years.
>
> I still don't really understand the purpose of this symbol. But whatever
> it is, it might as well be dropped. If it's ever needed again it could
> be re-added. Or, perhaps, an entirely different approach could be used
> to accomplish what that symbol is supposed to do.

I prefer the later. I will add new sysfs interface for LID status and make
all proc related code in the /driver/acpi/button.c under CONFIG_ACPI_PROCFS.

>
>
> Paul Bolle
>
> [0] http://marc.info/?l=linux-acpi&m=136398635322975
>



--
Best regards
Tianyu Lan