From 59d9d447ed58db0dfde61d03fb249c5d6f6bd49c Mon Sep 17 00:00:00 2001 From: Lin Ming Date: Wed, 26 Aug 2009 09:01:34 +0800 Subject: [PATCH] --- yaml --- r: 157165 b: refs/heads/master c: b0de22bdffa2e9a8e280d769c59f866605268484 h: refs/heads/master i: 157163: e1f27243f8facc09a6bb10a52d287fe7e152b868 v: v3 --- [refs] | 2 +- trunk/arch/parisc/kernel/traps.c | 2 +- trunk/arch/x86/kernel/apic/probe_64.c | 10 ---------- trunk/arch/x86/xen/enlighten.c | 2 -- trunk/drivers/acpi/acpica/exstorob.c | 12 ++++++++++++ trunk/fs/notify/inotify/inotify_user.c | 20 ++++++-------------- trunk/kernel/module.c | 7 ++----- trunk/net/sunrpc/clnt.c | 1 - 8 files changed, 22 insertions(+), 34 deletions(-) diff --git a/[refs] b/[refs] index 279650e0c115..ae8d26373289 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8442edc18843491978f7820f87dbdf293461290e +refs/heads/master: b0de22bdffa2e9a8e280d769c59f866605268484 diff --git a/trunk/arch/parisc/kernel/traps.c b/trunk/arch/parisc/kernel/traps.c index 8b58bf0b7d5a..528f0ff9b273 100644 --- a/trunk/arch/parisc/kernel/traps.c +++ b/trunk/arch/parisc/kernel/traps.c @@ -532,7 +532,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs) /* Kill the user process later */ regs->iaoq[0] = 0 | 3; regs->iaoq[1] = regs->iaoq[0] + 4; - regs->iasq[0] = regs->iasq[1] = regs->sr[7]; + regs->iasq[0] = regs->iasq[0] = regs->sr[7]; regs->gr[0] &= ~PSW_B; return; } diff --git a/trunk/arch/x86/kernel/apic/probe_64.c b/trunk/arch/x86/kernel/apic/probe_64.c index fcec2f1d34a1..bc3e880f9b82 100644 --- a/trunk/arch/x86/kernel/apic/probe_64.c +++ b/trunk/arch/x86/kernel/apic/probe_64.c @@ -44,11 +44,6 @@ static struct apic *apic_probe[] __initdata = { NULL, }; -static int apicid_phys_pkg_id(int initial_apic_id, int index_msb) -{ - return hard_smp_processor_id() >> index_msb; -} - /* * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. */ @@ -74,11 +69,6 @@ void __init default_setup_apic_routing(void) printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); } - if (is_vsmp_box()) { - /* need to update phys_pkg_id */ - apic->phys_pkg_id = apicid_phys_pkg_id; - } - /* * Now that apic routing model is selected, configure the * fault handling for intr remapping. diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index eb33aaa8415d..e90540a46a0b 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/arch/x86/xen/enlighten.c @@ -215,7 +215,6 @@ static __init void xen_init_cpuid_mask(void) (1 << X86_FEATURE_ACPI)); /* disable ACPI */ ax = 1; - cx = 0; xen_cpuid(&ax, &bx, &cx, &dx); /* cpuid claims we support xsave; try enabling it to see what happens */ @@ -1060,7 +1059,6 @@ asmlinkage void __init xen_start_kernel(void) /* set up basic CPUID stuff */ cpu_detect(&new_cpu_data); new_cpu_data.hard_math = 1; - new_cpu_data.wp_works_ok = 1; new_cpu_data.x86_capability[0] = cpuid_edx(1); #endif diff --git a/trunk/drivers/acpi/acpica/exstorob.c b/trunk/drivers/acpi/acpica/exstorob.c index 67340cc70142..257706e7734f 100644 --- a/trunk/drivers/acpi/acpica/exstorob.c +++ b/trunk/drivers/acpi/acpica/exstorob.c @@ -70,6 +70,12 @@ acpi_ex_store_buffer_to_buffer(union acpi_operand_object *source_desc, ACPI_FUNCTION_TRACE_PTR(ex_store_buffer_to_buffer, source_desc); + /* If Source and Target are the same, just return */ + + if (source_desc == target_desc) { + return_ACPI_STATUS(AE_OK); + } + /* We know that source_desc is a buffer by now */ buffer = ACPI_CAST_PTR(u8, source_desc->buffer.pointer); @@ -161,6 +167,12 @@ acpi_ex_store_string_to_string(union acpi_operand_object *source_desc, ACPI_FUNCTION_TRACE_PTR(ex_store_string_to_string, source_desc); + /* If Source and Target are the same, just return */ + + if (source_desc == target_desc) { + return_ACPI_STATUS(AE_OK); + } + /* We know that source_desc is a string by now */ buffer = ACPI_CAST_PTR(u8, source_desc->string.pointer); diff --git a/trunk/fs/notify/inotify/inotify_user.c b/trunk/fs/notify/inotify/inotify_user.c index dcd2040d330c..0e781bc88d1e 100644 --- a/trunk/fs/notify/inotify/inotify_user.c +++ b/trunk/fs/notify/inotify/inotify_user.c @@ -154,8 +154,7 @@ static struct fsnotify_event *get_one_event(struct fsnotify_group *group, event = fsnotify_peek_notify_event(group); - if (event->name_len) - event_size += roundup(event->name_len + 1, event_size); + event_size += roundup(event->name_len, event_size); if (event_size > count) return ERR_PTR(-EINVAL); @@ -181,7 +180,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, struct fsnotify_event_private_data *fsn_priv; struct inotify_event_private_data *priv; size_t event_size = sizeof(struct inotify_event); - size_t name_len = 0; + size_t name_len; /* we get the inotify watch descriptor from the event private data */ spin_lock(&event->lock); @@ -197,12 +196,10 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group, inotify_free_event_priv(fsn_priv); } - /* - * round up event->name_len so it is a multiple of event_size + /* round up event->name_len so it is a multiple of event_size * plus an extra byte for the terminating '\0'. */ - if (event->name_len) - name_len = roundup(event->name_len + 1, event_size); + name_len = roundup(event->name_len + 1, event_size); inotify_event.len = name_len; inotify_event.mask = inotify_mask_to_arg(event->mask); @@ -328,9 +325,8 @@ static long inotify_ioctl(struct file *file, unsigned int cmd, list_for_each_entry(holder, &group->notification_list, event_list) { event = holder->event; send_len += sizeof(struct inotify_event); - if (event->name_len) - send_len += roundup(event->name_len + 1, - sizeof(struct inotify_event)); + send_len += roundup(event->name_len, + sizeof(struct inotify_event)); } mutex_unlock(&group->notification_mutex); ret = put_user(send_len, (int __user *) p); @@ -591,10 +587,6 @@ static int inotify_new_watch(struct fsnotify_group *group, /* match the ref from fsnotify_init_markentry() */ fsnotify_put_mark(&tmp_ientry->fsn_entry); - /* if this mark added a new event update the group mask */ - if (mask & ~group->mask) - fsnotify_recalc_group_mask(group); - out_err: if (ret < 0) kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 2d537186191f..eccb561dd8a3 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -1274,10 +1274,6 @@ static void add_notes_attrs(struct module *mod, unsigned int nsect, struct module_notes_attrs *notes_attrs; struct bin_attribute *nattr; - /* failed to create section attributes, so can't create notes */ - if (!mod->sect_attrs) - return; - /* Count notes sections and allocate structures. */ notes = 0; for (i = 0; i < nsect; i++) @@ -2359,7 +2355,8 @@ static noinline struct module *load_module(void __user *umod, if (err < 0) goto unlink; add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs); - add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); + if (mod->sect_attrs) + add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs); /* Get rid of temporary copy */ vfree(hdr); diff --git a/trunk/net/sunrpc/clnt.c b/trunk/net/sunrpc/clnt.c index df1039f077c2..ebfcf9b89909 100644 --- a/trunk/net/sunrpc/clnt.c +++ b/trunk/net/sunrpc/clnt.c @@ -937,7 +937,6 @@ static inline void rpc_task_force_reencode(struct rpc_task *task) { task->tk_rqstp->rq_snd_buf.len = 0; - task->tk_rqstp->rq_bytes_sent = 0; } static inline void