* [patch] x86: Unneeded assignment to tsk in recent x86 change, v2
@ 2009-01-22 7:33 Uros Bizjak
2009-01-23 13:46 ` Mikael Pettersson
0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2009-01-22 7:33 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 837 bytes --]
On Wed, Jan 21, 2009 at 10:13 PM, Mikael Pettersson <mikpe@it.uu.se> wrote:
Impact: Cleanup.
Remove unneeded assignment to tsk in recent x86 change.
> > Hm, I'm not sure I see the inconsistency here. Care to explain this
> > inconsistency in a couple of words?
>
> You're initialising some variables in their declarations, and some
> using assignments at the start of the procedure body. In particular,
> for some reason you don't initialise 'mm' in its declaration even
> though you could do so for consistency with 'tsk'.
>
> However, I'm strongly in favour of separating declarations and
> initialisations (esp. ones that need actual computations), so
> rather than subjecting 'mm' to the treatment you gave 'tsk',
> just leave the code alone.
>
Patch v2 with the second hunk removed is attached to this message.
Thanks,
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 447 bytes --]
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 93a563b..621e9b3 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -421,7 +421,6 @@ static noinline void pgtable_bad(struct pt_regs *regs,
printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
tsk->comm, address);
dump_pagetable(address);
- tsk = current;
tsk->thread.cr2 = address;
tsk->thread.trap_no = 14;
tsk->thread.error_code = error_code;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] x86: Unneeded assignment to tsk in recent x86 change, v2
2009-01-22 7:33 [patch] x86: Unneeded assignment to tsk in recent x86 change, v2 Uros Bizjak
@ 2009-01-23 13:46 ` Mikael Pettersson
0 siblings, 0 replies; 2+ messages in thread
From: Mikael Pettersson @ 2009-01-23 13:46 UTC (permalink / raw)
To: Uros Bizjak; +Cc: linux-kernel
Uros Bizjak writes:
> On Wed, Jan 21, 2009 at 10:13 PM, Mikael Pettersson <mikpe@it.uu.se> wrote:
>
> Impact: Cleanup.
>
> Remove unneeded assignment to tsk in recent x86 change.
>
> > > Hm, I'm not sure I see the inconsistency here. Care to explain this
> > > inconsistency in a couple of words?
> >
> > You're initialising some variables in their declarations, and some
> > using assignments at the start of the procedure body. In particular,
> > for some reason you don't initialise 'mm' in its declaration even
> > though you could do so for consistency with 'tsk'.
> >
> > However, I'm strongly in favour of separating declarations and
> > initialisations (esp. ones that need actual computations), so
> > rather than subjecting 'mm' to the treatment you gave 'tsk',
> > just leave the code alone.
> >
>
> Patch v2 with the second hunk removed is attached to this message.
>
> Thanks,
> Uros.
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 93a563b..621e9b3 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -421,7 +421,6 @@ static noinline void pgtable_bad(struct pt_regs *regs,
> printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
> tsk->comm, address);
> dump_pagetable(address);
> - tsk = current;
> tsk->thread.cr2 = address;
> tsk->thread.trap_no = 14;
> tsk->thread.error_code = error_code;
ACKed, but an equivalent patch from Johannes Weiner has already been committed
to the x86 git tree.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-23 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 7:33 [patch] x86: Unneeded assignment to tsk in recent x86 change, v2 Uros Bizjak
2009-01-23 13:46 ` Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®