Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4810583imd; Tue, 30 Oct 2018 07:46:32 -0700 (PDT) X-Google-Smtp-Source: AJdET5cdSH5zsCutwTOcnGKpDQXuweokEmpKXMRbBTuRHY8Dl/fyiJH+jsrPcGvfYcOItfVObTkm X-Received: by 2002:a63:e918:: with SMTP id i24-v6mr18211455pgh.64.1540910792615; Tue, 30 Oct 2018 07:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540910792; cv=none; d=google.com; s=arc-20160816; b=B9Y5sj9dpTyhIrkR1c3ME9j6tcbc7Y7cttbWAhTWOJTK5hl4a0iiy1L/jDPHnerByI RC7MmmlfjH5kqGLTOC2kewhwfdAnKqkAMbr+kwKdrMRPR1FgPGIUQLqP4vYqY+Vu1lom rOx509aKG4gdi4UUKUlJ8vBjsx+UoKaf0w2V3/m4cs7nBuMw6z+4JcrjRmJBWJOlO5cT bHVmnffomKJfM/pzQ7fQA6GEF3vIT5w23zzwxpV+lS1ydRoNJAKLhRJGR0C3TZWVPNnE hL/NfagyUUx6FqtiUc+SuGIvBshVdcCax2PQP28HWi7cTJRaI+kB/rxRRCrH1ByxPNCy TVIg== 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=pjgxNZM2WE2d3ONPl/GeCY4/NIOvaMxXAvrJVd5+Azk=; b=rHlMQ5P4hTjVHbDb+5mEqpcPGOPbg6FVwPFl0P1zZYc8ggaHU8xoacci7gWLwzigGs Ta+Ug9eFDIzbgiYEHJXvCGK6llGJ3Z7TjL/dFTjtdIQMTfT6Jeuz4olf9z2aeEYD5jD0 uiYLf0QO4/DVWk3Sk6fZjTTyrjyK8rkUm0WWIPWX66hUZrc5T+h8Fj/fAOaW5wMr0+cZ atqmRBQZ4laRiwVBBC9ohX9+JJmJB9b/1lIvLHOR+ntxKZlYYU4FpjBBOe0WWFsq0ltH 4u9HJrj0n40F1P//hk6JmaP2Z/3pDGg3JLZK8CPJzauKqv2ep7Uj57L6T/+Bqbg4USTV gk3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VyTfcAQF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si7958719pfd.281.2018.10.30.07.46.17; Tue, 30 Oct 2018 07:46:32 -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=@gmail.com header.s=20161025 header.b=VyTfcAQF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726761AbeJ3Xjd (ORCPT + 99 others); Tue, 30 Oct 2018 19:39:33 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45544 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbeJ3Xjd (ORCPT ); Tue, 30 Oct 2018 19:39:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id v5-v6so1044452pfm.12 for ; Tue, 30 Oct 2018 07:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=pjgxNZM2WE2d3ONPl/GeCY4/NIOvaMxXAvrJVd5+Azk=; b=VyTfcAQFCkWEDRFn7l+mv4oQuBveV6lGiicpiPrF8IeCJw+QimVLTyPTEyiggibU3t 4qUXqGqc39ypFtbUZNy+0H+yTEkEM0I8tS909IlcK4UcLdA7u4MRDgdtZIoV91x3nUA9 l8imL2j3CIYQ18Qcfvaxu2/unCDtXQgAfAd36EpP2caoWY2Cffos4RydRYe8LlhgZeYp bCzIE8PkDhOlo0tq7CoECQbZdQOJ655KlhCNL9Zn9jjV7F/RIt//L7+13M+IDLG3DKmh BcBeSDQ1slJow61BXnzNlBNqf8DyJsRXZXlXIjhoBNASDC9Ez9CognvxFCG9Ro/xgqTZ Cdeg== 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=pjgxNZM2WE2d3ONPl/GeCY4/NIOvaMxXAvrJVd5+Azk=; b=JjZUFjIPjYig6iUw8snxbCy20X3CutRsqCGeTyy+acO+sRkIUIxc/B6172/CbuOwZh kGOMuantEIAuOfAhV9fhMPohQMlE0sBIwWNuHrvFWevGs49FOZv5P8htDjdkcFnMQDzC Wa3DtrDx+o5dIrC9dEOg5dLJIwyn/ztxLeh4TANFz5S+vc/eONQc/+4OsYiogKPxDs2p iGJDvHq/wlvod2C3FO0KUWhTsNjAWselk0MheN+byNln1qowXblIyIc6Sp5AsGMhqGxd mICesPJE+Bg1Uybu+WnbklHOwFf4j+Jkf69ttusB4xZ3X3hIHk7St24uf6GiBIFYL2fg 37lg== X-Gm-Message-State: AGRZ1gJQy3iCBPnm4SPn0voq8UWi1IHzsvaskXu9TQXj5EVSYnIL4U73 frWcPsvQ0n7PDPj+WY+arpk= X-Received: by 2002:a63:1157:: with SMTP id 23mr18446603pgr.245.1540910747742; Tue, 30 Oct 2018 07:45:47 -0700 (PDT) Received: from localhost.localdomain ([104.238.150.158]) by smtp.gmail.com with ESMTPSA id q2-v6sm26055490pgk.4.2018.10.30.07.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 07:45:46 -0700 (PDT) From: Muchun Song To: mingo@kernel.org, peterz@infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] sched/rt: Remove unnecessary CONFIG_RT_GROUP_SCHED in rt_se_prio() Date: Tue, 30 Oct 2018 22:45:30 +0800 Message-Id: <20181030144530.89995-1-smuchun@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_RT_GROUP_SCHED is not configured, group_rt_rq() will return NULL. With this patch applied, we also can get the same result. Because the compiler will help us optimize the code. So, we can remove unnecessary CONFIG_RT_GROUP_SCHED in rt_se_prio(). Signed-off-by: Muchun Song --- kernel/sched/rt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index a21ea6021929..47b4800761db 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -894,12 +894,10 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) static inline int rt_se_prio(struct sched_rt_entity *rt_se) { -#ifdef CONFIG_RT_GROUP_SCHED struct rt_rq *rt_rq = group_rt_rq(rt_se); if (rt_rq) return rt_rq->highest_prio.curr; -#endif return rt_task_of(rt_se)->prio; } -- 2.17.1