From patchwork Mon Oct 29 16:23:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 149682 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp4348336ljp; Mon, 29 Oct 2018 09:23:41 -0700 (PDT) X-Google-Smtp-Source: AJdET5dhQp30cZTMMsk27hSXVB+HyjAFPhX4ZUYOMPxTfZdhEWTZuN63kl2FbDSxqTrpfyKMDxKh X-Received: by 2002:a17:902:bb0d:: with SMTP id l13-v6mr9308361pls.202.1540830220868; Mon, 29 Oct 2018 09:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540830220; cv=none; d=google.com; s=arc-20160816; b=J2MGZqt+wvoltldZcoA/ZvXs5i+G8FaLq5UM90A8A3pHD6u8Bnz30r/f1Mq6G6EnKW aE9EB5GRPoQI8by9wapNZFvgqnXj2ieTpae/+noDxz20w1qytU5nx9qdDkfeYJatScK9 nov8f+pdafu6aLXrGUwb4ZX2Xx/90TgC/615LllI9ukwm/UmUKT0K8p56pSVnQyuB2R+ 81mZQGcbTXVXs51uLrNGw4IxUgAGxqvx3Jva0O2BraBCex8wy7/tE2lr0hkwAfJLXXjy qNUQl/dv19ZdfQUipPVyKWiNhtIyXTsjv9zuHVRV7GcnlC0ax2IZgjPqEouzQwPKimJ3 X4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=5ufvLgLeByEO3l1UMVwBEPg+2O2CRJCS4nN3+quaAgs=; b=c5/EsMgjHd6FKQJyXVJctml/F67kADA3m5QhLftGSDHCs+7upB4/8XFnaeIigB729Y t0L41hHhIhltWyi7xyAHb0FX9dP8opH/DonWYoauynO0mX7oKveQfPFZtAeG0cfeXowX waKZgkJ8gbW+2KivKwGvgWkxipDM3v51GH0UmNHrwqaOxMBtulGtHhyPDC3VkgQndCHO yyeDnewI72+uEcDx9kKsMessCzyqmFf2VqiGyqVEYFUS6fgIzRRPZ4XvrFmlePe+z724 JPBPRQezfS/YjhKPvR9WM1bDMIoJfVO3sT81/raOUBZC8QODCjrQnnaXNwv0mNoHi7D0 fvlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bWAxYNMg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si1234318pla.245.2018.10.29.09.23.40; Mon, 29 Oct 2018 09:23:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bWAxYNMg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1728090AbeJ3BM4 (ORCPT + 32 others); Mon, 29 Oct 2018 21:12:56 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39156 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727565AbeJ3BMz (ORCPT ); Mon, 29 Oct 2018 21:12:55 -0400 Received: by mail-wr1-f68.google.com with SMTP id r10-v6so9381597wrv.6 for ; Mon, 29 Oct 2018 09:23:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5ufvLgLeByEO3l1UMVwBEPg+2O2CRJCS4nN3+quaAgs=; b=bWAxYNMgwh3WOp4jxA+QzoPwtxiZJBrZk0mz4ubZnGzLvRsRMwWfraYDmuCHwo2k9E 4+Eumo/hsz3pbTdQEzdWNoNAOY3y+xu9Wzs1W2G0T6zUJ1+w2LN11cpvcSEunEE6WpAa hyGGJY+n/3ZzEN0H+4avT6F4PWq5n6sfj9IUg= 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; bh=5ufvLgLeByEO3l1UMVwBEPg+2O2CRJCS4nN3+quaAgs=; b=CP6zz0Ymsw9fmQUm0YJskfnplsXenCst0/55FgS9XvN3TNPs7mEv2anIWDyOWpVB39 5YLEAW5QslhNA5mIdeUCDhlzaLqq+FRkZPgJ+MDwd8V2/Mnd6eW+S++051bXMtmZf9dg WHHdOxB/iV9gXwHDQ5OC9N2k88Q42R+2nW85CnphDPbNZW9HMTdhk9x544bsmKfVuVxf KUMLi6B2S+joOEqXEwsnWVnB1NQ1LyqG45mfuIEVjImZjOSyAHQSA6S1Lx/3ElTcM/2G LMO0cZql0AO2+jvynpw5fcGiqgIU0+vpJZ6ngYsz94Hd5vp+4b5DDkRFYaPWeh4NAfb1 iHtg== X-Gm-Message-State: AGRZ1gKAl27dW+QEs5Me9/AZ+fVz2Fdaqxs9tFV8BrKZJhTPpwcCqip9 CIj7d0uJ5vRhn/ZNhkKJj8uGTa+4poM= X-Received: by 2002:a5d:4609:: with SMTP id t9-v6mr3508033wrq.198.1540830216438; Mon, 29 Oct 2018 09:23:36 -0700 (PDT) Received: from localhost.localdomain (137.55.88.92.rev.sfr.net. [92.88.55.137]) by smtp.gmail.com with ESMTPSA id y19-v6sm28150499wra.60.2018.10.29.09.23.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Oct 2018 09:23:35 -0700 (PDT) From: Daniel Lezcano To: rjw@rjwysocki.net Cc: vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 1/4] base/drivers/arch_topology: Remove useless check Date: Mon, 29 Oct 2018 17:23:17 +0100 Message-Id: <1540830201-2947-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function 'register_cpufreq_notifier' registers the init_cpu_capacity_notifier() only if raw_capacity is not NULL. Hence init_cpu_capacity_notifier() can not be called with raw_capacity set to NULL, it is pointless to check it. Remove the check. Signed-off-by: Daniel Lezcano --- drivers/base/arch_topology.c | 3 --- 1 file changed, 3 deletions(-) -- 2.7.4 diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index e7cb0c6..204ed10 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -181,9 +181,6 @@ init_cpu_capacity_callback(struct notifier_block *nb, struct cpufreq_policy *policy = data; int cpu; - if (!raw_capacity) - return 0; - if (val != CPUFREQ_NOTIFY) return 0;