From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] ARM: s3c24xx: Improve a size determination in s3c2410_iotiming_get()
Date: Mon, 2 Oct 2017 19:59:19 +0200 [thread overview]
Message-ID: <3cccfa2f-4bcd-9c45-c56c-2b71b2ae4a42@users.sourceforge.net> (raw)
In-Reply-To: <d2ae00c8-da57-9ffc-3692-67ed6daa95e0@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 2 Oct 2017 19:16:58 +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.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
index f587c78fba33..c18769b5f15a 100644
--- a/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/iotiming-s3c2410.c
@@ -453,7 +453,7 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
s3c_freq_iodbg("%s: bank %d: con %08lx\n",
__func__, bank, bankcon);
- bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL);
+ bt = kzalloc(sizeof(*bt), GFP_KERNEL);
if (!bt)
return -ENOMEM;
--
2.14.2
next prev parent reply other threads:[~2017-10-02 17:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 17:56 [PATCH 0/6] ARM-S3C24xx: Adjustments for four function implementations SF Markus Elfring
2017-10-02 17:58 ` [PATCH 1/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2410_iotiming_get() SF Markus Elfring
2017-10-04 17:59 ` Krzysztof Kozlowski
2017-10-02 17:59 ` SF Markus Elfring [this message]
2017-10-04 18:12 ` [PATCH 2/6] ARM: s3c24xx: Improve a size determination " Krzysztof Kozlowski
2017-10-02 18:00 ` [PATCH 3/6] ARM: s3c2410: Fix a typo in a comment line SF Markus Elfring
2017-10-04 18:14 ` Krzysztof Kozlowski
2017-10-10 8:29 ` SF Markus Elfring
2017-10-10 8:35 ` Krzysztof Kozlowski
2017-10-10 8:48 ` SF Markus Elfring
2017-10-02 18:01 ` [PATCH 4/6] ARM: s3c24xx: Delete an error message for a failed memory allocation in s3c2412_iotiming_get() SF Markus Elfring
2017-10-04 18:03 ` Krzysztof Kozlowski
2017-10-02 18:03 ` [PATCH 5/6] ARM: s3c24xx: Improve a size determination " SF Markus Elfring
2017-10-02 18:04 ` [PATCH 6/6] ARM: s3c2412: Fix a typo in a comment line SF Markus Elfring
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=3cccfa2f-4bcd-9c45-c56c-2b71b2ae4a42@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).