Re: [PATCH] Drop second arg of unregister_chrdev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 15 Aug 2006 07:35:22 +0400
Alexey Dobriyan <[email protected]> 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 <[email protected]>
> 
> 	 *                                        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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux