tty: synclink_gt: convert CALC_REGADDR() macro to an inline
authorJiri Slaby <jirislaby@kernel.org>
Mon, 31 Jul 2023 08:59:56 +0000 (10:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jul 2023 15:16:20 +0000 (17:16 +0200)
commitfe14cbc604af78348b5790832a5455541d572704
tree71b9822050906a3284c48e94cc2bc0ce44f375f9
parent9b5752d1a882c96c0319aebe55bbfe9ad0c9aa30
tty: synclink_gt: convert CALC_REGADDR() macro to an inline

It makes the code more readable and less error-prone as the result is
returned and not stored in a variable newly defined inside the macro.

Note that cast to 'unsigned long' and back to 'void *' was eliminated as
info->reg_addr is 'char *' already (so the addition is per bytes
already).

This nicely cleans up the callers too.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230731090002.15680-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/synclink_gt.c