From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbdHPO1J (ORCPT ); Wed, 16 Aug 2017 10:27:09 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41507 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751466AbdHPO1H (ORCPT ); Wed, 16 Aug 2017 10:27:07 -0400 Date: Wed, 16 Aug 2017 07:24:54 -0700 From: tip-bot for Colin Ian King Message-ID: Cc: colin.king@canonical.com, linux-kernel@vger.kernel.org, vikas.shivappa@linux.intel.com, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, fenghua.yu@intel.com Reply-To: fenghua.yu@intel.com, mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com, vikas.shivappa@linux.intel.com, linux-kernel@vger.kernel.org, colin.king@canonical.com In-Reply-To: <20170808092859.13021-1-colin.king@canonical.com> References: <20170808092859.13021-1-colin.king@canonical.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/cache] x86/intel_rdt: Remove redundant ternary operator on return Git-Commit-ID: 5707b46a4206be2068444eb6b514a1ee070651c8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5707b46a4206be2068444eb6b514a1ee070651c8 Gitweb: http://git.kernel.org/tip/5707b46a4206be2068444eb6b514a1ee070651c8 Author: Colin Ian King AuthorDate: Tue, 8 Aug 2017 10:28:59 +0100 Committer: Thomas Gleixner CommitDate: Wed, 16 Aug 2017 16:20:55 +0200 x86/intel_rdt: Remove redundant ternary operator on return The use of the ternary operator is redundant as ret can never be non-zero at that point. Instead, just return nbytes. Detected by CoverityScan, CID#1452658 ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Thomas Gleixner Cc: Vikas Shivappa Cc: Fenghua Yu Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/20170808092859.13021-1-colin.king@canonical.com --- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index b529f93..a869d4a 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -680,7 +680,7 @@ static ssize_t max_threshold_occ_write(struct kernfs_open_file *of, intel_cqm_threshold = bytes / r->mon_scale; - return ret ?: nbytes; + return nbytes; } /* rdtgroup information files for one cache resource. */