From patchwork Tue Oct 3 09:23:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9981993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0647960365 for ; Tue, 3 Oct 2017 09:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0304423F88 for ; Tue, 3 Oct 2017 09:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBE8127D0E; Tue, 3 Oct 2017 09:24:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 886A423F88 for ; Tue, 3 Oct 2017 09:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lklIMIfpApw6ESoqnzYm/bluIY0BJ9zHDT3IR3Yaykg=; b=aHsPNsK/Y++Qk0 ttvHMqJTpmVXOQupIsDReFp/pAjD93IO1uDPDH4104mpwfeVuJ40heeT9OCl1C8OcvI4Dko5KQaTH TUGv0je0WJCzM/CeOOJJC7KmCaJnF2P9Cv+0Da0oiAMYHtNjqVrQ0O33pZXb9PO6FjG3qa+C/cVn9 iP/PBUDSu0g68nfRnVEVauvVBUB9mn2ND+5NzPT/KyFtq9mlRLh2grSvW+CxZSma9/mBN5uXoJU/L Nwvpp0nBPUfMH0I05Lq4jCGXMYY8a8lOSGH4QqwX4LyDhkfzbGRsik1HS4K6qqz5TC3z27HF3pGio O+b1XEo+DmwkCT43b6+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzJQn-0006Jb-SX; Tue, 03 Oct 2017 09:24:01 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzJQk-0006CD-JB for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2017 09:24:00 +0000 Received: from [192.168.1.3] ([77.182.180.225]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lpeys-1dMNZY1Ccw-00fT0g; Tue, 03 Oct 2017 11:23:26 +0200 To: linux-arm-kernel@lists.infradead.org, Mark Rutland , Russell King , Thomas Gleixner From: SF Markus Elfring Subject: [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init() Message-ID: <672554ba-b476-8852-3c37-9e8716f1eec4@users.sourceforge.net> Date: Tue, 3 Oct 2017 11:23:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:NEYlVOJIcSayEJiWeoIacaB+YL/Uz5f3vjjdIphvPrgYzDcwBE6 wsl83+qrBWuMl7+7zg9Frawseq4BrDhBNavwtGjY1wfr+z3uZvyxy9z/07RitMdLTW+rjwX UKoN0z/GSJmH5pB2oMrUkHw3Omg/S4T1arfLYA0McUPq6rlalP361jzD1IDv8zpUaVA4wcT xE9jAETEkjc3o2UUIx7ug== X-UI-Out-Filterresults: notjunk:1; V01:K0:DjbcfqC07H8=:Aik8nryiKNqnmXwu/qYf25 +AgywiQpnrl0wRydehoSL9zcKyHKQtysr1uztG7uuUbPug+mbPKsWeKRLai4KjEpxXcDgoj+y vPoJD197DSMytKa+6ulTwA34NQ66huPULs8nX2Fh66Tnn5/oevtPVn+YFyrOUWDR14e86xY5D jcuTNTOLZCge7I9mSWwLyD6vHoOrNyXe02eBYXOr/wI5A2vVyXfR1vJU0Pocs0yAQpPWWsb7u CFZiZyl5GlGRym8bD0YpE6OEFdxMtwlJVzACUBRJ+Kw+HSTTYfUbr4CmMvmhvvU5OXA/aKVw5 8Zc90ZnM1WGXuDAPD1mX6oDWdP3+FXt8g9J+uofFKLci58/8cUyWaDTYnFSlpThe3FpmyML8z XpXEW3xjmrOa4nJaZ51mVCnN1GDznZQlER+7sdjUbnuGexwEnJP4gE9rD3KCvNmwJ+niQ83Rs u7CYwnsa9TZ217O29aYoSm3ITjkW4LYjOYm59V0YWj2Eiuy7R9KZHbKC6OVtiImFOElICCMCt ufK7gY8TFQxKPTzJ7qk6SFJsDIueHoMHjzl+EntZG7nMR5iE3dL/rOkn5vmztyBFCPg4zsxKk wYLIHHP20xnCnrQDlpF635HzW2xgmWKalNavg3AWAtcyGVtUN/5wpPWKOPEKvIDKV/BEKrL5w 9IOXhh+9glX2U6YcYdbn6cKG9VJXsMlQjJp1TIC9mTP1RHxNwa2Vil0GZoAq/vlutpEqSMGnV SkPOUbT19UmumTk92I2XZX8ZquMRCkJEnbFfD9PgpLeO8yS2egkRBhJlqQVcK3Pk3MQDUDR5g Ycn1WOw3w0jll1As7NlY+ZkGTeOdzCVnTdo2sOzbXVONZltx9c= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171003_022358_973614_979310F9 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Tue, 3 Oct 2017 11:16:56 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Mark Rutland --- arch/arm/mm/cache-l2x0-pmu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c index 0a1e2280141f..b3734da93010 100644 --- a/arch/arm/mm/cache-l2x0-pmu.c +++ b/arch/arm/mm/cache-l2x0-pmu.c @@ -528,10 +528,8 @@ static __init int l2x0_pmu_init(void) return 0; l2x0_pmu = kzalloc(sizeof(*l2x0_pmu), GFP_KERNEL); - if (!l2x0_pmu) { - pr_warn("Unable to allocate L2x0 PMU\n"); + if (!l2x0_pmu) return -ENOMEM; - } *l2x0_pmu = (struct pmu) { .task_ctx_nr = perf_invalid_context,