From: Andrew Morton <akpm@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/2] epoll remove debugging code
Date: Thu, 29 Jan 2009 00:12:51 -0800 [thread overview]
Message-ID: <20090129001251.7a39d957.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0901271253010.20262@alien.or.mcafeemobile.com>
On Tue, 27 Jan 2009 12:54:58 -0800 (PST) Davide Libenzi <davidel@xmailserver.org> wrote:
> static int ep_eventpoll_release(struct inode *inode, struct file *file)
> {
> - struct eventpoll *ep = file->private_data;
> -
> - if (ep)
> - ep_free(ep);
> + if (file->private_data)
> + ep_free((struct eventpoll *) file->private_data);
>
The old version was better, IMO.
You could just do
if (file->private_data)
ep_free(file->private_data);
but personally, I do like to see the purported type mentioned in there
somewhere. But preferably not in a typecast.
Oh well.
next prev parent reply other threads:[~2009-01-29 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 20:54 Davide Libenzi
2009-01-29 8:12 ` Andrew Morton [this message]
2009-01-29 18:18 ` Davide Libenzi
2009-01-30 0:51 [patch 2/2] epoll: " Davide Libenzi
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=20090129001251.7a39d957.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®