From patchwork Fri Nov 6 07:03:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 320776 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp1080151ilc; Thu, 5 Nov 2020 23:05:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEdoVT0Ed8wnE8uRqd3ztLfeIZgfH2UYCKutUK7VLo6HUpYmrb4VyjZgQhANGmD5Q61l1B X-Received: by 2002:a17:906:6896:: with SMTP id n22mr757858ejr.56.1604646337444; Thu, 05 Nov 2020 23:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604646337; cv=none; d=google.com; s=arc-20160816; b=XQOdbczvmy89DYScjPPUKXey+aPitxzY54y+M1rxDvsjLXqAewTjNHhuFh5maLgkxT 9cUGPDf7VzRlhJETUmOZRPSEbux13s8lB9R+Y0FtGt4TsyqFRsOWzF9wBhHmq+VsPYmS 1J2Y1UoZvJOkwFQ8O68C3jFSnIZW+/jST4S7QKfwBqKfAt1kJuUSkITP5ModbJ0v3CRt 2xgXko2h2sUaU5YBaCVhGEmj8GU9kRTpCLfNkqQROCBE9DQQ/p60orN8xuoLRpEkbLod HDKEil+zo7RYY0TJJBwJY6YHVAPjOrEnx9uIgvBMMzoozRdTNV1UOyLKWDP438SWlIRk 3Xnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ehPUCc4BBH4w6xwbXHXZ9YzZ1LHDSwHspwqvBRHLfG8=; b=zXyde5ofP7iqoMjZQ2tYmw2I110rrk5Qwdf/0iontqhdwdlB1DhiaOR9Ey1SXwDj91 OXk3AvQDq/FMc0W7bOxlyxeu2ZS1EP84SQ/8cUrFncIF4W7xFPB4YzjE+JjKrDIPyoh7 44A67NXh4AWUpkVx2fazU6GnPRVKr2XltdQCYjzSdfS7ik2TF/fzKGCfBqpjG2xIk3nv rRzQFTzavdIQkhHemK5w7to/+K34OIpptuSrngrteh4rKm266SD/vZ26h5NwEurKR2ZR vhpuyc09VJsWjOecZA3niCRXEaJLUNMkwGMTon/NOZd9KqLF6oOah/y7L4rIYJaoibW/ Ea6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o5Zr52H5; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si228526ejd.476.2020.11.05.23.05.37; Thu, 05 Nov 2020 23:05:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o5Zr52H5; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbgKFHFf (ORCPT + 9 others); Fri, 6 Nov 2020 02:05:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbgKFHFe (ORCPT ); Fri, 6 Nov 2020 02:05:34 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63246C0613D2 for ; Thu, 5 Nov 2020 23:05:34 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id u4so221993pgr.9 for ; Thu, 05 Nov 2020 23:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ehPUCc4BBH4w6xwbXHXZ9YzZ1LHDSwHspwqvBRHLfG8=; b=o5Zr52H5GnqwIwaEUT6XGHpZ+Rk+X0IvKQ47cS0hprikNcIhQd95tQWJJ9xoEnMC6a qq0CgW4B20Qmt6WOLolyORfkDV888lAdzgcGn74AVqm+Knjd7N42MMbPeXXOyU1tL0J4 7GWqIJq+ACgU+jrTV5fuw+yggsYOAd9L/MAjYtgC1nzSfvtVI2U9LNiyJN2qZeqPGwJT kTg9vCMFltVucT2XqAblwjqtX1+OttYzVhENqzJfjyUNCk5Q0u9WKxarQa1qqwrWbPQC AB8UTDeC1bGUO/Eya7Tey2URIlSqyJuMquf4COHmuHqW+TX8lkHBRXwAhDKO1VIf9w9g W0UA== 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=ehPUCc4BBH4w6xwbXHXZ9YzZ1LHDSwHspwqvBRHLfG8=; b=BKKtHiICIDzjgQ8N3Tyyqk8PWlcWlFweT6vuyA1YtWKu/e7ZKlNLZNlrzNlnFumSP9 DJQOp8tzU5mnS1TW03fTEojNpWep531jhwQwx1vlR4KoccdsfPytusvRemzqsdMShB7R nO9Qa0kyUVmSf6ZhEMCGk4duMjiJIm1xjz9nBchHQrAkLxHvTph0fOwfErtqcKSKfOlz kqC5yAHO+gKXAx1MhfjQ8fveC84gg0m5JcqK/APkxskEEu0mOBmEZZ/A4P8NP4PWKS38 ix8luWEp8Z6GWzWGfn0sukEXTdMy8UCXewCCOugZ4JzxObPWTpvZEoIyVjmVkhw/sdYp 4wPA== X-Gm-Message-State: AOAM530DnBLFPPclN4St9lwgPExG0X8W82PZqd+CvQbHRr0wNgjeJ4SA Jp2cXK/dA/JXufLHD7koYlgyKA== X-Received: by 2002:a63:1212:: with SMTP id h18mr621177pgl.196.1604646333997; Thu, 05 Nov 2020 23:05:33 -0800 (PST) Received: from localhost ([122.172.12.172]) by smtp.gmail.com with ESMTPSA id m6sm793084pfa.61.2020.11.05.23.05.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2020 23:05:33 -0800 (PST) From: Viresh Kumar To: Qiang Yu , David Airlie , Daniel Vetter Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , Stephen Boyd , Nishanth Menon , digetx@gmail.com, dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] drm/lima: dev_pm_opp_put_*() accepts NULL argument Date: Fri, 6 Nov 2020 12:33:25 +0530 Message-Id: <2518c14df2f16cc3c4fee35499895a32513c174b.1604646059.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so there is no need for us to carry the extra check. Drop them. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/lima/lima_devfreq.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af Reviewed-by: Qiang Yu diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index bbe02817721b..e7b7b8dfd792 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.c +++ b/drivers/gpu/drm/lima/lima_devfreq.c @@ -110,15 +110,10 @@ void lima_devfreq_fini(struct lima_device *ldev) devfreq->opp_of_table_added = false; } - if (devfreq->regulators_opp_table) { - dev_pm_opp_put_regulators(devfreq->regulators_opp_table); - devfreq->regulators_opp_table = NULL; - } - - if (devfreq->clkname_opp_table) { - dev_pm_opp_put_clkname(devfreq->clkname_opp_table); - devfreq->clkname_opp_table = NULL; - } + dev_pm_opp_put_regulators(devfreq->regulators_opp_table); + dev_pm_opp_put_clkname(devfreq->clkname_opp_table); + devfreq->regulators_opp_table = NULL; + devfreq->clkname_opp_table = NULL; } int lima_devfreq_init(struct lima_device *ldev)