From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "jempty.liang" <imntjempty@163.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: 8250-of: Fix style issues in 8250_of.c
Date: Wed, 26 Nov 2025 13:53:34 +0100 [thread overview]
Message-ID: <aSb4Tr4iKaR_pqnA@black.igk.intel.com> (raw)
In-Reply-To: <20251117034117.55588-1-imntjempty@163.com>
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
prev parent reply other threads:[~2025-11-26 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 3:41 [PATCH] serial: 8250-of: Fix style issues in 8250_of.c jempty.liang
2025-11-26 12:53 ` Andy Shevchenko [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=aSb4Tr4iKaR_pqnA@black.igk.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=imntjempty@163.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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