Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79037EB64DC for ; Fri, 14 Jul 2023 10:46:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1115C10E86C; Fri, 14 Jul 2023 10:46:19 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 872E710E86E for ; Fri, 14 Jul 2023 10:46:16 +0000 (UTC) Date: Fri, 14 Jul 2023 10:46:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1689331573; x=1689590773; bh=U0CfyV7Bh7oJ5xaa/saFWtrA0Pz5NAcT4Y6W8/mn8hQ=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=odbn76IJyiVQ5By+eUEjMDaO/zBoO09PEUpb/8FOAaIttsK3HWXhf+jiEEK1t9Lho MAcYUPT84Cv7BWDKV39nkJFgPAEsLRmw/ug1GzJCycIEIpA8L2lw80tq8FlKmKCGWy zPW+CJO1g43IN9mQnBV9wBraYvtkR+viQr3i+arU5Dpm3mDQG4as+NiF8H95VJ5t2e I6av2FCuWn/AzniLRc3r82jyKS5KrdiOImOCRZqxn90a9WYJOXaOeiFNmc7KDvYcx5 yE2Bt6n2IKmt2p0wSFNXanM8yYlWAUvhhhd+nYIu0ChsUtwDXB72sM06gQXP+JNnrN /H3Z7NXYpCqbA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 1/3] drm/drv: use enum drm_minor_type when appropriate Message-ID: <20230714104557.518457-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , =?utf-8?Q?Marek_Ol=C5=A1=C3=A1k?= , James Zhu , =?utf-8?Q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This makes it easier to figure out what the "type" variable can be set to when reading the implementation of these functions. Signed-off-by: Simon Ser Cc: Christian K=C3=B6nig Cc: James Zhu Cc: Marek Ol=C5=A1=C3=A1k Cc: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 12687dd9e1ac..3eda026ffac6 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -84,7 +84,7 @@ DEFINE_STATIC_SRCU(drm_unplug_srcu); */ =20 static struct drm_minor **drm_minor_get_slot(struct drm_device *dev, -=09=09=09=09=09 unsigned int type) +=09=09=09=09=09 enum drm_minor_type type) { =09switch (type) { =09case DRM_MINOR_PRIMARY: @@ -116,7 +116,7 @@ static void drm_minor_alloc_release(struct drm_device *= dev, void *data) =09} } =20 -static int drm_minor_alloc(struct drm_device *dev, unsigned int type) +static int drm_minor_alloc(struct drm_device *dev, enum drm_minor_type typ= e) { =09struct drm_minor *minor; =09unsigned long flags; @@ -160,7 +160,7 @@ static int drm_minor_alloc(struct drm_device *dev, unsi= gned int type) =09return 0; } =20 -static int drm_minor_register(struct drm_device *dev, unsigned int type) +static int drm_minor_register(struct drm_device *dev, enum drm_minor_type = type) { =09struct drm_minor *minor; =09unsigned long flags; @@ -203,7 +203,7 @@ static int drm_minor_register(struct drm_device *dev, u= nsigned int type) =09return ret; } =20 -static void drm_minor_unregister(struct drm_device *dev, unsigned int type= ) +static void drm_minor_unregister(struct drm_device *dev, enum drm_minor_ty= pe type) { =09struct drm_minor *minor; =09unsigned long flags; --=20 2.41.0