From: Cornelia Huck <cornelia.huck@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
cohuck@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 15/17] s390: convert /proc/cio_ignore.
Date: Sat, 10 Dec 2005 10:30:18 +0100 [thread overview]
Message-ID: <a070070d0512100130u592b3517y@mail.gmail.com> (raw)
In-Reply-To: <20051209235321.2281b7e6.akpm@osdl.org>
2005/12/10, Andrew Morton <akpm@osdl.org>:
> 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()
OK, will do.
>
> > + 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*.
Some people seem to prefer explicit casts to make the
type more clear. Is there any concensus on this? (I don't care
either way ;))
Cornelia
next prev parent reply other threads:[~2005-12-10 9:30 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
2005-12-10 9:30 ` Cornelia Huck [this message]
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=a070070d0512100130u592b3517y@mail.gmail.com \
--to=cornelia.huck@gmail.com \
--cc=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®