From patchwork Fri Aug 30 07:11:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riyan Dhiman X-Patchwork-Id: 13784408 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73477CA0EE6 for ; Fri, 30 Aug 2024 07:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=jVk8LINkbTRQSWBWSOj1f6VAOaUL2cUfSgT/UyEtcj8=; b=vlZBEpyPulZlZcLhVbvqr8YVaC nNqpXvsxt9RIfrUYDElv1ztLr5M6NvhI7FmapUxAnupUUbL6VWDauzgKQe6cluVvhH75C+O9UZ6qu p80gXuyZWRWog6BJPZWraJo2HRPuJhtGCBjihvabTM2BFuRtmdm4n3bT6kwIy/mLiU4NcRUKy6392 ZezQxoJE8g2lWD5Qd6/ra+JE8U0lvZx4fDAQUjPIlytPnFYd8DZ5jkjY/lJARlbphvhT+5Kjzp07w x+LViv3O+qSely3iyCaMAV69IyJ2Fe75bv2lKrTZftHJ0Mesbf5jQ8Y1JLAS0ekf5TgrES7RB+QIK W4Svf52w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjvnt-000000054DS-1tu7; Fri, 30 Aug 2024 07:12:17 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjvn1-0000000547j-1of6 for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 07:11:24 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-20230059241so13581115ad.3 for ; Fri, 30 Aug 2024 00:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725001882; x=1725606682; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jVk8LINkbTRQSWBWSOj1f6VAOaUL2cUfSgT/UyEtcj8=; b=Euq+jWgeKXS36zx6YXzN0xgbsWXL9IZRdgdi7i+9zjd0+uuMtepbQNkJFi7qRgJdAU y9GUr01CLEu6xw50giIqDIo0/nWoP73r7DHOM2ylziJC9tSypCmct3Npg0ed4hv04+KQ yWJF3x859AlDhaJ8ZmAIATbzV4AFDnjvPKbMEUW3B7yniB1Org2A9QyfWH7lefJstFxq 3wr43rDZ8JU/eP3pOrYU4EdYlncRRU7QGQVa6VZ8oNJwo1wuRsdPwyVv+8kiK4a0Zzmp PsnS8BnuwqqMGc0/tqbTPL9p92WTWWwjlnJdylyNCuyfHwJ9RBT6wSmxEhvgWPnUvwaN cYkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725001882; x=1725606682; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jVk8LINkbTRQSWBWSOj1f6VAOaUL2cUfSgT/UyEtcj8=; b=UHDv0XYh3LYFrliw3n7VLNYKiuW1h3JfJxUm0iW/srUKbdMZ6Ak/jb17ZVg89U3a+u QHXooE6P5vRuHp+FoWcqZ8L5kKyOW6GRGvBLgWTQ/Fojm0Nhd02wEemge8pnQs+d8fZF qAVqH34Z5KortU0QVB24kuQkRt5z/s2f9SDTWWapObc5uQq1Tr3O/goPHUmwmeU+V3I2 IcOo7b3Nm/HBBwi4uIkv35gQe3hQemmCi022TYkjQjj4bzFdE1o66gkPWhhUFKeIn0UO EhFjFGooSrzjoG4FALtWxd1vqCX0snoxR1MaeRN+2ydTzpS+2Viq9UTAEOanw30LOs3k Qukg== X-Forwarded-Encrypted: i=1; AJvYcCXOT6KfnI9s4VpEejTxDykdgCqLoObGdQOJXOfG4umr/zcRQOjIwVsYyB376IhMi4lj5u3yo+ebhcMXk0n54lT+@lists.infradead.org X-Gm-Message-State: AOJu0Yx/hefD9uLBZw8RGJ5yh1E8x6vy6Bp1JeXqOPYx29lb2D5EvkAr OMQzLtigUxD8bwb6T1ua5h0nRFKRyykswKt7WIFjWuAtwNM2HAAk X-Google-Smtp-Source: AGHT+IEG86tnZcFSGgrjOxo6oZCRr3aVnnMeXGdSQvX8M1+dO29teMaRbeJ7yb+I7rzB4yHNGS6kzA== X-Received: by 2002:a17:902:ec8e:b0:202:4b99:fd27 with SMTP id d9443c01a7336-2050c4d38b5mr53444925ad.51.1725001882185; Fri, 30 Aug 2024 00:11:22 -0700 (PDT) Received: from fedora.. ([106.219.166.11]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2052a485dacsm5243615ad.212.2024.08.30.00.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2024 00:11:21 -0700 (PDT) From: Riyan Dhiman 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 Subject: [PATCH] ACPI: arm64: Calculate size from pointer instead of struct Date: Fri, 30 Aug 2024 12:41:10 +0530 Message-ID: <20240830071110.120350-1-riyandhiman14@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_001123_494668_A0B03AA2 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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;