login
Header Space

 
 

Re: [PATCH 1/4] UIO: hold a reference to the device's owner while the device is open

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Uwe <Uwe.Kleine-Koenig@...>
Cc: Hans J. Koch <hjk@...>, Greg Kroah-Hartman <gregkh@...>, <linux-kernel@...>
Date: Thursday, April 10, 2008 - 5:02 pm

On Thu, Apr 10, 2008 at 02:37:00PM +0200, Uwe Kleine-König wrote:

Hi Uwe,
thanks for this one, good catch! Looks fine to me. There are some minor issues, see
below.
And I'd like to hear Greg's opinion: Do you agree we can omit
try_module_get() in uio_mmap()?

Thanks,
Hans


I really don't like these labels inside the if-block. I find it hard to
read. What about this:


if (idev->info->open) {
	ret = idev->info->open(idev->info, inode);
	if (ret)
		kfree(listener);
	return ret;
}

err_alloc_listener:
	module_put(idev->owner);
err_module_get:
	return ret;



The label err_module_get should probably be omitted because it's used only
once and has just one line of code. You could simply write "return ret"
instead of "goto err_module_get".

}


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] UIO: fixes, cleanups and a new driver, Uwe Kleine-König, (Thu Apr 10, 8:36 am)
Re: [PATCH 0/3] UIO: cleanup and platform driver, Hans J. Koch, (Tue Apr 22, 9:39 am)
[PATCH 1/3] UIO: don't let UIO_CIF and UIO_SMX depend twice ..., Uwe Kleine-König, (Tue Apr 22, 5:52 am)
[PATCH 2/3] provide a dummy implementation of the clk API, Uwe Kleine-König, (Tue Apr 22, 5:52 am)
[PATCH 3/3] UIO: generic platform driver, Uwe Kleine-König, (Tue Apr 22, 5:52 am)
Re: [PATCH 3/3] UIO: generic platform driver, Hans J. Koch, (Sun Apr 27, 1:12 pm)
[PATCH] UIO: don't let UIO_CIF and UIO_SMX depend twice on UIO, Uwe Kleine-König, (Tue May 20, 5:24 am)
[PATCH] UIO: generic platform driver, Uwe Kleine-König, (Tue May 20, 5:24 am)
Re: [PATCH] UIO: generic platform driver, Hans J. Koch, (Tue May 20, 5:08 pm)
Re: [PATCH] UIO: generic platform driver, Uwe , (Mon May 26, 1:58 am)
Re: [PATCH] UIO: generic platform driver, Greg KH, (Mon May 26, 2:02 am)
Re: [PATCH] UIO: generic platform driver, Uwe , (Fri May 30, 5:16 am)
Re: [PATCH] UIO: generic platform driver, Greg KH, (Fri May 30, 12:35 pm)
Re: [PATCH] UIO: generic platform driver, Uwe , (Tue Jun 3, 3:21 am)
Re: [PATCH] UIO: generic platform driver, Hans J. Koch, (Tue Jun 3, 5:24 am)
Re: [PATCH 3/3] UIO: generic platform driver, Ben Nizette, (Tue Apr 22, 6:26 am)
Re: [PATCH 3/3] UIO: generic platform driver, Hans J. Koch, (Tue Apr 22, 9:35 am)
[PATCH 1/4] UIO: hold a reference to the device's owner whil..., Uwe Kleine-König, (Thu Apr 10, 8:37 am)
Re: [PATCH 1/4] UIO: hold a reference to the device's owner ..., Hans J. Koch, (Thu Apr 10, 5:02 pm)
[PATCH 2/4] UIO: use menuconfig, Uwe Kleine-König, (Thu Apr 10, 8:37 am)
Re: [PATCH 2/4] UIO: use menuconfig, Hans J. Koch, (Thu Apr 10, 3:39 pm)
Re: [PATCH 2/4] UIO: use menuconfig, Greg KH, (Fri Apr 11, 5:36 pm)
Re: [PATCH 2/4] UIO: use menuconfig, Hans J. Koch, (Fri Apr 11, 6:58 pm)
[PATCH 3/4] UIO: wrap all uio drivers in "if UIO" and "endif", Uwe Kleine-König, (Thu Apr 10, 8:37 am)
[PATCH 4/4] [RFC] UIO: generic platform driver, Uwe Kleine-König, (Thu Apr 10, 8:37 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 6:48 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 5:24 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 3:59 pm)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 6:54 pm)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 6:33 am)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 7:17 am)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Russell King - ARM Linux, (Sat Apr 12, 9:16 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 5:37 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 6:17 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 7:37 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 3:54 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 5:17 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Ben Nizette, (Thu Apr 10, 9:34 pm)
speck-geostationary