Re: [PATCH] KVM: arm: Use PTR_ERR_OR_ZERO()

2017-12-04 Thread Christoffer Dall
On Mon, Dec 04, 2017 at 12:11:22PM +0100, Gomonovych, Vasyl wrote: > Hi Christoffer > > It is just syntax sugar of course > and in mentioned function context it looks harmonically because it is > in the end of function return statement. > But in context of around source files it is looks not so ha

Re: [PATCH] KVM: arm: Use PTR_ERR_OR_ZERO()

2017-12-04 Thread Gomonovych, Vasyl
Hi Christoffer It is just syntax sugar of course and in mentioned function context it looks harmonically because it is in the end of function return statement. But in context of around source files it is looks not so harmonically because existing code uses old approach. And this old approach is on

Re: [PATCH] KVM: arm: Use PTR_ERR_OR_ZERO()

2017-12-01 Thread Christoffer Dall
Hi Vasyl, On Tue, Nov 28, 2017 at 11:48:17PM +0100, Vasyl Gomonovych wrote: > Fix ptr_ret.cocci warnings: > virt/kvm/arm/vgic/vgic-its.c:971:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.co