From patchwork Tue Sep 15 10:56:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 53633 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id E161222A22 for ; Tue, 15 Sep 2015 10:57:10 +0000 (UTC) Received: by lagj9 with SMTP id j9sf62389515lag.0 for ; Tue, 15 Sep 2015 03:57:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=j/1+qL/xw2nx1xHyrBTkpFJs5ExF2gqNsr/2GV5A79M=; b=NXDU0ePAEndp9NAf9rb6qz5ctNE2AenESvLZ6gIRcnVrIYhBaUcBz0+k1CYZPg3XSA A/x5Yx8K8MKGVaWQhBqMj44ezXj9CLtlyI9aJg9bQba61ZoEtnwpTqhbU//3lwmWhcpO C+WP2ds56qNTjo0JDsHeuQVfBYm0oIG/sLtUJ4vWakR5Ror/4fC/f1a5dnD+elBSLQxN kc+SMFWsk/HtCpmFkS9kCaqCKYRTOsEunyz2V4GZojYdaS7U4NPEAQjTrKuXJUR1FVAh EFOskjGPj6XF221tr8610Fp87wxP0dqc1w238bpQEa8QoMgpNzTzmI63pBRC8suITrSD e8OA== X-Gm-Message-State: ALoCoQknV4bhXa2aaRtgoMo9ABCTT2wwoDSkMNox9jSt4+rH2UABAyffH5p8+bcF+eExzV0bD01M X-Received: by 10.180.10.202 with SMTP id k10mr652621wib.2.1442314629977; Tue, 15 Sep 2015 03:57:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.138 with SMTP id s10ls694805las.25.gmail; Tue, 15 Sep 2015 03:57:09 -0700 (PDT) X-Received: by 10.112.16.67 with SMTP id e3mr19900283lbd.5.1442314629783; Tue, 15 Sep 2015 03:57:09 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id x3si11790599lbo.14.2015.09.15.03.57.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 03:57:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lagj9 with SMTP id j9so106165868lag.2 for ; Tue, 15 Sep 2015 03:57:09 -0700 (PDT) X-Received: by 10.112.72.97 with SMTP id c1mr19926101lbv.86.1442314629665; Tue, 15 Sep 2015 03:57:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1720336lbq; Tue, 15 Sep 2015 03:57:08 -0700 (PDT) X-Received: by 10.66.252.131 with SMTP id zs3mr45364077pac.75.1442314628662; Tue, 15 Sep 2015 03:57:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz1si30975965pbc.112.2015.09.15.03.57.06; Tue, 15 Sep 2015 03:57:08 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752076AbbIOK5E (ORCPT + 29 others); Tue, 15 Sep 2015 06:57:04 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:35837 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbIOK5D (ORCPT ); Tue, 15 Sep 2015 06:57:03 -0400 Received: by wicge5 with SMTP id ge5so23071918wic.0 for ; Tue, 15 Sep 2015 03:57:01 -0700 (PDT) X-Received: by 10.194.9.42 with SMTP id w10mr6211918wja.146.1442314621429; Tue, 15 Sep 2015 03:57:01 -0700 (PDT) Received: from localhost.localdomain ([78.110.172.67]) by smtp.gmail.com with ESMTPSA id sd14sm20426881wjb.36.2015.09.15.03.56.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 03:57:00 -0700 (PDT) From: Leo Yan To: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH] sched/fair: Remove unnecessary parameter for group_classify Date: Tue, 15 Sep 2015 18:56:45 +0800 Message-Id: <1442314605-14838-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leo.yan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Function group_classify() has not used parameter "env", so remove it. And unify code to always use group_classify() to calculate group's load type. Signed-off-by: Leo Yan --- kernel/sched/fair.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b716e23..66a6c12 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6229,9 +6229,9 @@ group_is_overloaded(struct lb_env *env, struct sg_lb_stats *sgs) return false; } -static enum group_type group_classify(struct lb_env *env, - struct sched_group *group, - struct sg_lb_stats *sgs) +static inline enum +group_type group_classify(struct sched_group *group, + struct sg_lb_stats *sgs) { if (sgs->group_no_capacity) return group_overloaded; @@ -6296,7 +6296,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, sgs->group_weight = group->group_weight; sgs->group_no_capacity = group_is_overloaded(env, sgs); - sgs->group_type = group_classify(env, group, sgs); + sgs->group_type = group_classify(group, sgs); } /** @@ -6430,7 +6430,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd group_has_capacity(env, &sds->local_stat) && (sgs->sum_nr_running > 1)) { sgs->group_no_capacity = 1; - sgs->group_type = group_overloaded; + sgs->group_type = group_classify(sg, sgs); } if (update_sd_pick_busiest(env, sds, sg, sgs)) {