From: Riyan Dhiman <riyandhiman14@gmail.com>
To: lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com
Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Riyan Dhiman <riyandhiman14@gmail.com>
Subject: [PATCH] ACPI: arm64: Calculate size from pointer instead of struct
Date: Fri, 30 Aug 2024 12:41:10 +0530 [thread overview]
Message-ID: <20240830071110.120350-1-riyandhiman14@gmail.com> (raw)
Calculate the size from pointer instead of struct to adhere to
kernel coding style.
Issue reported in checkpatch
This commit has no functional changes.
Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
---
drivers/acpi/arm64/iort.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 1b39e9ae7ac1..6a87ec243c56 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -56,7 +56,7 @@ static inline int iort_set_fwnode(struct acpi_iort_node *iort_node,
{
struct iort_fwnode *np;
- np = kzalloc(sizeof(struct iort_fwnode), GFP_ATOMIC);
+ np = kzalloc(sizeof(*np), GFP_ATOMIC);
if (WARN_ON(!np))
return -ENOMEM;
--
2.46.0
reply other threads:[~2024-08-30 7:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240830071110.120350-1-riyandhiman14@gmail.com \
--to=riyandhiman14@gmail.com \
--cc=guohanjun@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=sudeep.holla@arm.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
all inboxes | Powered by JetHome®