public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: John Belmonte <jvb-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
To: 'Arnaldo Carvalho de Melo'
	<acme-KCZ47A4bww4P48s/oLjRZg@public.gmane.org>,
	"Grover,
	Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: RE: [PATCH] drivers/acpi/ac.c: convert to seq_file
Date: Wed, 27 Nov 2002 14:02:53 -0600	[thread overview]
Message-ID: <3DE524ED.4010902@prairienet.org> (raw)
In-Reply-To: EDC461A30AC4D511ADE10002A5072CAD04C7A50E@orsmsx119.jf.intel.com

>>From: Arnaldo Carvalho de Melo [mailto:acme-KCZ47A4bww4P48s/oLjRZg@public.gmane.org] 
>>	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


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/YFgETsMoA@public.gmane.org), 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

      parent reply	other threads:[~2002-11-27 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-14 22:34 [PATCH] drivers/acpi/ac.c: convert to seq_file Grover, Andrew
     [not found] ` <EDC461A30AC4D511ADE10002A5072CAD04C7A50E-OU+JdkIUtvd9zuciVAfUoVDQ4js95KgL@public.gmane.org>
2002-11-15  5:37   ` Arnaldo Carvalho de Melo
2002-11-23 17:02   ` [PATCHES] convert acpi " Arnaldo Carvalho de Melo
2002-11-27 20:02 ` John Belmonte [this message]

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=3DE524ED.4010902@prairienet.org \
    --to=jvb-zfksivp1bgvoqu1ulcgdha@public.gmane.org \
    --cc=acme-KCZ47A4bww4P48s/oLjRZg@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=andrew.grover-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox