Re: [PATCH] TTY: serdev: Replace depricated macros

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

 



On Fri, May 07, 2021 at 01:16:38PM +0200, Ivan Bakula wrote:
> Thank you for your reply.
> 
> > If these really are "deprecated", 
> 
> According to the comment in file "include/linux/idr.h" (line 318) these
> macros are depricated.

So that means what, that no new users should use them?  Or that they
should be replaced?

> > why not just do a search/replace across the whole tree and change them?
> 
> I've stumbled across these macros while trying to figure out how to write 
> device driver using serial device bus. So, I've decided to change them with
> appropriate function calls.
> 
> I didn't do search/replace across the whole tree because it's my first 
> patch and I wanted it to be short. But now, when you mentioned it, 
> I will do it.

No, please do not do that unless you can figure out why this is needed.

Only change code if it has to be changed.  If the idr api needs to be
redone for existing, working code, then that's fine, but do it correctly
and understand why you are doing it.

My point being that if it were as simple as a search/replace, then the
developer who wrote that comment would have done it already, not that
this should be something that you should do :)

hope this helps,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux