Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5615205imu; Mon, 26 Nov 2018 03:02:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/W255uw3MD7B5X1a26pdqe/jmwIHCKaQ/ElxUGYQPI8hxt6OAUC9/G+HMVgwqSeIJXhs6x9 X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr27760635plb.335.1543230172340; Mon, 26 Nov 2018 03:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543230172; cv=none; d=google.com; s=arc-20160816; b=v7HAJqfKpjwr3mB3xbVpQjNWa0fWdi8rofmtm3iSsvxSsXEEQmFOJe6hUJZ8OG2vuo CvRQ1ffUS6tCa+2B4ku1BxmalL+Ji7NzCHnlzUzfPfQxnwqCH7eGidlT9gsRXyoY/RkK yaBhjF7Ju87dazeSgP/BBTPm+31Lwh4059toHH/FWtkn4mxEya26NZHjXiCTOxGuZIpt MkOFqeEc2iIhOk46SdJM17JFkdqm+KWOYljy5QJMTbYXj6wvMlsYBhZeFAyvusXV7Vpj D2Z2iRU6O7slfaD9ZrKLajom6Tq+WcR79xErEiWXzXZoLL1luICJH3BiPtSxKbT7CQfZ 8oOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vu5jibagG7h+bLWxipCwUa2CfQglLRq3sYK6T3bLgCY=; b=Z/6gCwaDiW8ZlyZXX322xoiEqfzRAZN7a3GKu5HdZ8DsX/fkse7CJlDZ87EM1brSwE Mtts8ngPvf0GVH0eXm1adIqOd/AAu4GyVnxLqAQxIARnA6V4urzBCpBFqNAkmSqebxBE pmhlMopzAJkYBAgFFTkz8ggt/guidJO2L+YboJeChYiFn+zItrACNKo+ELysiY/3jMS/ jntzcd6fCa1rZ3IUBcirJIU/vFn+/9szcVSJfGWw7VuLB6EXvzzlGb+7HtIr0QaaDULX alSd6LKnpkgytmfA4nvnF3EeFaEp+h7MdriYEvTWfBh2yBU6gzJglg80jPzSYb26hD3f 9NsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hn9oTyHD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si58729624pgc.236.2018.11.26.03.02.34; Mon, 26 Nov 2018 03:02:52 -0800 (PST) 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=@kernel.org header.s=default header.b=hn9oTyHD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729706AbeKZVxn (ORCPT + 99 others); Mon, 26 Nov 2018 16:53:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:35492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729005AbeKZVxn (ORCPT ); Mon, 26 Nov 2018 16:53:43 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D1B12089F; Mon, 26 Nov 2018 10:59:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229998; bh=SF8RGkjisO1eaQrUWyHdGVu2P+NW/W/BjQxUKS4kz+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hn9oTyHDSzee3npZD+LYMHuhA9jc3xNsAmVQ2eOQUFOMCsx/UbBHeZObi2HYKnTiD 6vGLc8WpnpOoTBgQo4Y8Uvh7cZtVepoWYNbR2JSvq8AW7rKKO3xBsoeqdOxWzRG7Gu ZHuKPB7E6E92oYqCCIpaOek8oAAj/Mf9uvHCZvlk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Richter , Hendrik Brueckner , Martin Schwidefsky , Sasha Levin Subject: [PATCH 4.14 31/62] s390/perf: Change CPUM_CF return code in event init function Date: Mon, 26 Nov 2018 11:51:12 +0100 Message-Id: <20181126105053.288397075@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105050.592727680@linuxfoundation.org> References: <20181126105050.592727680@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 0bb2ae1b26e1fb7543ec7474cdd374ac4b88c4da ] The function perf_init_event() creates a new event and assignes it to a PMU. This a done in a loop over all existing PMUs. For each listed PMU the event init function is called and if this function does return any other error than -ENOENT, the loop is terminated the creation of the event fails. If the event is invalid, return -ENOENT to try other PMUs. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Martin Schwidefsky Signed-off-by: Sasha Levin --- arch/s390/kernel/perf_cpum_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c index 746d03423333..61e91fee8467 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c @@ -376,7 +376,7 @@ static int __hw_perf_event_init(struct perf_event *event) return -ENOENT; if (ev > PERF_CPUM_CF_MAX_CTR) - return -EINVAL; + return -ENOENT; /* Obtain the counter set to which the specified counter belongs */ set = get_counter_set(ev); -- 2.17.1