From patchwork Thu May 7 15:08:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 11534287 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6D4F139A for ; Thu, 7 May 2020 15:11:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 951F12073A for ; Thu, 7 May 2020 15:11:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E+uZB8Bw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 951F12073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DC416EA19; Thu, 7 May 2020 15:11:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by gabe.freedesktop.org (Postfix) with ESMTPS id 692996EA19 for ; Thu, 7 May 2020 15:11:37 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id z6so7251684wml.2 for ; Thu, 07 May 2020 08:11:37 -0700 (PDT) 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=aen5FWFPyQJCvyQUSIS41OAgv9vVWFBBpjB/BMydBlU=; b=E+uZB8BwKgOM2hjQrhAlAZ/lAnh5woZJ3NaCXXi8jguCwAx3cKqxaiv7dnSzf20g39 qlwSPr0AjFi4igSa1RGPO0e0IhaT4Og0RY/YIO7s7RtrYV/q4UXil86b/KRAa0PGC/mL RLZYwzZVjriIXipK6Isq8LJNE52DxME/ZGAhUmXOSkBnt1op/tBq/uL0Qyi0NjhvQRkW 0a16OH0lqRGurad3LPfM9nrwpO4/dcA4HeDmv2b5cbonHxq5aEvVmbwiaUgVB2ga0sj5 8sGdqFyM/qO9yrnlmKtEJh+YAm5Klc5K3/+bBtMP6KvIz6OegAnaanCrv5MrxFW/IQic E1kg== 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=aen5FWFPyQJCvyQUSIS41OAgv9vVWFBBpjB/BMydBlU=; b=H2RAdYhixAph/555JAieHULMrslhipiGu/4/5czMFJwnTAwduSMEXzZ1XdsCfp6wxJ Z/bx0S3Qej6E5qhfigdaF01c452gAXhMT5tm95UylKVISGzfjxu1U+Gk0sPHgnIIJCFl e9EEkWDzBxU4SQ6GSKXD/wtzSGTnUChvCNUlsHO1l0JJMEVEkkDrV0Yy5VzAuJpRPkGT ePm0+wPWeivP2BLPDAH8QHUx76gxZp+lQqGasZd8bvJXac3SiOpYVmYSaz7EkBAIDGEe 5fyIBh1IzGUgtlwNswJ3MMpNpWRIvj1B8sF5Z9a1dFMEPQ8Iy9aZXLgc5vi1pWcw1hHa 7yGg== X-Gm-Message-State: AGi0PuYwK8c3OsJD9n+o48TML4R8rxyDgqbnFtBc23tkIt2LBdkZ3DB5 9cx36sP+PsYekqgGoQNA9FmTMqmo X-Google-Smtp-Source: APiQypKUmCDqoUigquPhoVWY+tlV6fzkgo6hoLoPQbQQTNAXnYRPgbAoPNt5ftqSMEtRWQzKXKWDkA== X-Received: by 2002:a05:600c:2945:: with SMTP id n5mr10738472wmd.148.1588864295425; Thu, 07 May 2020 08:11:35 -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 b66sm8704247wmh.12.2020.05.07.08.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 08:11:34 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 32/36] drm/vgem: remove _unlocked suffix in drm_object_put_unlocked Date: Thu, 7 May 2020 16:08:18 +0100 Message-Id: <20200507150822.114464-33-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507150822.114464-1-emil.l.velikov@gmail.com> References: <20200507150822.114464-1-emil.l.velikov@gmail.com> MIME-Version: 1.0 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: David Airlie , emil.l.velikov@gmail.com, Emil Velikov Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Emil Velikov Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: David Airlie Cc: Daniel Vetter Cc: Emil Velikov Signed-off-by: Emil Velikov --- drivers/gpu/drm/vgem/vgem_drv.c | 6 +++--- drivers/gpu/drm/vgem/vgem_fence.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index ec1a8ebb6f1b..e4dc7b267a0b 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -198,7 +198,7 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev, ret = drm_gem_handle_create(file, &obj->base, handle); if (ret) { - drm_gem_object_put_unlocked(&obj->base); + drm_gem_object_put(&obj->base); return ERR_PTR(ret); } @@ -223,7 +223,7 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, args->size = gem_object->size; args->pitch = pitch; - drm_gem_object_put_unlocked(gem_object); + drm_gem_object_put(gem_object); DRM_DEBUG("Created object of size %llu\n", args->size); @@ -251,7 +251,7 @@ static int vgem_gem_dumb_map(struct drm_file *file, struct drm_device *dev, *offset = drm_vma_node_offset_addr(&obj->vma_node); unref: - drm_gem_object_put_unlocked(obj); + drm_gem_object_put(obj); return ret; } diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c index 9268f6fc3f66..17f32f550dd9 100644 --- a/drivers/gpu/drm/vgem/vgem_fence.c +++ b/drivers/gpu/drm/vgem/vgem_fence.c @@ -182,7 +182,7 @@ int vgem_fence_attach_ioctl(struct drm_device *dev, dma_fence_put(fence); } err: - drm_gem_object_put_unlocked(obj); + drm_gem_object_put(obj); return ret; }