From: Greg KH <gregkh@linuxfoundation.org>
To: Brent Pappas <bpappas@pappasbrent.com>
Cc: namcaov@gmail.com, cai.huoqing@linux.dev, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev,
pappasbrent@knights.ucf.edu
Subject: Re: [PATCH v3] Replace macros HB and LB with static inline functions
Date: Thu, 20 Oct 2022 17:25:40 +0200 [thread overview]
Message-ID: <Y1FodCN/JQv9zZMI@kroah.com> (raw)
In-Reply-To: <20221006230757.33369-1-bpappas@pappasbrent.com>
On Thu, Oct 06, 2022 at 07:07:57PM -0400, Brent Pappas wrote:
> Replace function-like macros "HB" and "LB" with static inline functions
> to comply with preferred Linux coding style standards.
>
> Signed-off-by: Brent Pappas <bpappas@pappasbrent.com>
> ---
> Changelog:
> V1 -> V2: Resent diff from a mail client that would not replace tabs
> with spaces so that patch can be successfully applied.
> V2 -> V3: Created patch using git format-patch.
> Tested downloading and applying patch.
> Sent patch using git send-email.
>
> drivers/staging/most/net/net.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
> index 1d1fe8bff7ee..8a8fbc274b73 100644
> --- a/drivers/staging/most/net/net.c
> +++ b/drivers/staging/most/net/net.c
> @@ -36,8 +36,8 @@
> #define PMS_TELID_MASK 0x0F
> #define PMS_TELID_SHIFT 4
>
> -#define HB(value) ((u8)((u16)(value) >> 8))
> -#define LB(value) ((u8)(value))
> +static inline u8 HB(unsigned int value) { return ((u8)((u16)(value) >> 8)); }
> +static inline u8 LB(unsigned int value) { return ((u8)(value)); }
If you use one less tab, you will not go over the 90 column limit,
right?
Only 1 tab is needed.
thanks,
greg k-h
prev parent reply other threads:[~2022-10-20 15:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 16:10 [PATCH] staging: most: net: Replace macros HB and LB with static inline functions Brent Pappas
2022-10-05 23:57 ` Nam Cao
2022-10-06 1:39 ` Brent Pappas
2022-10-06 13:21 ` Brent Pappas
2022-10-06 13:42 ` Nam Cao
2022-10-06 17:02 ` [PATCH v2] " Brent Pappas
2022-10-06 17:44 ` Nam Cao
2022-10-06 23:07 ` [PATCH v3] " Brent Pappas
2022-10-20 15:25 ` Greg KH [this message]
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=Y1FodCN/JQv9zZMI@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bpappas@pappasbrent.com \
--cc=cai.huoqing@linux.dev \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=namcaov@gmail.com \
--cc=pappasbrent@knights.ucf.edu \
/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