From patchwork Mon Mar 19 05:58:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 10302421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D0ED60349 for ; Thu, 22 Mar 2018 22:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46F0B28A0A for ; Thu, 22 Mar 2018 22:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B9A728A0C; Thu, 22 Mar 2018 22:05:30 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 2367A28A0A for ; Thu, 22 Mar 2018 22:05:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D6F8A6E06E; Thu, 22 Mar 2018 22:05:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x242.google.com (mail-qk0-x242.google.com [IPv6:2607:f8b0:400d:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id B35746E2BF for ; Mon, 19 Mar 2018 05:58:24 +0000 (UTC) Received: by mail-qk0-x242.google.com with SMTP id s78so17119397qkl.8 for ; Sun, 18 Mar 2018 22:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=wj5XaN5d+qvOGymwQjZUqfitv4e2e7+4amG+yF7my0I=; b=ZGA8RqSCVlqgw4IgjzoqdmQcjhCBl9i724MTbrSn259JxKnXqfqdTtWHHhXyb70nkL Era2ta2zcO2uD5pVBsXgABjoUubEmY/UZ5OlWRy30fc0L6dmp998uouZIW/F+cB20Ztx +HN9byIuufw2lxT7ylSIlYL6Obr30FQoS38sM5e0a/PbcXC7emQ9V4ARkNYpBtyF4xzj J55BsdAzExz/rTQr2PBzfPbNLwjPLlVK/GuU/zH+f9lUjnnBZ9htkzo1FpD6dU3PJgqM 539jUmrCUFak+xP83yoEMIbVnrtXgXynef3gobpZ9lpXbrz1HgKaCQtq8XOmnQQh/jlI vK2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=wj5XaN5d+qvOGymwQjZUqfitv4e2e7+4amG+yF7my0I=; b=L3B7zug+SCDdTg3RvZTIGAc19+UIO6B6v4IJHnohTP21oF3Z4GWzSx8a27GtcdouE0 vjGe89S8cjPI3gXvusdM2pepjCdP8eAIyQAMryyZoa8LHyJvkp9RVevD0X0JYjpzXL7B 5Wx/aKdVA50HFnN414E9sjWCyoFqLgMsHVChzNeOLD0CW+oOWJ/h1lNVr3VD7Rmixxv6 uHFjzz9chMUAUaLXabqQOqEw8d8ap/W4ffP98gUghpMCRj1iuwSjg8h505f15icUEqYD 2DI3HMc4AhKAVTaxXXJFmzb0hQ5hHXqlzz6gvpuKk/JIRBgtn5EkbuYkl/x7wJ4dkJcg oa0g== X-Gm-Message-State: AElRT7ENWCHFmS8grgKInIUxMMs5Qs4icGuAejwjvNQ0Qm1wkBDWcsZG vnurResFpkYd7HU1IEhqguw= X-Google-Smtp-Source: AG47ELsGZYQ6+r2mbhaxTyC0xMTfdYToQGlDWRAmIP0lI6RXsR09Wfr+j+ieIEyYIDdQqQjFZdS7HQ== X-Received: by 10.233.239.71 with SMTP id d68mr5749413qkg.100.1521439103501; Sun, 18 Mar 2018 22:58:23 -0700 (PDT) Received: from haneen-VirtualBox (c-73-89-130-249.hsd1.nh.comcast.net. [73.89.130.249]) by smtp.gmail.com with ESMTPSA id g9sm9880403qti.11.2018.03.18.22.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 22:58:22 -0700 (PDT) Date: Mon, 19 Mar 2018 01:58:20 -0400 From: Haneen Mohammed To: hamohammed.sa@gmail.com Subject: [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases Message-ID: <20180319055820.GA17502@haneen-VirtualBox> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Thu, 22 Mar 2018 22:05:16 +0000 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: David Airlie , dri-devel@lists.freedesktop.org, outreachy-kernel@googlegroups.com, Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch remove the compatibility aliases drm_mode_object_{reference/unreference} of drm_mode_object_{get/put} since all callers have been converted to the prefered _{get/put}. Remove the helpers from the semantic patch drm-get-put-cocci. Signed-off-by: Haneen Mohammed --- include/drm/drm_mode_object.h | 24 ------------------------ scripts/coccinelle/api/drm-get-put.cocci | 10 ---------- 2 files changed, 34 deletions(-) diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h index 7ba3913..c34a3e8 100644 --- a/include/drm/drm_mode_object.h +++ b/include/drm/drm_mode_object.h @@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, void drm_mode_object_get(struct drm_mode_object *obj); void drm_mode_object_put(struct drm_mode_object *obj); -/** - * drm_mode_object_reference - acquire a mode object reference - * @obj: DRM mode object - * - * This is a compatibility alias for drm_mode_object_get() and should not be - * used by new code. - */ -static inline void drm_mode_object_reference(struct drm_mode_object *obj) -{ - drm_mode_object_get(obj); -} - -/** - * drm_mode_object_unreference - release a mode object reference - * @obj: DRM mode object - * - * This is a compatibility alias for drm_mode_object_put() and should not be - * used by new code. - */ -static inline void drm_mode_object_unreference(struct drm_mode_object *obj) -{ - drm_mode_object_put(obj); -} - int drm_object_property_set_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t val); diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci index 91fceb8..ceb71ea 100644 --- a/scripts/coccinelle/api/drm-get-put.cocci +++ b/scripts/coccinelle/api/drm-get-put.cocci @@ -16,12 +16,6 @@ expression object; @@ ( -- drm_mode_object_reference(object) -+ drm_mode_object_get(object) -| -- drm_mode_object_unreference(object) -+ drm_mode_object_put(object) -| - drm_connector_reference(object) + drm_connector_get(object) | @@ -62,10 +56,6 @@ position p; @@ ( -drm_mode_object_unreference@p(object) -| -drm_mode_object_reference@p(object) -| drm_connector_unreference@p(object) | drm_connector_reference@p(object)