linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Aaro Koskinen <aaro.koskinen@iki.fi>,
	Russell King <linux@armlinux.org.uk>,
	Tony Lindgren <tony@atomide.com>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/5] ARM: OMAP1: DMA: Improve a size determination in omap1_system_dma_init()
Date: Thu, 1 Jun 2017 22:48:00 +0200	[thread overview]
Message-ID: <9765c4ce-fe2b-dee7-b79a-b6393fb79594@users.sourceforge.net> (raw)
In-Reply-To: <85e2ec7f-f650-28a2-6cc5-0b4b52e44183@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 1 Jun 2017 21:48:11 +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/mach-omap1/dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index c821c1d5610e..823dba3dc033 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -339,5 +339,5 @@ static int __init omap1_system_dma_init(void)
 		goto exit_iounmap;
 	}
 
-	d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
+	d = kzalloc(sizeof(*d), GFP_KERNEL);
 	if (!d) {
-- 
2.13.0

  reply	other threads:[~2017-06-01 20:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 20:46 [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations SF Markus Elfring
2017-06-01 20:48 ` SF Markus Elfring [this message]
2017-06-01 20:49 ` [PATCH 2/5] ARM: OMAP1: DMA: Delete an error message for a failed memory allocation in omap1_system_dma_init() SF Markus Elfring
2017-06-01 20:50 ` [PATCH 3/5] ARM: OMAP1: DMA: Delete an unnecessary return statement in omap1_show_dma_caps() SF Markus Elfring
2017-06-01 20:51 ` [PATCH 4/5] ARM: OMAP1: Delete an error message for a failed memory allocation in omap1_dm_timer_init() SF Markus Elfring
2017-06-01 20:52 ` [PATCH 5/5] ARM: OMAP1: Fix a typo in a comment line SF Markus Elfring
2017-06-07  7:02 ` [PATCH 0/5] ARM-OMAP1: Adjustments for three function implementations Tony Lindgren

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=9765c4ce-fe2b-dee7-b79a-b6393fb79594@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=aaro.koskinen@iki.fi \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).