mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chris@wirex.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Alexander Viro <viro@math.psu.edu>,
	lkml <linux-kernel@vger.kernel.org>,
	Jeff Muizelaar <kernel@infidigm.net>
Subject: Re: [PATCH] add seq file helpers from 2.5 (fwd)
Date: Thu, 10 Jul 2003 11:45:58 -0700	[thread overview]
Message-ID: <20030710114558.B29562@figure1.int.wirex.com> (raw)
In-Reply-To: <20030710112807.A29562@figure1.int.wirex.com>; from chris@wirex.com on Thu, Jul 10, 2003 at 11:28:07AM -0700

* Chris Wright (chris@wirex.com) wrote:
> * Marcelo Tosatti (marcelo@conectiva.com.br) wrote:
> > +int single_open(struct file *file, int (*show)(struct seq_file *, void*), void *data)
> > +{
> > +	struct seq_operations *op = kmalloc(sizeof(*op), GFP_KERNEL);
> > +	int res = -ENOMEM;
> > +
> > +	if (op) {
> > +		op->start = single_start;
> > +		op->next = single_next;
> > +		op->stop = single_stop;
> > +		op->show = show;
> > +		res = seq_open(file, op);
> 
> Any reason not to simply allocate static ops struct?  As in:

Bah, nevermind, I didn't look closely enough to see that show is
dynamic here (not to mention it is simple straight backport).  Sorry for
senseless noise ;-)

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

      reply	other threads:[~2003-07-10 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-10  3:02 Marcelo Tosatti
2003-07-10  5:04 ` Randy.Dunlap
2003-07-10 18:28 ` Chris Wright
2003-07-10 18:45   ` Chris Wright [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=20030710114558.B29562@figure1.int.wirex.com \
    --to=chris@wirex.com \
    --cc=kernel@infidigm.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=viro@math.psu.edu \
    /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

all inboxes | Powered by JetHome®