From patchwork Wed Oct 31 14:44:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10662823 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 C250713A4 for ; Wed, 31 Oct 2018 14:44:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD1FC294EA for ; Wed, 31 Oct 2018 14:44:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D250295EB; Wed, 31 Oct 2018 14:44: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 A743C294EA for ; Wed, 31 Oct 2018 14:44:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44EA089A9B; Wed, 31 Oct 2018 14:44:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by gabe.freedesktop.org (Postfix) with ESMTPS id 42DFF89A9B for ; Wed, 31 Oct 2018 14:44:51 +0000 (UTC) Received: by mail-qk1-x742.google.com with SMTP id a132so9870623qkg.1 for ; Wed, 31 Oct 2018 07:44:51 -0700 (PDT) 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=DzQ95udb3n4k7li4ukgA9aHDB5NmQ3yb/l+IWXqV4/8=; b=nuRHOkNje+rS0VRB45sHAZc7XE8zgs3KlONje+s52LOYFPwOMPnGfP3gSYvBrNsVoC LmZUsqHOXGilgNzZZqZXGcM6FzHgRr+JbZsdIt8ouRBplUSmNgLPCQubsSzLV3JiPKUB /7swLB4b+lv6XdoE9GuaTjLpxnglnchu5XdlnLc7HmyH7/bNBB0x6sTF4Wz97I2A1gRu Ppt5SYsqH2/tqG7dVQP16fO8h2oDRNqGAgmvLUaK3j9HEp9GcIXMtWCKcFhRpqbO3aCQ xETu/iQ3Wao/ClqZK5kGKUmidhMTx5ualLfI8u91iiIKKcCqhfDUm8aFWkS9hysEvq9W q6yA== X-Gm-Message-State: AGRZ1gIZS5cW/hU8ux6v4FjNTFjE1vpVB2OMCxp8MWKJ6jxnb/exDiPL bC3wH+VpK1BB4dkI+S5i28T3SntTFE4= X-Google-Smtp-Source: AJdET5e+f6WkV7QlABVMA3NieNIicv/0KjMia2/Bxea9LdshSzoyGGFganXgtqWsOmAA8aelK8fKjw== X-Received: by 2002:aed:3024:: with SMTP id 33-v6mr2955485qte.29.1540997090322; Wed, 31 Oct 2018 07:44:50 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id j128-v6sm6298409qkd.5.2018.10.31.07.44.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Oct 2018 07:44:49 -0700 (PDT) Date: Wed, 31 Oct 2018 11:44:45 -0300 From: Shayenne da Luz Moura To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie Subject: [PATCH] drm: Remove 80-column line in drm_mode_object.c Message-ID: <20181031144445.vrdngzj3jclforta@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20171215 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: outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add a new variable to make the drm_mode_object comparison before idr_alloc and decrease line size. Signed-off-by: Shayenne da Luz Moura --- drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c index be8b754eaf60..4b9eafddb409 100644 --- a/drivers/gpu/drm/drm_mode_object.c +++ b/drivers/gpu/drm/drm_mode_object.c @@ -36,9 +36,10 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, void (*obj_free_cb)(struct kref *kref)) { int ret; + struct drm_mode_object *obj_tmp = register_obj ? obj : NULL; mutex_lock(&dev->mode_config.idr_mutex); - ret = idr_alloc(&dev->mode_config.crtc_idr, register_obj ? obj : NULL, 1, 0, GFP_KERNEL); + ret = idr_alloc(&dev->mode_config.crtc_idr, obj_tmp, 1, 0, GFP_KERNEL); if (ret >= 0) { /* * Set up the object linking under the protection of the idr