From 4bade0481cc378eee8f1f9412dc10dcc1b401f23 Mon Sep 17 00:00:00 2001 From: Wanlong Gao Date: Sun, 10 Apr 2011 16:10:25 +0200 Subject: cris:removed the unused variable removed the unused variable "unsigned long tmp". Signed-off-by: Wanlong Gao Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/kernel/ptrace.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/cris/arch-v32') diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index f7ad9e8..f085229 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c @@ -114,8 +114,6 @@ void user_disable_single_step(struct task_struct *child) void ptrace_disable(struct task_struct *child) { - unsigned long tmp; - /* Deconfigure SPC and S-bit. */ user_disable_single_step(child); put_reg(child, PT_SPC, 0); -- cgit v1.1 From a52bdec35b9431f1b6939b35c31e04b2fd57e2f2 Mon Sep 17 00:00:00 2001 From: Jesper Nilsson Date: Tue, 12 Apr 2011 10:50:19 +0200 Subject: cris/arch-v32: cryptocop: Use kzalloc This avoids unnecessary explicit initialization by allocating zeroed memory. Signed-off-by: Maxin B. John Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/drivers/cryptocop.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/cris/arch-v32') diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index 642c6fe..f8476d9 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -1394,11 +1394,10 @@ static int create_md5_pad(int alloc_flag, unsigned long long hashed_length, char if (padlen < MD5_MIN_PAD_LENGTH) padlen += MD5_BLOCK_LENGTH; - p = kmalloc(padlen, alloc_flag); + p = kzalloc(padlen, alloc_flag); if (!p) return -ENOMEM; *p = 0x80; - memset(p+1, 0, padlen - 1); DEBUG(printk("create_md5_pad: hashed_length=%lld bits == %lld bytes\n", bit_length, hashed_length)); @@ -1426,11 +1425,10 @@ static int create_sha1_pad(int alloc_flag, unsigned long long hashed_length, cha if (padlen < SHA1_MIN_PAD_LENGTH) padlen += SHA1_BLOCK_LENGTH; - p = kmalloc(padlen, alloc_flag); + p = kzalloc(padlen, alloc_flag); if (!p) return -ENOMEM; *p = 0x80; - memset(p+1, 0, padlen - 1); DEBUG(printk("create_sha1_pad: hashed_length=%lld bits == %lld bytes\n", bit_length, hashed_length)); -- cgit v1.1 From 9c75fc8c5c8c50775fc8b89418219221335b758f Mon Sep 17 00:00:00 2001 From: Jesper Nilsson Date: Thu, 5 Apr 2012 11:52:55 +0200 Subject: CRIS: Remove legacy RTC drivers These old drivers are not used anymore, we use the ones in drivers/rtc. This allows us to remove some cruft in the CRIS timekeeping code. Signed-off-by: Jesper Nilsson --- arch/cris/arch-v32/kernel/time.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'arch/cris/arch-v32') diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index 6773fc8..8c4b45efd 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -67,7 +66,6 @@ unsigned long timer_regs[NR_CPUS] = }; extern int set_rtc_mmss(unsigned long nowtime); -extern int have_rtc; #ifdef CONFIG_CPU_FREQ static int @@ -265,11 +263,6 @@ void __init time_init(void) */ loops_per_usec = 50; - if(RTC_INIT() < 0) - have_rtc = 0; - else - have_rtc = 1; - /* Start CPU local timer. */ cris_timer_init(); -- cgit v1.1