From patchwork Wed May 22 15:02:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10956069 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 B6BB4912 for ; Wed, 22 May 2019 15:03:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A74DF28B82 for ; Wed, 22 May 2019 15:03:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B69028BDF; Wed, 22 May 2019 15:03:46 +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 42A0528B82 for ; Wed, 22 May 2019 15:03:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 131C689AC9; Wed, 22 May 2019 15:03:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DDAE89AC9 for ; Wed, 22 May 2019 15:03:43 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id 15so2572862wmg.5 for ; Wed, 22 May 2019 08:03:43 -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:mime-version :content-transfer-encoding; bh=LW/Ud+w+z0PxvG2JwRl1UYHPfxMf4hKL7DmvJrgwan4=; b=UKKyCsSyd+PBpDqbrVh+xSiFnkoq5OIRVSmCDB0lDN1c11fAnAoweAZhECfhA7L5lQ tzpBmJS7RZVGcrigDMysehcdoLzmAwuHSaT5u//qWaVG3cfvB8/B5lD0JIf7mKm4T+eR RmBhDh/COjl2gVVYMZr0eoViALQ7V0rYVOck+wAD+9Ou5pTA3+Kxoh6vFKWem0Qzq0FB l7Wyv38YneLZaAD5u/2W9HjNH/6FMCSooiw4RuFGnd6bj4+jhaixm7RIXjNddNC4WAPh GhtzMC0IF2RwxwdGJweFN9xj0vLKILD8yYs3yAW0KXhG7wvdJq5pZf2eUMNMPKXY3WC3 1yvQ== X-Gm-Message-State: APjAAAX6ohP8w+RMaHMbL9m3W502fMrx8n1SvfZsRPvybiIQZrslTCaE nePH7509LtB+quYCRnPg3HWF0aYI X-Google-Smtp-Source: APXvYqzPtjy30OSXSrGKRXrvKTrZhtRPbImmfhf2h4TSvAvD4Q4hNqDdHPaDnKxY02EEceiZoFYZzA== X-Received: by 2002:a1c:b3c3:: with SMTP id c186mr7836117wmf.93.1558537421731; Wed, 22 May 2019 08:03:41 -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 l14sm21978468wrt.57.2019.05.22.08.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 08:03:40 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/omap: remove open-coded drm_invalid_op() Date: Wed, 22 May 2019 16:02:18 +0100 Message-Id: <20190522150219.13913-1-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 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:mime-version :content-transfer-encoding; bh=LW/Ud+w+z0PxvG2JwRl1UYHPfxMf4hKL7DmvJrgwan4=; b=NdZHS2h8+7MPlZFTi+5KPBGNrWwx3QLE7wQ+0yhuu5vGNGcoJByjSHT9aiTixjkgSN OFb/nWIP/VDZynzOqxLZOroTVyB+y9WPVsz5wrWbYedwuwFUPVtkxLYq0kATcp429jcU BESIbmiZeyDtVjC/RhaK7KYCiZ9j2FVtqTTDsMuQkVaZ+Xs7YlTSVry9oBs9k+N4k9p8 QgZ1+oE6JYmohnzh6Vx0R4Xks5wyDw78iARWblDITJRm/isRCc056b6S1Ej46FRLNaya Nf8AR/pJfWKDqfq1orbgtU2V7wAmfhGR4aZQDa+hNce34oUY7A2sA9OV2zx92r91nmAc OsNw== 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: Tomi Valkeinen , emil.l.velikov@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov Cc: Tomi Valkeinen Signed-off-by: Emil Velikov Acked-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_drv.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index 1b9b6f5e48e1..672e0f8ad11c 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -439,20 +439,6 @@ static int ioctl_get_param(struct drm_device *dev, void *data, return 0; } -static int ioctl_set_param(struct drm_device *dev, void *data, - struct drm_file *file_priv) -{ - struct drm_omap_param *args = data; - - switch (args->param) { - default: - DBG("unknown parameter %lld", args->param); - return -EINVAL; - } - - return 0; -} - #define OMAP_BO_USER_MASK 0x00ffffff /* flags settable by userspace */ static int ioctl_gem_new(struct drm_device *dev, void *data, @@ -492,7 +478,7 @@ static int ioctl_gem_info(struct drm_device *dev, void *data, static const struct drm_ioctl_desc ioctls[DRM_COMMAND_END - DRM_COMMAND_BASE] = { DRM_IOCTL_DEF_DRV(OMAP_GET_PARAM, ioctl_get_param, DRM_AUTH | DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, ioctl_set_param, + DRM_IOCTL_DEF_DRV(OMAP_SET_PARAM, drm_invalid_op, DRM_AUTH | DRM_MASTER | DRM_ROOT_ONLY), DRM_IOCTL_DEF_DRV(OMAP_GEM_NEW, ioctl_gem_new, DRM_AUTH | DRM_RENDER_ALLOW), From patchwork Wed May 22 15:02: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: 10956071 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 80673912 for ; Wed, 22 May 2019 15:03:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 713C628BCA for ; Wed, 22 May 2019 15:03:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65BA028B87; Wed, 22 May 2019 15:03:49 +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 0FD9328B95 for ; Wed, 22 May 2019 15:03:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B920389B05; Wed, 22 May 2019 15:03:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 69B4289AC9; Wed, 22 May 2019 15:03:44 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id f10so2696032wre.7; Wed, 22 May 2019 08:03:44 -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=5kGyKa6YZVs2CoLnHdrZtrYw7gGhR5+N5hGtSGcOXr8=; b=JekLqGamVCovf1P5mf2W9zTG4jr5HTdiT/oUJDA0L929Cxm8B0Hlh9dFmcOxwApU5/ 9dvSgYVn2UGn/kg7IbKNjQP4yYwtyCYWwm8rS4zDUZeKqXxFE/P/jW/IBG323Wx5LRY/ jWWv9fBEOCbmyS9dD2ZoXFwg3KdQ4ihPjbfrK/qVOO0tRhbKUHY6VR1zdpxWWW7gPW4H I5HEtZwOUZ8LAwLh/vN7XJHDCoIf1MbpZaB/s5/i6kyBUaNULumcv7BN0EGuCVVpUe5F TOS/euSGuNap5HITsUVkEQ0wL2ZH5hg3q63WdfZ+mPkeNbirrdaDMAx8BsEbhVt5gSBO J1SQ== X-Gm-Message-State: APjAAAXY1ZHGqNLHJs7kdErmahKkb0uZB3uW1qMBWCjKYWISKVLaKGnx c43FN/Q1YTgZ2ka/YBNB48taFmOk X-Google-Smtp-Source: APXvYqwvPNvioxDO0UhXg6x/I3Qvkb7syDoVr7/9lv457FLpRCqlDnZ7GM0D0+CXI4MvleN+KUanBA== X-Received: by 2002:adf:db87:: with SMTP id u7mr5572428wri.245.1558537422945; Wed, 22 May 2019 08:03:42 -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 l14sm21978468wrt.57.2019.05.22.08.03.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 08:03:42 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm/nouveau: remove open-coded drm_invalid_op() Date: Wed, 22 May 2019 16:02:19 +0100 Message-Id: <20190522150219.13913-2-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190522150219.13913-1-emil.l.velikov@gmail.com> References: <20190522150219.13913-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=5kGyKa6YZVs2CoLnHdrZtrYw7gGhR5+N5hGtSGcOXr8=; b=qaXnpINeH45UpnUMeAfSA+2lirUDfqbCK5GANULVkkdme7dYqeDY1rOI8CeMuFjlOH YIETEOdtvWN9l+v9XOidSDKj8gH5Hx0ZdaMzmew8d4EpYDWj55d0xIuFALZaKP2SNjPx lM0nNs7jId/jDc1yHSPmvUVoVqyLAjpqPHzeWBPYiMMyWX1NaMqkerTeR/AmTN2Ygf3k GpxAqySMIOFv+ttsXIwjpN2NSc7j+VdgD4Z91KNGuuyVJBbna8VYUbR22fxUhMle1J73 26fSyzThJ7fCktrpGMxcEboLas6w5iyyjqS9dU9uQDnGjn6pJ/F9TFib7757wXcAJggo HDtQ== 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: nouveau@lists.freedesktop.org, emil.l.velikov@gmail.com, Ben Skeggs Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Signed-off-by: Emil Velikov --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 6 ------ drivers/gpu/drm/nouveau/nouveau_abi16.h | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index c3fd5dd39ed9..0c585dc5f5c3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c @@ -244,12 +244,6 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS) return 0; } -int -nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS) -{ - return -EINVAL; -} - int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) { diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.h b/drivers/gpu/drm/nouveau/nouveau_abi16.h index 36fde1ff3ad5..9275d529b947 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.h +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.h @@ -6,7 +6,6 @@ struct drm_device *dev, void *data, struct drm_file *file_priv int nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS); -int nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS); int nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS); int nouveau_abi16_ioctl_channel_free(ABI16_IOCTL_ARGS); int nouveau_abi16_ioctl_grobj_alloc(ABI16_IOCTL_ARGS); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 22cd45845e07..ed45ad2b72f2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -1046,7 +1046,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) static const struct drm_ioctl_desc nouveau_ioctls[] = { DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_abi16_ioctl_getparam, DRM_AUTH|DRM_RENDER_ALLOW), - DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_abi16_ioctl_setparam, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), + DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, drm_invalid_op, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_abi16_ioctl_channel_alloc, DRM_AUTH|DRM_RENDER_ALLOW), DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_abi16_ioctl_channel_free, DRM_AUTH|DRM_RENDER_ALLOW), DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_abi16_ioctl_grobj_alloc, DRM_AUTH|DRM_RENDER_ALLOW),