Char: vt, use kzalloc
PATCH 1/2 Char: vt, use kzalloc
vt, use kzalloc
Signed-off-by Jiri Slaby <[email protected]>
---
commit daa738839b831a78b895ad9cec1da0157e4b1be7
tree 039d7b54429bd8256f59e493f17e43947a2f173e
parent 1a5e44385253ef9a193badf768f40543af6996ca
author Jiri Slaby <[email protected]> Sun, 27 May 2007 09:49:53 +0200 committer Jiri Slaby <[email protected]> Tue, 29 May 2007 12:41:08 +0200
drivers/char/vt.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/char/vt.c +1 -2
@@ -729,10 +729,9 @@ int vc_allocate(unsigned int currcons) /* return 0 on success *//* although the numbers above are not valid since long ago, the point is still up-to-date and the comment still has its value even if only as a historical artifact. --mj, July 1998 */ - vc =kmalloc (sizeof (struct vc_data ),GFP_KERNEL ); + vc =kzalloc (sizeof (struct vc_data ),GFP_KERNEL );if (!vc)return -ENOMEM ; -memset (vc,0 ,sizeof (*vc)); vc_cons[currcons].d = vc;INIT_WORK (&vc_cons[currcons].SAK_work, vc_SAK);visual_init (vc, currcons,1 );
PATCH 2/2 Char: vt, use ARRAY_SIZE
vt, use ARRAY_SIZE
Signed-off-by Jiri Slaby <[email protected]>
---
commit 4be166037b1ccf8a639aef015a224941de7dcf0a
tree 68cf3d32232a23963fbfd15d0831b89ea7123b92
parent daa738839b831a78b895ad9cec1da0157e4b1be7
author Jiri Slaby <[email protected]> Sun, 27 May 2007 10:13:41 +0200 committer Jiri Slaby <[email protected]> Tue, 29 May 2007 12:41:13 +0200
drivers/char/vt.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/char/vt.c +1 -2
@@ -1990,8 +1990,7 @@ static int is_double_width(uint32_t ucs) { 0xFE30, 0xFE6F }, { 0xFF00, 0xFF60 }, { 0xFFE0, 0xFFE6 }, { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD } }; -return bisearch (ucs, double_width, -sizeof (double_width) /sizeof (*double_width) -1 ); +return bisearch (ucs, double_width,ARRAY_SIZE (double_width) -1 ); }/* acquires console_sem */