[Skiboot] [RFC Coverity PATCH 1/2] hw/p7ioc-phb.c: Fix assignment of addr
Gavin Shan
gwshan at linux.vnet.ibm.com
Thu Aug 13 17:10:27 AEST 2015
On Thu, Aug 13, 2015 at 05:00:49PM +1000, Stewart Smith wrote:
>Hi Gavin,
>
>are you able to ack this as correct? It does seem to change some logic
>as to what's going on, and I'd prefer not to merge things that break PHB
>things :)
>
Stewart, the change looks good to me :-)
>Kamalesh Babulal <kamalesh at linux.vnet.ibm.com> writes:
>> In p7ioc_err_inject_io32() addr is passed as an argument.
>> Based on its value , we have a conditional check(s).
>> Re-assigning the addr to 0x0ull, make the whole branching
>> check(s) a dead code.
>>
>> Remove the re-assignment of addr, to fix the issue.
>>
>> Fixes Coverity defect#101020.
>>
>> Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
>> Cc: Gavin Shan <gwshan at linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
>> ---
>> hw/p7ioc-phb.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
>> index 0b37993..5167832 100644
>> --- a/hw/p7ioc-phb.c
>> +++ b/hw/p7ioc-phb.c
>> @@ -1409,7 +1409,6 @@ static int64_t p7ioc_err_inject_io32(struct p7ioc_phb *p, uint32_t pe_no,
>> int32_t index;
>>
>> a = 0x0ull;
>> - addr = 0x0ull;
>> prefer = 0x0ull;
>> for (index = 0; index < 128; index++) {
>> if (GETFIELD(IODA_XXDT_PE, p->iod_cache[index]) != pe_no)
Thanks,
Gavin
More information about the Skiboot
mailing list