From patchwork Tue Jun 11 11:02:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 17796 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22D0C25DFB for ; Tue, 11 Jun 2013 11:06:58 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf249206vcb.6 for ; Tue, 11 Jun 2013 04:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=XrcV9NT8qhU5fKm1UORdfv5CzmJcqOy/d0E9rTjM5C4=; b=GBP/pHsB3SvjtuUpswzic3Z8VEtsNMLJoQnJuLqZ/45bhy0nzZ5TJmWWcXVymFJhrk my7+ISBkw3l3ig0qdiiLzWftZXarkWviNNCK72rLirikwUc21TzVN2NtU4FXetsHI3Rs n+NRLESfN16fHAcGF4VnXPKEL8bzbhLMx8ma/8L1HKs37842nb+TyEYdfXiiCKmp3TNi /v3MfOuWb90ac5AhLD7JVmOAG78oaDC93hmlJvmb5s7thcsie9jB27HCOeL2UF51XPTp WKbgwoQesoiFBMvGlH27qIKb7eUqhRT6CBEG/jho+69/oXKFGMTiOuxfBv5+NvR7JRUX znbw== X-Received: by 10.224.53.198 with SMTP id n6mr10714916qag.2.1370948817853; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.210 with SMTP id x18ls2977989qeu.85.gmail; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) X-Received: by 10.52.180.136 with SMTP id do8mr6642451vdc.105.1370948817564; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id zt2si6700558vdb.63.2013.06.11.04.06.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:06:57 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ha12so1736134vcb.35 for ; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) X-Received: by 10.52.53.36 with SMTP id y4mr6465648vdo.51.1370948817450; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.10.206 with SMTP id pb14csp104039vcb; Tue, 11 Jun 2013 04:06:57 -0700 (PDT) X-Received: by 10.68.244.73 with SMTP id xe9mr13301396pbc.119.1370948816645; Tue, 11 Jun 2013 04:06:56 -0700 (PDT) Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by mx.google.com with ESMTPS id tr9si6737513pbc.313.2013.06.11.04.06.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:06:56 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.169 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.169; Received: by mail-pd0-f169.google.com with SMTP id y10so8515646pdj.0 for ; Tue, 11 Jun 2013 04:06:56 -0700 (PDT) X-Received: by 10.66.145.229 with SMTP id sx5mr18295458pab.11.1370948816162; Tue, 11 Jun 2013 04:06:56 -0700 (PDT) Received: from localhost ([223.228.219.75]) by mx.google.com with ESMTPSA id iq6sm8891352pbc.1.2013.06.11.04.06.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 04:06:55 -0700 (PDT) From: Viresh Kumar To: mingo@redhat.com, peterz@infradead.org Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, robin.randhawa@arm.com, Steve.Bannister@arm.com, Liviu.Dudau@arm.com, charles.garcia-tobin@arm.com, arvind.chauhan@arm.com, Viresh Kumar Subject: [PATCH 3/3] sched: remove WARN_ON(!sd) from init_sched_groups_power() Date: Tue, 11 Jun 2013 16:32:45 +0530 Message-Id: <2bbe633cd74b431c05253a8ce61fdfd5066a531b.1370948150.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQktK02kGlD/X57insEAk5nWNUXKjJE9eTdHhoSUAsFWLJYfsf2hKA/pBUyO1B/08rMTKE6S X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , sd can't be NULL in init_sched_groups_power() and so checking it for NULL isn't useful. In case it is required, then also we need to rearrange the code a bit as we already accessed invalid pointer sd to get sg: sg = sd->groups. Signed-off-by: Viresh Kumar --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 27842f5..c949f6d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5387,7 +5387,7 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd) { struct sched_group *sg = sd->groups; - WARN_ON(!sd || !sg); + WARN_ON(!sg); do { sg->group_weight = cpumask_weight(sched_group_cpus(sg));