linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm/xen: Improve a size determination in __set_phys_to_machine_multi()
Date: Sun, 4 Jun 2017 23:05:35 +0200	[thread overview]
Message-ID: <7f2ec975-9a2b-132d-77f0-559fd7eadc30@users.sourceforge.net> (raw)
In-Reply-To: <9b9230f4-0f00-e019-75b4-571e29b52998@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 4 Jun 2017 20:50:55 +0200

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/xen/p2m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
index 0ed01f2d5ee4..11e78432b663 100644
--- a/arch/arm/xen/p2m.c
+++ b/arch/arm/xen/p2m.c
@@ -144,5 +144,5 @@ bool __set_phys_to_machine_multi(unsigned long pfn,
 		return true;
 	}
 
-	p2m_entry = kzalloc(sizeof(struct xen_p2m_entry), GFP_NOWAIT);
+	p2m_entry = kzalloc(sizeof(*p2m_entry), GFP_NOWAIT);
 	if (!p2m_entry) {
-- 
2.13.0

  reply	other threads:[~2017-06-04 21:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 21:04 [PATCH 0/3] ARM-XEN: Adjustments for __set_phys_to_machine_multi() SF Markus Elfring
2017-06-04 21:05 ` SF Markus Elfring [this message]
2017-06-05 17:16   ` [PATCH 1/3] arm/xen: Improve a size determination in __set_phys_to_machine_multi() Stefano Stabellini
2017-06-04 21:06 ` [PATCH 2/3] arm/xen: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-06-05 17:17   ` Stefano Stabellini
2017-06-04 21:07 ` [PATCH 3/3] arm/xen: Adjust one function call together with a variable assignment SF Markus Elfring
2017-06-05 17:18   ` Stefano Stabellini
2017-06-05 17:51 ` [PATCH 0/3] ARM-XEN: Adjustments for __set_phys_to_machine_multi() Stefano Stabellini

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=7f2ec975-9a2b-132d-77f0-559fd7eadc30@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).