From 33daf754aef8b7147c8a7826190533ee9553f8cd Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Fri, 27 Oct 2006 10:45:00 +0200 Subject: [PATCH] --- yaml --- r: 41112 b: refs/heads/master c: ac5d1a7d253f3c02d1e5c93edfa26e81466ec71e h: refs/heads/master v: v3 --- [refs] | 2 +- .../arch/mips/mips-boards/malta/malta_setup.c | 2 +- trunk/arch/x86_64/kernel/early_printk.c | 2 +- trunk/drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- trunk/fs/ecryptfs/crypto.c | 3 +-- trunk/include/scsi/libsas.h | 1 - trunk/kernel/kmod.c | 8 ++++---- trunk/net/bridge/br_ioctl.c | 9 ++++----- trunk/sound/core/rtctimer.c | 20 +++++++++++++------ 9 files changed, 27 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index 664a735847cb..e0108e3bf49f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef8d2f45c6dde22cef2eb38cb0e05edcd171a034 +refs/heads/master: ac5d1a7d253f3c02d1e5c93edfa26e81466ec71e diff --git a/trunk/arch/mips/mips-boards/malta/malta_setup.c b/trunk/arch/mips/mips-boards/malta/malta_setup.c index 282f3e52eea3..ab460f805bef 100644 --- a/trunk/arch/mips/mips-boards/malta/malta_setup.c +++ b/trunk/arch/mips/mips-boards/malta/malta_setup.c @@ -159,7 +159,7 @@ void __init plat_mem_setup(void) BONITO_PCIMEMBASECFG |= (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); - printk("Enabled Bonito IOBC coherency\n"); + printk("Disabled Bonito IOBC coherency\n"); } } else diff --git a/trunk/arch/x86_64/kernel/early_printk.c b/trunk/arch/x86_64/kernel/early_printk.c index 47b6d90349da..e22ecd54870d 100644 --- a/trunk/arch/x86_64/kernel/early_printk.c +++ b/trunk/arch/x86_64/kernel/early_printk.c @@ -224,7 +224,7 @@ static int __init setup_early_printk(char *buf) return 0; early_console_initialized = 1; - if (strstr(buf, "keep")) + if (!strcmp(buf,"keep")) keep_early = 1; if (!strncmp(buf, "serial", 6)) { diff --git a/trunk/drivers/mtd/chips/cfi_cmdset_0001.c b/trunk/drivers/mtd/chips/cfi_cmdset_0001.c index 296159ec5189..7ea49a0d5ec3 100644 --- a/trunk/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/trunk/drivers/mtd/chips/cfi_cmdset_0001.c @@ -1087,7 +1087,7 @@ static int inval_cache_and_wait_for_operation( } spin_lock(chip->mutex); - while (chip->state != chip_state) { + if (chip->state != chip_state) { /* Someone's suspended the operation: sleep */ DECLARE_WAITQUEUE(wait, current); set_current_state(TASK_UNINTERRUPTIBLE); diff --git a/trunk/fs/ecryptfs/crypto.c b/trunk/fs/ecryptfs/crypto.c index f63a7755fe86..136175a69332 100644 --- a/trunk/fs/ecryptfs/crypto.c +++ b/trunk/fs/ecryptfs/crypto.c @@ -820,8 +820,7 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat) crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0, CRYPTO_ALG_ASYNC); kfree(full_alg_name); - if (IS_ERR(crypt_stat->tfm)) { - rc = PTR_ERR(crypt_stat->tfm); + if (!crypt_stat->tfm) { ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): " "Error initializing cipher [%s]\n", crypt_stat->cipher); diff --git a/trunk/include/scsi/libsas.h b/trunk/include/scsi/libsas.h index 1d77b63c5ea4..9582e8401669 100644 --- a/trunk/include/scsi/libsas.h +++ b/trunk/include/scsi/libsas.h @@ -35,7 +35,6 @@ #include #include #include -#include struct block_device; diff --git a/trunk/kernel/kmod.c b/trunk/kernel/kmod.c index 2b76dee28496..bb4e29d924e4 100644 --- a/trunk/kernel/kmod.c +++ b/trunk/kernel/kmod.c @@ -307,14 +307,14 @@ int call_usermodehelper_pipe(char *path, char **argv, char **envp, return 0; f = create_write_pipe(); - if (IS_ERR(f)) - return PTR_ERR(f); + if (!f) + return -ENOMEM; *filp = f; f = create_read_pipe(f); - if (IS_ERR(f)) { + if (!f) { free_write_pipe(*filp); - return PTR_ERR(f); + return -ENOMEM; } sub_info.stdin = f; diff --git a/trunk/net/bridge/br_ioctl.c b/trunk/net/bridge/br_ioctl.c index 4c61a7e0a86e..4e4119a12139 100644 --- a/trunk/net/bridge/br_ioctl.c +++ b/trunk/net/bridge/br_ioctl.c @@ -58,13 +58,12 @@ static int get_fdb_entries(struct net_bridge *br, void __user *userbuf, { int num; void *buf; - size_t size; + size_t size = maxnum * sizeof(struct __fdb_entry); - /* Clamp size to PAGE_SIZE, test maxnum to avoid overflow */ - if (maxnum > PAGE_SIZE/sizeof(struct __fdb_entry)) + if (size > PAGE_SIZE) { + size = PAGE_SIZE; maxnum = PAGE_SIZE/sizeof(struct __fdb_entry); - - size = maxnum * sizeof(struct __fdb_entry); + } buf = kmalloc(size, GFP_USER); if (!buf) diff --git a/trunk/sound/core/rtctimer.c b/trunk/sound/core/rtctimer.c index 412dd62b654e..9f7b32e1ccde 100644 --- a/trunk/sound/core/rtctimer.c +++ b/trunk/sound/core/rtctimer.c @@ -22,13 +22,10 @@ #include #include -#include -#include #include #include #include #include -#include #if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE) @@ -50,7 +47,9 @@ static int rtctimer_stop(struct snd_timer *t); * The hardware dependent description for this timer. */ static struct snd_timer_hardware rtc_hw = { - .flags = SNDRV_TIMER_HW_FIRST|SNDRV_TIMER_HW_AUTO, + .flags = SNDRV_TIMER_HW_AUTO | + SNDRV_TIMER_HW_FIRST | + SNDRV_TIMER_HW_TASKLET, .ticks = 100000000L, /* FIXME: XXX */ .open = rtctimer_open, .close = rtctimer_close, @@ -60,6 +59,7 @@ static struct snd_timer_hardware rtc_hw = { static int rtctimer_freq = RTC_FREQ; /* frequency */ static struct snd_timer *rtctimer; +static struct tasklet_struct rtc_tasklet; static rtc_task_t rtc_task; @@ -81,6 +81,7 @@ rtctimer_close(struct snd_timer *t) rtc_task_t *rtc = t->private_data; if (rtc) { rtc_unregister(rtc); + tasklet_kill(&rtc_tasklet); t->private_data = NULL; } return 0; @@ -105,12 +106,17 @@ rtctimer_stop(struct snd_timer *timer) return 0; } +static void rtctimer_tasklet(unsigned long data) +{ + snd_timer_interrupt((struct snd_timer *)data, 1); +} + /* * interrupt */ static void rtctimer_interrupt(void *private_data) { - snd_timer_interrupt(private_data, 1); + tasklet_hi_schedule(private_data); } @@ -139,9 +145,11 @@ static int __init rtctimer_init(void) timer->hw = rtc_hw; timer->hw.resolution = NANO_SEC / rtctimer_freq; + tasklet_init(&rtc_tasklet, rtctimer_tasklet, (unsigned long)timer); + /* set up RTC callback */ rtc_task.func = rtctimer_interrupt; - rtc_task.private_data = timer; + rtc_task.private_data = &rtc_tasklet; err = snd_timer_global_register(timer); if (err < 0) {