* [PATCH -next] dma: mv_xor: fix invalid use of sizeof in orion_ge00_switch_init()
@ 2016-09-16 1:52 ` Wei Yongjun
0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-16 1:52 UTC (permalink / raw)
To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Arnd Bergmann
Cc: Wei Yongjun, linux-arm-kernel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: fe158a17c1e0 ("ARM: orion: simplify orion_ge00_switch_init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
arch/arm/plat-orion/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 272f49b..23a975a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -478,7 +478,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d)
for (i = 0; i < d->nr_chips; i++)
d->chip[i].host_dev = &orion_ge_mvmdio.dev;
- platform_device_register_data(NULL, "dsa", 0, d, sizeof(d));
+ platform_device_register_data(NULL, "dsa", 0, d, sizeof(*d));
}
/*****************************************************************************
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next] dma: mv_xor: fix invalid use of sizeof in orion_ge00_switch_init()
@ 2016-09-16 1:52 ` Wei Yongjun
0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-16 1:52 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: fe158a17c1e0 ("ARM: orion: simplify orion_ge00_switch_init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
arch/arm/plat-orion/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 272f49b..23a975a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -478,7 +478,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d)
for (i = 0; i < d->nr_chips; i++)
d->chip[i].host_dev = &orion_ge_mvmdio.dev;
- platform_device_register_data(NULL, "dsa", 0, d, sizeof(d));
+ platform_device_register_data(NULL, "dsa", 0, d, sizeof(*d));
}
/*****************************************************************************
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next v2] ARM: orion: fix invalid use of sizeof in orion_ge00_switch_init()
2016-09-16 1:52 ` Wei Yongjun
@ 2016-09-16 2:19 ` Wei Yongjun
-1 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-16 2:19 UTC (permalink / raw)
To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Arnd Bergmann
Cc: Wei Yongjun, linux-arm-kernel, linux-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: fe158a17c1e0 ("ARM: orion: simplify orion_ge00_switch_init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: fix file module name in subject
---
arch/arm/plat-orion/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 272f49b..23a975a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -478,7 +478,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d)
for (i = 0; i < d->nr_chips; i++)
d->chip[i].host_dev = &orion_ge_mvmdio.dev;
- platform_device_register_data(NULL, "dsa", 0, d, sizeof(d));
+ platform_device_register_data(NULL, "dsa", 0, d, sizeof(*d));
}
/*****************************************************************************
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next v2] ARM: orion: fix invalid use of sizeof in orion_ge00_switch_init()
@ 2016-09-16 2:19 ` Wei Yongjun
0 siblings, 0 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-16 2:19 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.
Fixes: fe158a17c1e0 ("ARM: orion: simplify orion_ge00_switch_init")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 -> v2: fix file module name in subject
---
arch/arm/plat-orion/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index 272f49b..23a975a 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -478,7 +478,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d)
for (i = 0; i < d->nr_chips; i++)
d->chip[i].host_dev = &orion_ge_mvmdio.dev;
- platform_device_register_data(NULL, "dsa", 0, d, sizeof(d));
+ platform_device_register_data(NULL, "dsa", 0, d, sizeof(*d));
}
/*****************************************************************************
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-16 2:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 1:52 [PATCH -next] dma: mv_xor: fix invalid use of sizeof in orion_ge00_switch_init() Wei Yongjun
2016-09-16 1:52 ` Wei Yongjun
2016-09-16 2:19 ` [PATCH -next v2] ARM: orion: " Wei Yongjun
2016-09-16 2:19 ` Wei Yongjun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.