lkml.org 
[lkml]   [2006]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Drop second arg of unregister_chrdev()
On Tue, 15 Aug 2006 07:35:22 +0400
Alexey Dobriyan <adobriyan@gmail.com> wrote:

> * "name" is trivially unused.

OK.

> * Requirement to pass to unregister function anything but cookie you've
> got from register counterpart is wrong. It creates opportunity to
> diverge, it create opportunity for bugs if enforced:
>
> /*
> * XXX(hch): bp->b_count_desired might be incorrect (see
> * xfs_buf_associate_memory for details),
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
>
> * but fortunately
> * the Linux version of kmem_free ignores the len argument..
> */
> kmem_free(bp->b_addr, bp->b_count_desired);

I don't understand that.

> 64 files changed, 97 insertions(+), 97 deletions(-)

I do understand that. This'll cause some grief. I'd suggest that we add a
new unregister_char_dev() or something, and do

static inline unregister_chrdev(unsigned int major, const char *name)
{
return unregister_char_dev(major);
}

then migrate callers over to unregister_char_dev() in an organised fashion,
via maintainers where poss.

Then mark unregister_chrdev() deprecated for a while.

Then nuke it.

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

\
 
 \ /
  Last update: 2006-08-15 05:51    [W:0.107 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site