Re: [PATCH] serial: 8250-of: Fix style issues in 8250_of.c
From: Andy Shevchenko
Date: Wed Nov 26 2025 - 07:53:37 EST
On Mon, Nov 17, 2025 at 03:41:17AM +0000, jempty.liang wrote:
> This patch resolves the warning "sizeof *port should be sizeof(*port)"
> detected by checkpatch.pl.
If you are going to submit more patches like this or related to sizeof, it
would be worth to mention that while sizeof is an operator, the coding style
recommends to use parentheses (but I haven't double checked this, feel free
to find it in the Coding Style documentation).
> - memset(port, 0, sizeof *port);
> + memset(port, 0, sizeof(*port));
>From C perspective the original one is okay.
--
With Best Regards,
Andy Shevchenko