[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug report] drm/xen-front: Add support for Xen PV display frontend


  • To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 8 May 2020 07:34:56 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nurOTnXNAH6y5TE/bgfWbV4zWOoQBSLQbBmndLpMI3w=; b=IDTnBW4iH8hj+mMQmWwZojCN6tABM27OSoFxNXm/5NvUBq+Q56QXnp3yLwhr+Rxhxi1NpKPsN8OXBZsIJTx4VPXLlnl3rSzBbgR99bi7yh6K5+9NiisY+ekuD2GyEZWbnTaytwDs9gPBYA+aXOJrW18vWjZIaJdR58WpOA+5XCgrlRmW73DMBEJHPpca1gcEtU/YdLvnTSgjWnFoUqgzYpEcUAN6xDz4Y4aOx5s+Z1kk5N6i0pDHiZojvlURJP+kffQeaEhDkwNoEP5Dc8AlIR8CZ2WBGzVqcAfLyKyujPk8/A4neyoaCNMVEf0lAm4ndRHpZypSHePrCwglXlW29w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kL4iEETBB9dNaWgerJOu0cp66WrkVNOiP8Y2YVTdyRUyJRHm6CsEXTOyN0zTnhZ4OhA1DdR08um998nO57EriFBBX5NT5xGPSzyyshfv/heOK1FqpQa5uuofdSbiAulujXIBoqW4y9M8GANKZ+76LfOtGu0/HcpMCe6KPoZr1afzuoXHxaRZw327aRlDmj/5PJHK/xX4bAArcjMKYTUXI8Tpo2mWfRs8lnk7HK9UPgaUhScYUuM0R5MDBk4FIf51wzrwSNhvPkwEOF80WROCRGkHDmwL/mS6APYyxWWxSfmSQaCDydh0iJi3Wg0P3PVzOQoJdJeiV1h6t1ryl22WsA==
  • Authentication-results: oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=none action=none header.from=epam.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "kernel-janitors@xxxxxxxxxxxxxxx" <kernel-janitors@xxxxxxxxxxxxxxx>, "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 08 May 2020 07:35:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWF8n8HYXBbl5N3kSvZpSjxllEBqiDciuAgAAEjwCAGnAHgA==
  • Thread-topic: [bug report] drm/xen-front: Add support for Xen PV display frontend

On 4/21/20 2:51 PM, Dan Carpenter wrote:
> It turns out there aren't that many of these in xen.
>
> $ grep IS_ERR_OR_NULL drivers/gpu/drm/xen/ -Rn
> drivers/gpu/drm/xen/xen_drm_front_kms.c:63:     if (IS_ERR_OR_NULL(fb))
> drivers/gpu/drm/xen/xen_drm_front_gem.c:86:     if (IS_ERR_OR_NULL(xen_obj))
> drivers/gpu/drm/xen/xen_drm_front_gem.c:120:    if 
> (IS_ERR_OR_NULL(xen_obj->pages)) {
> drivers/gpu/drm/xen/xen_drm_front_gem.c:139:    if (IS_ERR_OR_NULL(xen_obj))
> drivers/gpu/drm/xen/xen_drm_front_gem.c:197:    if (IS_ERR_OR_NULL(xen_obj))
> drivers/gpu/drm/xen/xen_drm_front.c:403:        if (IS_ERR_OR_NULL(obj)) {
>
> They're all wrong, because if the pointer was really NULL then it's
> not handled correctly and would eventually lead to a runtime failure.

It seems that you were right and I can simply change all IS_ERR_OR_NULL 
to just IS_ERR

I am planning a series of patches later on, so I'll include this fix as well

>
> Normally Smatch is smart enough to know that the pointer isn't NULL so
> it doesn't generate a warning but yesterday I introduced a bug in Smatch
> by mistake.  It's fixed now.
>
> regards,
> dan carpenter
>
Thank you,

Oleksandr

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.