Re: [patch 2/2] epoll remove debugging code

From: Davide Libenzi
Date: Thu Jan 29 2009 - 13:18:47 EST


On Thu, 29 Jan 2009, Andrew Morton wrote:

> On Tue, 27 Jan 2009 12:54:58 -0800 (PST) Davide Libenzi <davidel@xxxxxxxxxxxxxxx> 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.

I thought you liked less lines of code :) It's OK with me if you want it
back the way it was.


- Davide


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/