aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/sn/kernel
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-07-28 11:01:48 -0400
committerTony Luck <tony.luck@intel.com>2014-07-29 19:26:37 -0400
commit882d6f384b1ea58bc04a16b855492f5d683bc97b (patch)
treeb0e795ddd8aa00d6a2e5492413209d414eb1f5bf /arch/ia64/sn/kernel
parent64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91 (diff)
[IA64] sn: Fix zeroing of PDAs
The code uses a the following to zero out a PDA: memset(pda, 0, sizeof(pda)); But sizeof(pda) will return the size of a pointer rather than the size of the structure pointed to. This triggers the following warning from GCC: arch/ia64/sn/kernel/setup.c:582:23: warning: argument to 'sizeof' in 'memset' call is the same pointer type 'struct pda_s *' as the destination; expected 'struct pda_s' or an explicit length [-Wsizeof-pointer-memaccess] memset(pda, 0, sizeof(pda)); ^ Fix this by passing in the size of the structure using sizeof(*pda) instead. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel')
-rw-r--r--arch/ia64/sn/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 53b01b8e2f19..36182c84363c 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -579,7 +579,7 @@ void sn_cpu_init(void)
579 (sn_prom_type == 1) ? "real" : "fake"); 579 (sn_prom_type == 1) ? "real" : "fake");
580 } 580 }
581 581
582 memset(pda, 0, sizeof(pda)); 582 memset(pda, 0, sizeof(*pda));
583 if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2, 583 if (ia64_sn_get_sn_info(0, &sn_hub_info->shub2,
584 &sn_hub_info->nasid_bitmask, 584 &sn_hub_info->nasid_bitmask,
585 &sn_hub_info->nasid_shift, 585 &sn_hub_info->nasid_shift,