[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJUbv3t05ai+g2k0@kroah.com>
Date: Fri, 7 May 2021 12:51:43 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Ivan Bakula <wamreu@...il.com>
Cc: robh@...nel.org, jirislaby@...nel.org,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] TTY: serdev: Replace depricated macros
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
Powered by blists - more mailing lists