From patchwork Wed May 22 16:41:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10956351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D3B31390 for ; Wed, 22 May 2019 16:42:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FFA428C9B for ; Wed, 22 May 2019 16:42:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 342AB28C9C; Wed, 22 May 2019 16:42:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D840126E69 for ; Wed, 22 May 2019 16:42:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A7E389C19; Wed, 22 May 2019 16:42:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 149A989C18 for ; Wed, 22 May 2019 16:42:48 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id r7so3034250wrr.13 for ; Wed, 22 May 2019 09:42:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FKVd6xhpYfv+ZT31yBVOx/hjmfuDpWSl0legPgI6N+0=; b=CHC5BmzYyR7pQTuLqof5zO/OhgBuesmnvO1M8s+Wqg/UF6xzjeK7Nt0qH4qI80IoXM B/w/l+VxcJ2ZCYXezA/rqyYyKumA35kBSyAwxa4CI410vwtYdNkvK+pqfrpirUx4T6g0 sD16H9YNr5QlLRnkFHPWHspnqaUpaLtsk04qBiYa4B81eK4UjIPz1alz3sMgCiepNan3 d5o3pkze7ZTkQaYXbQCljDsoN6fQL18nC+TnNT8S2z4558NVRROOQ9dwhLAX4NrX5p9K W943OpQK/BwM0Nwxq+pPLweChQDs9xQugPMQpTE7+XKxT5xGhKWKvAOnzdZj8HhgtWn7 ti7Q== X-Gm-Message-State: APjAAAV/T7QJ6VNSLtF98+7YVQ5kETxA5/BJnOdOUQMONLgPCp/FIVdG 0uDsxmul8C79q5KbIi4EHdW2arpO X-Google-Smtp-Source: APXvYqyHhTDtJjduPo0dH9P2lReJuJD//FrO5Bb8WzOdRG5o4pHomGt4avISjxxri3+osHv4H+5JNQ== X-Received: by 2002:adf:ce88:: with SMTP id r8mr33705053wrn.191.1558543366581; Wed, 22 May 2019 09:42:46 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id l18sm24576684wrv.38.2019.05.22.09.42.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 09:42:45 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm: make drm_ioctl_permit() internal Date: Wed, 22 May 2019 17:41:19 +0100 Message-Id: <20190522164119.24139-5-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190522164119.24139-1-emil.l.velikov@gmail.com> References: <20190522164119.24139-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FKVd6xhpYfv+ZT31yBVOx/hjmfuDpWSl0legPgI6N+0=; b=tFLbIoLdUZshS4NmVWVG0rZCkb2Z6byaRYuI9aU4hRiJ5Bze6DMlb38gd7yss0NYg2 HYpuyUE/M7qn64im5eokX0FPJrCerJu9om9pCYnhH/htzszMpvOoDs+Tvnlq6CPOCA+g ZEA4xu5KKYiwMXSwoWdKA2wZeuuz3uIyI4LD1whpLHSzceVFf4XkEU3Tr86BFB5N0CBd 2iwKa/pdk/ELVf8akh2+zGj/rGOuLc0qbErBSks9rpJjiJN6126MrcDdDOUXlmOMU7SA y03mlBdVEnxOTAqSOxKowJj/6SuUSizPRdyz3CNAr2aKJrJLV6O3PSVZjtXI4NncSGJQ F8Tw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@collabora.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov As of earlier commit the function is used only within drm core. Cc: Daniel Vetter Signed-off-by: Emil Velikov --- drivers/gpu/drm/drm_ioctl.c | 3 +-- include/drm/drm_ioctl.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 2263e3ddd822..0646c0bd5535 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -523,7 +523,7 @@ int drm_version(struct drm_device *dev, void *data, * Returns: * Zero if allowed, -EACCES otherwise. */ -int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) +static int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) { /* ROOT_ONLY is only for CAP_SYS_ADMIN */ if (unlikely((flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN))) @@ -546,7 +546,6 @@ int drm_ioctl_permit(u32 flags, struct drm_file *file_priv) return 0; } -EXPORT_SYMBOL(drm_ioctl_permit); #define DRM_IOCTL_DEF(ioctl, _func, _flags) \ [DRM_IOCTL_NR(ioctl)] = { \ diff --git a/include/drm/drm_ioctl.h b/include/drm/drm_ioctl.h index fafb6f592c4b..f3fba529cb1b 100644 --- a/include/drm/drm_ioctl.h +++ b/include/drm/drm_ioctl.h @@ -163,7 +163,6 @@ struct drm_ioctl_desc { .name = #ioctl \ } -int drm_ioctl_permit(u32 flags, struct drm_file *file_priv); long drm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); long drm_ioctl_kernel(struct file *, drm_ioctl_t, void *, u32); #ifdef CONFIG_COMPAT