Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7277036imu; Wed, 14 Nov 2018 14:43:14 -0800 (PST) X-Google-Smtp-Source: AJdET5f1wEzHyAOB1PIHG71ZFoDXj7fhxQ6OmUBKOJjm9oZL1HZtxBAuP0bToMwQR+STxExcyz8s X-Received: by 2002:a62:8915:: with SMTP id v21-v6mr3892505pfd.137.1542235394385; Wed, 14 Nov 2018 14:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542235394; cv=none; d=google.com; s=arc-20160816; b=zwbtgo0As1aykiRGVvy8rpG0mptMbMwgJR6rh1HgKrxqdlnT5wO+o/uPs0ODNeK/Me /HSxE3azxNu69zzvTEqO2hmX4dYUaVACdd6fmzhVrAbmkD4IONsYihkkGkP5KSmPOkfa luSBQUZ1VFMRD+b1DPSZVLrhoAuAPv/pJTzeGYE7q3uG+h1NE2l50LrhCTy/h1WoVyef WEFEJ+RFfciu22qj0NoRgJlmQZer68q1+pSNoGrNNh7Sc8JgfIV/z87M1dgDv3u4nOu1 0am7rcXrIyZn+J1+67law7VveSPXzFlULwapo2i+RUUWXeyZEgoz4q9JmJ1cRlSIq1Ot rVug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=YS1Gjwv5rmS3L69Kzp3kKj3nfZbZvTlbUu31NIZ+jkE=; b=A10G5CRL1V3w4wIfq4qnYNmuF2lRfAJZ+AcmjJuoEaKQdOaBCgL7XM7wi3ruSJcuL3 gdE18rJNfrZFkxASnTZA9HOxRRowuBPF6qT8xOIBn92BxO3pI8I3olv98t/BQGW+e1Q9 MrMYsNvNKmOTxnDmITcgvouwSKYS0qjLzgjFE4QNqrTL9WqEFf/byhvK/O8bqapv5AUf vjiQpwNjdAkysrjuVzmB2MAE8TPtf8HhXn3axET+cwS7g7PzikQpe51G16fSTPPqMJL2 5oQfQ+BBYIwZ6GXmyg8H29aljRdITAuiTgOqTKw6zVhg8tHVjdUg/c4mfAs/zsaumnNE Q1Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OERHG8KZ; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si24976817plo.89.2018.11.14.14.43.00; Wed, 14 Nov 2018 14:43:14 -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=OERHG8KZ; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387520AbeKOIrc (ORCPT + 99 others); Thu, 15 Nov 2018 03:47:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:34402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728747AbeKOI1W (ORCPT ); Thu, 15 Nov 2018 03:27:22 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A96852251D; Wed, 14 Nov 2018 22:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234138; bh=6TmoVjPS0F7A73e/ZAt02YzjdxfJpinryyjqbLTc7EM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OERHG8KZ9JaafGimQUgswIoTilit2q29ULO3IKi/HjO5l+UcV44McyKNVzMnMh0Ld 8E4s61bWCihvYhvBly9qZq0OX6Z83B2hc/5bKKPM2NAi/DC9Kwtgf7Rem4fKtZBVQ7 LZyeOwbTjBS5DCJHjgmMY4VhmAiHTHj0jyHUQsoE= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Richter , Martin Schwidefsky , Sasha Levin Subject: [PATCH AUTOSEL 4.19 44/73] s390/perf: Change CPUM_CF return code in event init function Date: Wed, 14 Nov 2018 17:21:38 -0500 Message-Id: <20181114222207.98701-44-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Richter [ 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 cc085e2d2ce9..74091fd3101e 100644 --- a/arch/s390/kernel/perf_cpum_cf.c +++ b/arch/s390/kernel/perf_cpum_cf.c @@ -373,7 +373,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