From: Andrew Morton <akpm@osdl.org>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: cohuck@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 15/17] s390: convert /proc/cio_ignore.
Date: Fri, 9 Dec 2005 23:53:21 -0800 [thread overview]
Message-ID: <20051209235321.2281b7e6.akpm@osdl.org> (raw)
In-Reply-To: <20051209152909.GP6532@skybase.boeblingen.de.ibm.com>
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
>
> +static void *
> +cio_ignore_proc_seq_start(struct seq_file *s, loff_t *offset)
> +{
> + struct ccwdev_iter *iter;
> +
> + if (*offset > __MAX_SUBCHANNEL)
> + return NULL;
> + iter = kmalloc(sizeof(struct ccwdev_iter), GFP_KERNEL);
> + if (!iter)
> + return ERR_PTR(-ENOMEM);
> + memset(iter, 0, sizeof(struct ccwdev_iter));
kzalloc()
> + iter->devno = *offset;
> + return iter;
> +}
> +
> +static void
> +cio_ignore_proc_seq_stop(struct seq_file *s, void *it)
> +{
> + if (!IS_ERR(it))
> + kfree(it);
> +}
> +
> +static void *
> +cio_ignore_proc_seq_next(struct seq_file *s, void *it, loff_t *offset)
> +{
> + struct ccwdev_iter *iter;
> +
> + if (*offset > __MAX_SUBCHANNEL)
> + return NULL;
> + iter = (struct ccwdev_iter *)it;
Unneeded (and undesirable) cast of void*.
> + iter->devno++;
> + (*offset)++;
> + return iter;
> +}
next prev parent reply other threads:[~2005-12-10 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-09 15:29 Martin Schwidefsky
2005-12-10 7:53 ` Andrew Morton [this message]
2005-12-10 9:30 ` Cornelia Huck
2005-12-10 9:37 ` Andrew Morton
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=20051209235321.2281b7e6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=cohuck@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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®