[IA64] sn: Fix zeroing of PDAs
authorThierry Reding <treding@nvidia.com>
Mon, 28 Jul 2014 15:01:48 +0000 (17:01 +0200)
committerTony Luck <tony.luck@intel.com>
Tue, 29 Jul 2014 23:26:37 +0000 (16:26 -0700)
commit882d6f384b1ea58bc04a16b855492f5d683bc97b
treeb0e795ddd8aa00d6a2e5492413209d414eb1f5bf
parent64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91
[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>
arch/ia64/sn/kernel/setup.c