Re: [PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-12 Thread Peter Maydell
On Wed, 4 Nov 2020 at 11:44, Stafford Horne wrote: > As for the patch. > > Acked-by: Stafford Horne Thanks; I'll take this via target-arm.next since I'm putting together a pullreq at the moment. -- PMM

Re: [PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-04 Thread Stafford Horne
On Wed, Nov 04, 2020 at 10:37:17AM +, Peter Maydell wrote: > On Wed, 4 Nov 2020 at 07:10, Stafford Horne wrote: > > > > On Tue, Nov 03, 2020 at 11:46:54AM +, Peter Maydell wrote: > > > In the mtspr helper we attempt to check for "is the timer disabled" > > > with "if (env->ttmr & TIMER_NON

Re: [PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-04 Thread Peter Maydell
On Wed, 4 Nov 2020 at 07:10, Stafford Horne wrote: > > On Tue, Nov 03, 2020 at 11:46:54AM +, Peter Maydell wrote: > > In the mtspr helper we attempt to check for "is the timer disabled" > > with "if (env->ttmr & TIMER_NONE)". This is wrong because TIMER_NONE > > is zero and the condition is a

Re: [PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-03 Thread Stafford Horne
On Tue, Nov 03, 2020 at 11:46:54AM +, Peter Maydell wrote: > In the mtspr helper we attempt to check for "is the timer disabled" > with "if (env->ttmr & TIMER_NONE)". This is wrong because TIMER_NONE > is zero and the condition is always false (Coverity complains about > the dead code.) > > T

[PATCH] target/openrisc: Remove dead code attempting to check "is timer disabled"

2020-11-03 Thread Peter Maydell
In the mtspr helper we attempt to check for "is the timer disabled" with "if (env->ttmr & TIMER_NONE)". This is wrong because TIMER_NONE is zero and the condition is always false (Coverity complains about the dead code.) The correct check would be to test whether the TTMR_M field in the register