Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3272073pxx; Mon, 2 Nov 2020 04:50:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwH12aWj9CaBO5+OnyHTDqHbpit7Ojs4tPtbO/tbHurjUyI7OlRecmfQJP296C1OukXyNbJ X-Received: by 2002:a50:bb06:: with SMTP id y6mr16500488ede.278.1604321436228; Mon, 02 Nov 2020 04:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604321436; cv=none; d=google.com; s=arc-20160816; b=qppegCIE+MKweIIS3aFxaGKdC9OR5iMvPyxA3uF6xlLug9wD6k+8nTxxAm09dl/WGX EoYMqxDQN/6Bz7X8iiRZzxwfmlRovBA4/ydPV8VvHcv+dtffeQxNVFccFVmPq0fNOmJZ /QZ0dsCYVRYcdukkP++8Z6/ECYjj2H/J2EfISrReeFoK3QXxraQoBjs5ASWdrEpI8EM+ 2T4VYWGFrhAqhS7Vww0Q+5+HNdH968HHUyVq2vSOpjJ08750a+qxZ5N3AhQEMNG/067U Rb9s4J5gpEkNtb3wHujxF+MMHaN7xtoIcLRkiUBNZxTV+sfAy0gZjNK7GXNFkHbrPAGr pDog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:subject:from:references:to; bh=lOiq45rqGvmuo3fK0Wj4YvnBgtxQDBKg52+WAb/Ck+I=; b=yBMuoHfpOdR87Zd13pVYXN6A3RDxRNF8zPrEaH6S7Qhu3P2QdgSf6Oty529Uwd3EYf Mbv2P77iM+HABZkSMTIdHyuYLTMARu64NOmdX26vAiuFCTlRwoVCEURdxYaIvxTT4l4Q uYE30blVJm0UyJLwLPmid4Ggaeb+ibpy6mIfDWH53DpGcVvavy0gI2qtsouetMZOBjy2 yYMrD+PT1yUcIl/rSE1Pugcyhz4FnGp210MrhpdS83NWfzdh7BSm7ePEaKllvCbxVct4 5VtFVYEv5t87p2/dppsqfRRjhOXvBfv8GqW+kg2olFpFnLL8ITNFh92aQdGI6IwIvvub +HZg== 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 h13si4178740edn.268.2020.11.02.04.50.13; Mon, 02 Nov 2020 04:50:36 -0800 (PST) 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 S1728562AbgKBMsz (ORCPT + 99 others); Mon, 2 Nov 2020 07:48:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:42348 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728297AbgKBMsz (ORCPT ); Mon, 2 Nov 2020 07:48:55 -0500 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 338E1AD2F; Mon, 2 Nov 2020 12:48:53 +0000 (UTC) To: Tian Tao , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> From: Thomas Zimmermann Subject: Re: [PATCH] drm/irq: Modify the return value type of drm_irq_uninstall Message-ID: <7a06d5ba-27c6-0762-662c-fee1f8ddbc2e@suse.de> Date: Mon, 2 Nov 2020 13:48:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.3 MIME-Version: 1.0 In-Reply-To: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pNL9s8LzMQyxYjwvIIICYOvoK2xUAFNB7" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pNL9s8LzMQyxYjwvIIICYOvoK2xUAFNB7 Content-Type: multipart/mixed; boundary="zUrKldaiE4wYCbmdXWeHQQDP8XTMyngjv"; protected-headers="v1" From: Thomas Zimmermann To: Tian Tao , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <7a06d5ba-27c6-0762-662c-fee1f8ddbc2e@suse.de> Subject: Re: [PATCH] drm/irq: Modify the return value type of drm_irq_uninstall References: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> --zUrKldaiE4wYCbmdXWeHQQDP8XTMyngjv Content-Type: multipart/mixed; boundary="------------FEFB031F471706665CB01F21" Content-Language: en-US This is a multi-part message in MIME format. --------------FEFB031F471706665CB01F21 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Am 02.11.20 um 13:38 schrieb Tian Tao: > There is no driver to use the return value of drm_irq_uninstal, > so modify the return value type of drm_irq_uninstal to void. >=20 > Signed-off-by: Tian Tao > --- > drivers/gpu/drm/drm_irq.c | 13 ++++++------- > include/drm/drm_irq.h | 2 +- > 2 files changed, 7 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c > index 7537a3d..45e6471 100644 > --- a/drivers/gpu/drm/drm_irq.c > +++ b/drivers/gpu/drm/drm_irq.c > @@ -166,14 +166,14 @@ EXPORT_SYMBOL(drm_irq_install); > * Returns: > * Zero on success or a negative error code on failure. > */ > -int drm_irq_uninstall(struct drm_device *dev) > +void drm_irq_uninstall(struct drm_device *dev) > { > unsigned long irqflags; > bool irq_enabled; > int i; > =20 > if (!dev->irq_enabled || !dev) > - return 0; > + return; > =20 > irq_enabled =3D dev->irq_enabled; > dev->irq_enabled =3D false; > @@ -200,8 +200,8 @@ int drm_irq_uninstall(struct drm_device *dev) > spin_unlock_irqrestore(&dev->vbl_lock, irqflags); > } > =20 > - if (!irq_enabled) > - return -EINVAL; > + if (!drm_WARN_ON(dev, !irq_enabled)) > + return; > =20 > DRM_DEBUG("irq=3D%d\n", dev->irq); > =20 > @@ -213,7 +213,6 @@ int drm_irq_uninstall(struct drm_device *dev) > =20 > free_irq(dev->irq, dev); > =20 > - return 0; > } > EXPORT_SYMBOL(drm_irq_uninstall); > =20 > @@ -250,10 +249,10 @@ int drm_legacy_irq_control(struct drm_device *dev= , void *data, > return ret; > case DRM_UNINST_HANDLER: > mutex_lock(&dev->struct_mutex); > - ret =3D drm_irq_uninstall(dev); > + drm_irq_uninstall(dev); Oh, there actually is a user of this result! I grep'ed for this but didn't see it. I'm sorry for misleading you here. This is ioctl code and who which program depends on it.So we cannot actually drop the result code. I'll just ack your original patch, or you could add the managed interface that I described and convert hibmc to it. Your choice, let me know. Best regards Thomas > mutex_unlock(&dev->struct_mutex); > =20 > - return ret; > + return 0; > default: > return -EINVAL; > } > diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h > index d77f6e6..d9f6ec0 100644 > --- a/include/drm/drm_irq.h > +++ b/include/drm/drm_irq.h > @@ -27,6 +27,6 @@ > struct drm_device; > =20 > int drm_irq_install(struct drm_device *dev, int irq); > -int drm_irq_uninstall(struct drm_device *dev); > +void drm_irq_uninstall(struct drm_device *dev); > =20 > #endif >=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 --------------FEFB031F471706665CB01F21 Content-Type: application/pgp-keys; name="OpenPGP_0x680DC11D530B7A23.asc" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="OpenPGP_0x680DC11D530B7A23.asc" -----BEGIN PGP PUBLIC KEY BLOCK----- xsBNBFs50uABCADEHPidWt974CaxBVbrIBwqcq/WURinJ3+2WlIrKWspiP83vfZKaXhFYsdgX= H47 fDVbPPj+d6tQrw5lPQCyqjwrCPYnq3WlIBnGPJ4/jreTL6V+qfKRDlGLWFjZcsrPJGE0BeB5B= bqP 5erN1qylK9i3gPoQjXGhpBpQYwRrEyQyjuvk+Ev0K1Jc5tVDeJAuau3TGNgah4YchdHm3bkPj= z9E ErV85RwvImQ1dptvx6s7xzwXTgGAsaYZsL8WCwDaTuqFa1d1jjlaxg6+tZsB9GluwvIhSezPg= nEm imZDkGnZRRSFiGP8yjqTjjWuf0bSj5rUnTGiyLyRZRNGcXmu6hjlABEBAAHNKFRob21hcyBaa= W1t ZXJtYW5uIDx0emltbWVybWFubkBzdXNlLmNvbT7CwI4EEwEIADgCGwMFCwkIBwIGFQoJCAsCB= BYC AwECHgECF4AWIQRyF/usjOnPY0ShaOVoDcEdUwt6IwUCXvxIWAAKCRBoDcEdUwt6I+aZB/9ih= Onf G4Lgf1L87cvoXh95/bnaJ6aQhP6/ZeRleuCXflnyDajlm3c9loQr0r2bQUi7JeYwUKbBab2QS= GJm DMRGlLMnmzWB8mHmZ6bHAu+2Sth8SraE42p6BB9d8dlYEID+dl/D/xUBeulfkck5rloGtYqDi= +1Q DfkEZJaxVSZ6FFkXuQi/G9qcI4iklN2nv02iQ7mZe8WYAysix6s/6vIobhirEBreclSNxXqis= p8n 91+v855JC11EgRdUXMRK81IAaCKXP8zLx3ixku7mvP9Om61yerHSbeU2HZbIggZYQlFh6llJm= zF1 CjCWgPTJyk4t4kMTcNOw5ykD47vU/KW+wl0EEBECAB0WIQQn6OOmnzvP/7ktjm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lSI3H26qrE=3D =3DmxFq -----END PGP PUBLIC KEY BLOCK----- --------------FEFB031F471706665CB01F21-- --zUrKldaiE4wYCbmdXWeHQQDP8XTMyngjv-- --pNL9s8LzMQyxYjwvIIICYOvoK2xUAFNB7 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAl+gADQFAwAAAAAACgkQaA3BHVMLeiP/ fAgAjCYwOKfZx/Xur3Xvy3zmWAY8vUIw0vkARZq2qfIfqTaj+9j79BtThpXDVrClDbmrkZqHysGP 3IfQ79uxV9j2AemBce4obyDzEdWZZA/Pqh+E0pRrWsXeBKATXsAcafcaR5DZ3M9vuQVwBIf2MC41 XwCcn4K4vGn+Ii/GqVQ9Y/VvqtSZV1NYsrrCyin07YyMdOtbjrRKLlIuUJELYSTFok1NRbrSOu0H xcMBqPwEf47Nbvik5ujj1bhg3T933eTNNpfdiJKb2jO0vMp2TLr896i03mMgVywKgnhHn54UDtzs Yp1LyaB/k5G1Wm5d8LyEzwOxPZ6R3kONS75RjcT5OA== =caXP -----END PGP SIGNATURE----- --pNL9s8LzMQyxYjwvIIICYOvoK2xUAFNB7--