From patchwork Mon Jun 10 10:57:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 17716 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 488972397B for ; Mon, 10 Jun 2013 10:59:49 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id hu16sf4184132qab.0 for ; Mon, 10 Jun 2013 03:59:49 -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=zJZp8cUHUpfZxWxTZ6jBpE8KSdVJ1bYRbGPVGN/jXNM=; b=Rrx2VbRQ8WLeB9czR3Kn5wDAvHlxkhD5xokXQWL+EwcGcRZE3nkSlwHPc8Pf2IPcFI Q760G5n9R4zSHn2pDx6YZE96zw4IzSM7Imz1D8+4nAn8BZmlhR+AzLj7NRrGEe7jPBrm SEvOZ5E1RO/MJKyGZHcA9+2287HlqUmDhGswJi2CfNpe+lVrC1oJfd/Gr1vubwS90mda 0OAmgUeiAe2GVbx1Kjzkj08aW3Myb4UAJO88DrztisorTCkCrcUAh8TAZzQxlcg1mCfn jq+QuOIjdHJXRobmKzoT1sq7cIoXz0APj7VCFlA/aE90rQa2/jUgARZ206wzFvyP4Mnc eidQ== X-Received: by 10.224.59.205 with SMTP id m13mr8216355qah.7.1370861989023; Mon, 10 Jun 2013 03:59:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.210 with SMTP id x18ls2483772qeu.85.gmail; Mon, 10 Jun 2013 03:59:48 -0700 (PDT) X-Received: by 10.52.174.225 with SMTP id bv1mr4395323vdc.86.1370861988798; Mon, 10 Jun 2013 03:59:48 -0700 (PDT) Received: from mail-vb0-x229.google.com (mail-vb0-x229.google.com [2607:f8b0:400c:c02::229]) by mx.google.com with ESMTPS id zp6si4622660vdb.132.2013.06.10.03.59.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 03:59:48 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::229; Received: by mail-vb0-f41.google.com with SMTP id p13so2900740vbe.14 for ; Mon, 10 Jun 2013 03:59:48 -0700 (PDT) X-Received: by 10.52.170.148 with SMTP id am20mr4424029vdc.75.1370861988675; Mon, 10 Jun 2013 03:59:48 -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 pb14csp63422vcb; Mon, 10 Jun 2013 03:59:48 -0700 (PDT) X-Received: by 10.66.233.9 with SMTP id ts9mr13679368pac.15.1370861987637; Mon, 10 Jun 2013 03:59:47 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id ql7si4610359pbc.86.2013.06.10.03.59.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 03:59:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id v14so3395662pde.4 for ; Mon, 10 Jun 2013 03:59:47 -0700 (PDT) X-Received: by 10.66.50.4 with SMTP id y4mr13669672pan.216.1370861987248; Mon, 10 Jun 2013 03:59:47 -0700 (PDT) Received: from localhost ([223.228.11.221]) by mx.google.com with ESMTPSA id vu5sm3870537pab.10.2013.06.10.03.59.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Jun 2013 03:59:46 -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 2/3] sched: don't sd->child to NULL when it is already NULL Date: Mon, 10 Jun 2013 16:27:19 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkEYg/gTOz1b+jKY1DzRNOvs8ObnuC/7X6eSYnF0/YpGO9n+jBgLy+kngHcRXCQRvuwhYYm X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::229 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: , Memory for sd is allocated with kzalloc_node() which will initialize its fields with zero. In build_sched_domain() we are setting sd->child to child even if child is NULL, which isn't required. Lets do it only if child isn't NULL. 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 5faa748..a12113d 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5942,8 +5942,8 @@ struct sched_domain *build_sched_domain(struct sched_domain_topology_level *tl, sd->level = child->level + 1; sched_domain_level_max = max(sched_domain_level_max, sd->level); child->parent = sd; + sd->child = child; } - sd->child = child; set_domain_attribute(sd, attr); return sd;