From patchwork Sun Jun 4 21:06:29 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: 9765261 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 1299E602B6 for ; Sun, 4 Jun 2017 21:07:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02B78274B4 for ; Sun, 4 Jun 2017 21:07:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EADDD27F07; Sun, 4 Jun 2017 21:07:00 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 5B2FB274B4 for ; Sun, 4 Jun 2017 21:06:59 +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:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kX2JaQJWwtMC2u+fUlY5gwdM7sKnyYPIY0dCpigNAdg=; b=D1qHZYQsrhrUpw N++wj7Y+2f/MigrEgJhyLVBYvSzqv7YOXgBWv8heWybwgY++Ic42a0pOw8G/XOdYDTE8jObNTSvLu MfLPSNvhLq9Ol9w1C480nvb+f6lSvAGl1EjfAOMRAbErzCmPoQUFt+QwVfOZqwcRz+KPPeLQkh9Vf 1J4LpQCgYg1FZlco7dDrNt9QAdYbe7QIat5YQ/iPvQlZu1GaveaHxU6HLE4SP3Hq34oxY/5h5p194 2dPUY9cEUk+gVXMET+jBma58K2BMD38En35wLK/Vy/c30EEGQOkj9hlHLTIIQGNqsfEB49yvb3O0H J8fpX0QNQWb72qVitD3g==; 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 1dHcjj-0002Yg-1M; Sun, 04 Jun 2017 21:06:59 +0000 Received: from mout.web.de ([217.72.192.78]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dHcjf-0002Fq-CR for linux-arm-kernel@lists.infradead.org; Sun, 04 Jun 2017 21:06:57 +0000 Received: from [192.168.1.2] ([77.182.179.125]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LaCbS-1djmHp03yQ-00m0tx; Sun, 04 Jun 2017 23:06:31 +0200 Subject: [PATCH 2/3] arm/xen: Delete an error message for a failed memory allocation in __set_phys_to_machine_multi() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, Russell King , Stefano Stabellini References: <9b9230f4-0f00-e019-75b4-571e29b52998@users.sourceforge.net> Message-ID: <004250a0-d94b-7587-ae5d-524ba2911a16@users.sourceforge.net> Date: Sun, 4 Jun 2017 23:06:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <9b9230f4-0f00-e019-75b4-571e29b52998@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:psbTMkK41RcIaoBA+dyzALblxs9IHdy048Vk0kyuPGS6rhCOG0J DtFGm+o07/oNg5ZHZs6oJ7ILzKlBVGPoqT8+HM9iecEBqLRTwQFiTWxsndsjO7F3xpuYMMV HOK5TR63j3JCvWsUNDAui4yXrXLnwFMJL3NaIhgh5eCjyuR7BS964Qhie73DTG1q4YSCoDp vR0ksrTAd4XRcsJ4N/5hw== X-UI-Out-Filterresults: notjunk:1; V01:K0:mRyNbeOMe80=:K+s6irDNIukFuGMO/RgL51 gVJE9EmQDA0eXscdMVSzasrSH6bvUHcg6oD6z11AGFp3uKmo+muqv4Qt/Ymk0E0ICCffCif/s H87NC9mXMDneRcOeChEslLpqDC87EorkdsevYsMPKvCpbIZ9+GyaZM0aPvMdqzOHUyMX5scFA LSR0mg1AANqPD7pTGG+YydIuye0ur3Q4qTXG5s4ofsc1FEHxyCTgVNbB9b5Ku6BHglUb2a5GG +hV9RqZCeJpYlLb8W5aczJ10goptzFafpjMrF94VDMGykd0nGbktxy7IMb7v+leDRBD/wfTcy HDBdUeIJadQl47BGQgoy+Ps61/4T6u3EE566fLM9jS1wKnolKa2w6Wi6bAkGX+3hQWeIUTMC0 eAMtHH38qLjWGk0Tna7++Gq7XakBNeg5jGyG2TjsOmOe91QWQ23j96rL2UPsJFeJJ4/XNQA4O 1u6KzvwTBQfCInQ2wUiHz8QA/C0OM6lZEORbUqbXelrKryNIqtFVvx0Hx7PNKsTEIc670OFjI aCDts/sfHrmoCVsiEKms3DVWG/GUej91Z/mCsqNSEgkV7XzmbJboFYKYHLtF8wxZ2YgwqD9kb UJx+PzSaIJbzxMwXGBv68Vh5eHza0loGLbVb1RIqsHiJ7iBjDzTS9cMruypiM43maYLuDNKAN ixnyvO5JFsNMvhdWhlVe4r7B6DTvSVvn7ayObb5MdXId/WPB3zOOI+bKHDEonypPhbCiOTJRX XtcxN6BP/QMoMeOyWB0bisEXf1Ick+kTOc4pfR/A6UxUSoYvlZ2vtfptKMyL6acvyE0JHmvcs fYT9mk7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170604_140655_757099_E0D3650B X-CRM114-Status: UNSURE ( 9.37 ) 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: Sun, 4 Jun 2017 21:12:36 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring Reviewed-by: Stefano Stabellini --- arch/arm/xen/p2m.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index 11e78432b663..f5f74ac637b9 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c @@ -148,7 +148,6 @@ bool __set_phys_to_machine_multi(unsigned long pfn, - if (!p2m_entry) { - pr_warn("cannot allocate xen_p2m_entry\n"); + if (!p2m_entry) return false; - } + p2m_entry->pfn = pfn; p2m_entry->nr_pages = nr_pages; p2m_entry->mfn = mfn;