From patchwork Thu Sep 21 21:04:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 9965279 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 7B7546057D for ; Fri, 22 Sep 2017 07:33:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D0462970F for ; Fri, 22 Sep 2017 07:33:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61E1E2979C; Fri, 22 Sep 2017 07:33:10 +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 B9A632979B for ; Fri, 22 Sep 2017 07:33:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0338089FEC; Fri, 22 Sep 2017 07:32:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id B33546E8F5 for ; Thu, 21 Sep 2017 21:04:28 +0000 (UTC) Received: by mail-pf0-x243.google.com with SMTP id f84so2927548pfj.3 for ; Thu, 21 Sep 2017 14:04:28 -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=paAJu7qPCVg7+ZRN77+QN8WjlHpYarWtO1oaPFDXrrc=; b=fevCpFesFH7OTWu+7HOWQwZK7w2ml2JY/cHRHaZjIvy1npCy4pmGBCOuDK52AHLwcZ ptSfgrO6eUeNpJFuTpLuokt6UhetMwHwT7Js+33vcQsg9J1xek+RdA+1m8QJUQHMsWHd KZYxCIG0Phtb6EohjpioxtfmQxcGhxfhuPO6srNOXGTYD6ekqgBg74ZzcdBbhUAbx181 ofpRzMrcT7AVx/QA2HW62JeXvf+hzy1jLVFqytjnUrNBleoxY1Gg25z0Ur8H5Oqx7/LZ /NkuTzL9t3+2SuV98DIGpcy7Gs+1KM4l9qwqmrWPvNJnGReY86RbQNgPUgsqyOqnmecH mmIQ== 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=paAJu7qPCVg7+ZRN77+QN8WjlHpYarWtO1oaPFDXrrc=; b=C/TznaMsg+fTxR6C1Trf5B3njHIgdO3S+58QlVl7ZGQavpNkrZs6IExaejR3952h2c evJa4+YtCkEXxiCIW+/szCYomzmsMB4pz075Cj6OnNEIDWMDZI0q+xha3PtcO9o32Cxe U0X1f0CYd/qNfDzFPynzHhmQQRINrrlBKSnjUwWp9J0adojWQAKFGQedpbAheHT6vjZX VxAp10jvFrp9Vh5aQ21PoaOh1pMJ4VfaBucq82W8jzP4ZKp5cUtBcMpkB4YNht2hEkrR gpH51ozEyuptFy0ufRP2PtVWK9W4Ex9G/+Kt7CfRFnU8rC1shfGkOGZPqhOY4Rrr57gV X3vw== X-Gm-Message-State: AHPjjUjNfxRtnfJDvCiIY3nPkwXXWkbO3xYeljP4NbwhAeDcuTSxEG8c GpnVUqM1TAWFSaqfxe+5lyU= X-Google-Smtp-Source: AOwi7QDmb/9gH9PO7lzBZ+UBpEG4C1mG9B2p/dCMg+NngE/+55UJF6mgD6AnooVfEPZazPFC/EpuzA== X-Received: by 10.84.216.87 with SMTP id f23mr6729720plj.307.1506027868108; Thu, 21 Sep 2017 14:04:28 -0700 (PDT) Received: from Haneen ([64.77.242.50]) by smtp.gmail.com with ESMTPSA id z5sm4599007pfi.38.2017.09.21.14.04.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 14:04:27 -0700 (PDT) Date: Thu, 21 Sep 2017 15:04:24 -0600 From: Haneen Mohammed To: outreachy-kernel Subject: [RESEND PATCH] drm: Remove obsolete "This is gross" comment Message-ID: <20170921210424.GA21951@Haneen> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Fri, 22 Sep 2017 07:32:36 +0000 Cc: gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove obsolete comment which was initially added in 2008 to annotate that idr_find() was used before idr_remove() since idr_remove() didn't use to return feedback. The comment now is irrelevant with commit f6cd7daecff5 ("drm: Release driver references to handle before making it available again"). Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/drm_gem.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index c55f338..b9bddaa 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -282,15 +282,6 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle) { struct drm_gem_object *obj; - /* This is gross. The idr system doesn't let us try a delete and - * return an error code. It just spews if you fail at deleting. - * So, we have to grab a lock around finding the object and then - * doing the delete on it and dropping the refcount, or the user - * could race us to double-decrement the refcount and cause a - * use-after-free later. Given the frequency of our handle lookups, - * we may want to use ida for number allocation and a hash table - * for the pointers, anyway. - */ spin_lock(&filp->table_lock); /* Check if we currently have a reference on the object */