Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639339
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] alpha-module: Improve a size determination in module_frob_arch_sections() |
| Date | 2017-05-11 14:00 +0200 |
| Message-ID | <tFUVc-5Qu-27@gated-at.bofh.it> (permalink) |
| References | <tFUVc-5Qu-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 11 May 2017 12:54:29 +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/alpha/kernel/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c
index 936bc8f89a67..387d9c500e48 100644
--- a/arch/alpha/kernel/module.c
+++ b/arch/alpha/kernel/module.c
@@ -105,5 +105,5 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
}
nsyms = symtab->sh_size / sizeof(Elf64_Sym);
- chains = kcalloc(nsyms, sizeof(struct got_entry), GFP_KERNEL);
+ chains = kcalloc(nsyms, sizeof(*chains), GFP_KERNEL);
if (!chains) {
--
2.12.3
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] alpha-module: Adjustments for module_frob_arch_sections() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-11 14:00 +0200 [PATCH 2/2] alpha-module: Delete an error message for a failed memory allocation in module_frob_arch_sections() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-11 14:00 +0200 [PATCH 1/2] alpha-module: Improve a size determination in module_frob_arch_sections() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-11 14:00 +0200
csiph-web