All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] Remove select_bits_alloc(), select_bits_free()
@ 2005-10-06 15:20 Alexey Dobriyan
  2005-10-07 22:59 ` Arthur Othieno
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-10-06 15:20 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

* Both are trivial wrappers.
* Each wrapper is used only in one place.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 fs/select.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

--- ./fs/select.c
+++ ./fs/select.c
@@ -274,16 +274,6 @@ int do_select(int n, fd_set_bits *fds, l
 	return retval;
 }
 
-static void *select_bits_alloc(int size)
-{
-	return kmalloc(6 * size, GFP_KERNEL);
-}
-
-static void select_bits_free(void *bits, int size)
-{
-	kfree(bits);
-}
-
 /*
  * We can actually return ERESTARTSYS instead of EINTR, but I'd
  * like to be certain this leads to no problems. So I return
@@ -344,7 +334,7 @@ sys_select(int n, fd_set __user *inp, fd
 	 */
 	ret = -ENOMEM;
 	size = FDS_BYTES(n);
-	bits = select_bits_alloc(size);
+	bits = kmalloc(6 * size, GFP_KERNEL);
 	if (!bits)
 		goto out_nofds;
 	fds.in      = (unsigned long *)  bits;
@@ -390,7 +380,7 @@ sys_select(int n, fd_set __user *inp, fd
 		ret = -EFAULT;
 
 out:
-	select_bits_free(bits, size);
+	kfree(bits);
 out_nofds:
 	return ret;
 }


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-08 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06 15:20 [KJ] [PATCH] Remove select_bits_alloc(), select_bits_free() Alexey Dobriyan
2005-10-07 22:59 ` Arthur Othieno
2005-10-08 22:16 ` Arthur Othieno
2005-10-08 22:17 ` Alexey Dobriyan
2005-10-08 23:26 ` Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.