Skip to contentSkip to conversation

drivers/acpi/ac.c: convert to seq_file

PATCH New Grover, Andrew 3 participants 4 messages Nov 14, 2002 – Nov 27, 2002 ACPI

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines

From: Arnaldo Carvalho de Melo [mailto:[email protected]]
Please consider pulling from:

bk://oops.kerneljanitors.org:acpi-2.5

This is the first in a series of changesets converting
ACPI to seq_file, please lets us know if something is unacceptable.

The work was done by Aristeu Rozanski.

Hi acme,

Looks like an improvement. My thanks to you and Aristeu.

Let me know when you're done with all the changesets and I'll pull everything.

Regards -- Andy

#1 lore raw

Em Thu, Nov 14, 2002 at 02:34:35PM -0800, Grover, Andrew escreveu:

Quoted 5 lines
Quoted 5 lines

From: Arnaldo Carvalho de Melo [mailto:[email protected]]
Please consider pulling from:

bk://oops.kerneljanitors.org:acpi-2.5

Quoted 8 lines
Quoted 4 lines

This is the first in a series of changesets converting
ACPI to seq_file, please lets us know if something is unacceptable.

The work was done by Aristeu Rozanski.

Hi acme,

Looks like an improvement. My thanks to you and Aristeu.

np

Quoted 2 lines

Let me know when you're done with all the changesets and I'll pull everything.

mmmkay, I have already more than 10 changesets from Aristeu, its just a matter of reviewing it all and I'll be back talking with you.

Best Regards,

- Arnaldo

#2 lore raw

PATCH 1/1 convert acpi to seq_file

In reply to Grover, Andrew

Em Thu, Nov 14, 2002 at 02:34:35PM -0800, Grover, Andrew escreveu:

Quoted 8 lines
Quoted 8 lines

From: Arnaldo Carvalho de Melo [mailto:acme-KCZ47A4bww4P48s/[email protected]]
Please consider pulling from:

bk://oops.kerneljanitors.org:acpi-2.5

This is the first in a series of changesets converting
ACPI to seq_file, please lets us know if something is unacceptable.

Quoted 8 lines
Quoted 1 line

The work was done by Aristeu Rozanski.

Hi acme,

Looks like an improvement. My thanks to you and Aristeu.

Let me know when you're done with all the changesets and I'll pull everything.

Andrew,

Sorry for the delay, now you can pull all from:

bk://oops.kerneljanitors.org:acpi-2.5

or

master.kernel.org:/home/acme/BK/acpi-2.5

Here is a summary of what was done:

[email protected], 2002-11-23 14:34:10-02:00, [email protected]
o acpi: convert drivers/acpi/toshiba_acpi.c to seq_file

[email protected], 2002-11-23 14:20:41-02:00, [email protected]
o acpi: convert drivers/acpi/thermal.c

[email protected], 2002-11-23 14:13:27-02:00, [email protected]
o acpi/processor.o: fix up seq_file conversion, add missing comma

[email protected], 2002-11-23 13:57:42-02:00, [email protected]
o acpi: convert drivers/acpi/sleep.c to seq_file

[email protected], 2002-11-23 13:45:39-02:00, [email protected]
o acpi: convert drivers/acpi/processor.c to seq_file

[email protected], 2002-11-23 13:37:09-02:00, [email protected]
o acpi: convert drivers/acpi/power.c to seq_file

[email protected], 2002-11-15 05:43:42-02:00, [email protected]
o acpi: convert drivers/acpi/button.c to seq_file

[email protected], 2002-11-13 19:35:45-02:00, [email protected]
drivers/acpi/ac.c: convert to seq_file

Best Regards,

- Arnaldo

#3 lore raw
In reply to Grover, Andrew
Quoted 11 lines
Quoted 9 lines

From: Arnaldo Carvalho de Melo [mailto:acme-KCZ47A4bww4P48s/[email protected]]
Please consider pulling from:

bk://oops.kerneljanitors.org:acpi-2.5

This is the first in a series of changesets converting
ACPI to seq_file, please lets us know if something is unacceptable.

The work was done by Aristeu Rozanski.

Quoted 8 lines

Hi acme,

Looks like an improvement. My thanks to you and Aristeu.

Let me know when you're done with all the changesets and I'll pull everything.

Regards -- Andy

This is coming too late, but I kind of object to these changes on the grounds that there is an oversight in the handling of userdata between proc_fs and seq_file. Although the use of seq_file cleans up obscure proc read code, it also eliminates the option of writing proc handlers in an object-oriented style.

When I saw the seq_file patch to the toshiba_acpi module (http://linux.bkbits.net:8080/linux-2.5/patch-9BHYcwbM+ZDX/[email protected]), my reaction was that things were now too verbose and redundant, and it was time for me to move to data-driven generic code. I knew this option was available because proc_dir_entry carries a userdata field which is passed to all the handlers. While seq_file also has userdata support, the problem is that proc_fs does not propegate its userdata to seq_file.
The only way to set the seq_file userdata is in the open handler,
which as far as I can tell does not have access to the proc_dir_entry. The result is a proliferation of nearly-identical functions and tables that could otherwise be factored out.

In summary, what I'm looking for is a way to pass in a userdata at proc_dir_entry creation time, and have this data available in the read handler, without resorting to redundant tables and wrapper functions or macro trickery. This was, after all, completly feasible prior to the use of seq_file.

If I've overlooked something please let me know, before I stick my foot in my mouth on the kernel list.

Regards,
-John

-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en