[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d8a518c4a4014307b30020b38022d633@AcuMS.aculab.com>
Date: Tue, 1 Nov 2022 11:16:17 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Bo Liu' <liubo03@...pur.com>,
"pbonzini@...hat.com" <pbonzini@...hat.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] KVM: replace ternary operator with min()
From: Bo Liu
> Sent: 01 November 2022 07:25
>
> Fix the following coccicheck warning:
>
> virt/kvm/kvm_main.c:5289:10-11: WARNING opportunity for min()
...
> - return r < 0 ? r : 0;
> + return min(r, 0);
As has been repeatedly pointer out this is bogus.
min() should only be used for 'sizes'.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists