From: Greg KH <gregkh@linuxfoundation.org>
To: Ivan Bakula <wamreu@gmail.com>
Cc: robh@kernel.org, jirislaby@kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] TTY: serdev: Replace depricated macros
Date: Fri, 7 May 2021 12:51:43 +0200 [thread overview]
Message-ID: <YJUbv3t05ai+g2k0@kroah.com> (raw)
In-Reply-To: <YJUhZP1FwMlUfWrw@r00t>
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
next prev parent reply other threads:[~2021-05-07 10:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 18:32 [PATCH] TTY: serdev: Replace depricated macros Ivan Bakula
2021-05-06 17:39 ` Greg KH
2021-05-07 11:16 ` Ivan Bakula
2021-05-07 10:51 ` Greg KH [this message]
2021-05-07 20:18 ` Ivan Bakula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YJUbv3t05ai+g2k0@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@kernel.org \
--cc=wamreu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox