Skip to contentSkip to conversation

IA64: fix memset size error

PATCH In review Li Zefan 2 participants 4 messages Nov 5, 2007

Subsystems (4)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 2/6 IA64: fix memset size error

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/ps3fb.c +1 -1
index b3463dd..75836aa 100644
@@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
 
 static int ps3fb_get_vblank(struct fb_vblank *vblank)
 {
-	memset(vblank, 0, sizeof(&vblank));
+	memset(vblank, 0, sizeof(*vblank));
 	vblank->flags = FB_VBLANK_HAVE_VSYNC;
 	return 0;
 }
Signature · 1 line
1.5.3.rc7
author
#1 lore raw
Quoted 8 lines · Li Zefan

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Sorry, please ignore the wrong patch, and here is the right one:

---
 arch/ia64/kernel/efi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/ia64/kernel/efi.c +1 -1
index 3f7ea13..0e4ef20 100644
@@ -218,7 +218,7 @@ efi_gettimeofday (struct timespec *ts)
 {
 	efi_time_t tm;
 
-	memset(ts, 0, sizeof(ts));
+	memset(ts, 0, sizeof(*ts));
 	if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS)
 		return;
 
Signature · 1 line
1.5.3.rc7
#2 lore raw
Quoted 4 lines · Li Zefan
Quoted 3 lines · Li Zefan

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

This looks correct to me. Acked.

Quoted 32 lines
Quoted 5 lines
---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Sorry, please ignore the wrong patch, and here is the right one:

---
 arch/ia64/kernel/efi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/ia64/kernel/efi.c +1 -1
index 3f7ea13..0e4ef20 100644
@@ -218,7 +218,7 @@ efi_gettimeofday (struct timespec *ts)
 {
 	efi_time_t tm;
 
-	memset(ts, 0, sizeof(ts));
+	memset(ts, 0, sizeof(*ts));
 	if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS)
 		return;
 
Signature · 6 lines
1.5.3.rc7

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/
#3 lore raw
In reply to Li Zefan
Quoted 3 lines · Li Zefan

The size arguments passing to memset is wrong.

Signed-off-by Li Zefan <[email protected]>

This looks correct to me. Acked.

Quoted 24 lines
---
 drivers/video/ps3fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/ps3fb.c +1 -1
index b3463dd..75836aa 100644
@@ -727,7 +727,7 @@ static int ps3fb_blank(int blank, struct fb_info *info)
 
 static int ps3fb_get_vblank(struct fb_vblank *vblank)
 {
-	memset(vblank, 0, sizeof(&vblank));
+	memset(vblank, 0, sizeof(*vblank));
 	vblank->flags = FB_VBLANK_HAVE_VSYNC;
 	return 0;
 }
Signature · 6 lines
1.5.3.rc7

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/