Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2082064ybt; Thu, 2 Jul 2020 23:48:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIBHKmQfkKvFOgxzDECpZH/tT7H+PgifLLo8z+bhPE0uGz9ItqZQbtdeQu81CMpcA11kgc X-Received: by 2002:a17:906:8688:: with SMTP id g8mr30336859ejx.505.1593758905496; Thu, 02 Jul 2020 23:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593758905; cv=none; d=google.com; s=arc-20160816; b=yjAkQGkdPmt8px/ZQ2kksL55n+kx7HdKMWkIRxWu8/LBm6O6tqiWnfimBUrxgCwQ4K wZJnet1mZpaAVIZUCkxDLGC3xml+OIXH12RxBgtu3lZIh5f7FPeFFCRf6LM3j0XyUGnu dDvjRjpqWAwy3fNcVgOSicSVlc2oRn1iinhe4M2Kj7lBzOkRgq1/UBoK2dc5n4epjkj5 w/tz9dW7SWXr3q8ytdr3Id+/yg1O6q4f4PbaAMtDc5W7ASdcnMI8GgKSwN2N2dtyfBF3 pl/RGJkx/PbURCazV0eWpBf/7u95CHZxxZw5BZHwZrw/fN2LFWrwC903ZX2AboU7AL5E NG/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Nrfa5X149zfVC46woOw8L6CJ0xbLUxfFHNMYmsJWfpk=; b=ugl717UtU6fR54C7UIR+jGL9bpMSIfoA43L0Dw5EeyexvwBEDRmFNFZf+KJXnDYSE4 i7bNmFH8fORD+8Ky0WTVGN+BUEg5W8Wo3VnzCnXr3EQHcWpFAihQOdGWB+9tDklyROko dFW0goo/xyZpt3Qpljdi2+Uxmt6hPvP/Az+s466zENRWmm+QjmedZY385LC9iecAxfv+ HgLQqpuSNMgJY8fKbX0SuLl9X+O3V74IN+r1lgWdoP4UJelcywDHUjO3QT5ANtJ2pYAI sDLlHdk1Cz7i1znA86OkhZERjrEVNH+vJ68V9Y8aYo2bFAb6dyX385imDIw/UhuA9UUd AoCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si7157849edp.40.2020.07.02.23.48.02; Thu, 02 Jul 2020 23:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgGCGpN (ORCPT + 99 others); Fri, 3 Jul 2020 02:45:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:58278 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbgGCGpN (ORCPT ); Fri, 3 Jul 2020 02:45:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 81AA7AD04; Fri, 3 Jul 2020 06:45:11 +0000 (UTC) Subject: Re: [PATCH] drm/hisilicon: Fixed the warning: Assignment of 0/1 to bool variable To: Tian Tao , puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org, linux-kernel@vger.kernel.org Cc: linuxarm@huawei.com References: <1593694455-31268-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Message-ID: <79453f85-850b-3554-c5e1-6aa763366685@suse.de> Date: Fri, 3 Jul 2020 08:45:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <1593694455-31268-1-git-send-email-tiantao6@hisilicon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NBvhXxCVjwJ0JRvqb3n89VGbiE0I9oqRz" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NBvhXxCVjwJ0JRvqb3n89VGbiE0I9oqRz Content-Type: multipart/mixed; boundary="SLBJedyK81fhBMwszy4ZnPXBndg7QdfLc"; protected-headers="v1" From: Thomas Zimmermann To: Tian Tao , puck.chen@hisilicon.com, airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com, alexander.deucher@amd.com, tglx@linutronix.de, dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org, linux-kernel@vger.kernel.org Cc: linuxarm@huawei.com Message-ID: <79453f85-850b-3554-c5e1-6aa763366685@suse.de> Subject: Re: [PATCH] drm/hisilicon: Fixed the warning: Assignment of 0/1 to bool variable References: <1593694455-31268-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1593694455-31268-1-git-send-email-tiantao6@hisilicon.com> --SLBJedyK81fhBMwszy4ZnPXBndg7QdfLc Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi thanks for improving the driver. Am 02.07.20 um 14:54 schrieb Tian Tao: > fixed the following warning: > hibmc_drm_drv.c:296:1-18:WARNING: Assignment of 0/1 to bool variable. > hibmc_drm_drv.c:301:2-19: WARNING: Assignment of 0/1 to bool variable. >=20 > Signed-off-by: Tian Tao > --- > drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/= gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > index 249c298..2fc0c97 100644 > --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c > @@ -294,12 +294,12 @@ static int hibmc_load(struct drm_device *dev) > goto err; > } > =20 > - priv->msi_enabled =3D 0; > + priv->msi_enabled =3D false; > ret =3D pci_enable_msi(dev->pdev); priv->msi_enabled is unused by the driver. Better remove it entirely. If the MSI flag will be required later, there's already struct pci_dev.msi_enabled. Apart from that, the one-by-one approach to patching is somewhat tedious. Could you collect patches and send them out in batches? It would make reviewing easier and give reviewers an idea of where you're going with the driver. Best regards Thomas > if (ret) { > DRM_WARN("enabling MSI failed: %d\n", ret); > } else { > - priv->msi_enabled =3D 1; > + priv->msi_enabled =3D true; > ret =3D drm_irq_install(dev, dev->pdev->irq); > if (ret) > DRM_WARN("install irq failed: %d\n", ret); >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany (HRB 36809, AG N=C3=BCrnberg) Gesch=C3=A4ftsf=C3=BChrer: Felix Imend=C3=B6rffer --SLBJedyK81fhBMwszy4ZnPXBndg7QdfLc-- --NBvhXxCVjwJ0JRvqb3n89VGbiE0I9oqRz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl7+0/MUHHR6aW1tZXJt YW5uQHN1c2UuZGUACgkQaA3BHVMLeiMwjQgAvUNe69g3WnJQEfYLOPn0c895abnF O6USnAAu63cHqyJHqygpzqGk/N6rU7bkLl4AQG3gQvlltZ3okwaofiHHFqrg8Krg GYNW/Ybo75ec7WPoqu3kUkG7ra1dmCsk+nygs29sVnIvgaXeZLjcpgw4Kt+liIB6 CEIoL1LuWYpgFtrd6QlFcI2JzX7X7Ptj3AZ5jxouBtTM+dft+L+Q8SJXEGfj6CyT /UxsG1m/QqyJLvAd2VubnoOmRHWagKa3AqzMlvD2euy/9b9RzxwaETpOyq9IonEX WaAEiINOl8qAhMpS6ULWoQtb3Wvb6uNzX8MLnRlbbkeXzxmwNavE3qwT8w== =gyd9 -----END PGP SIGNATURE----- --NBvhXxCVjwJ0JRvqb3n89VGbiE0I9oqRz--