From patchwork Tue Mar 28 17:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13191380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9068C76196 for ; Tue, 28 Mar 2023 17:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:From: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nDbd2hWt4+Tu0T44/knfOgWBkjMzJoSO/tspvsfVpBQ=; b=gtTlP0kWOhRCW6 B+BydJJvnNBj0suhMNEELHDESqdCPyMTG5BcF234CW5Fe8P3tiyxE5eQKyfa8aT5KbZiaEdexHzB2 kKnuMlwuezZJQq9SYDikERp2JLMT3THUXg+K6bUvmyIhArS2KHHCUjMJS+hnWrIShx1dtv66+dYaL UhmJ7HR2OW8TDCoI/4/x6ru4dtVrSnZSNrI6H91WUNHD1voBrU4O/2cUCO07D4ty5eLrJEOKB1pZD OWJPKExef5WfCkt10FzMok9Cg58dpo8EkvsgbP3XiVyxuseogSR/mELYYnL7LeiQj46z/cWRxymk4 gKmpvLQV5bdG3MVEdwlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phCvT-00FHIQ-0n; Tue, 28 Mar 2023 17:16:03 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phCvQ-00FHGh-1q for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 17:16:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1680023757; i=markus.elfring@web.de; bh=33JYSqjO1O4ZsfD0PRTh7myLsgyYBwnolU4IU2fN9dY=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=SwGEhC7gdF8QpH4cRbg5DCBb1coF8UQ5Bi2KR+BdC5Fc4LIJxiZ/gx1pHhES3jjI6 aJyV3ueHrtBiJlWxkdw7iNBM7VUtXCRqW6BF8Wf/RvaQt4Rfm6459g58gQZujMNJzi L5nAZSkCs+027BcrRKN5A7el671+2b115Na+i6/WkHuNDmlKNtx43Q8VgP+4msBL4r gT74jJdoYKDPzdUknucJhrd/qqEJvjcqY3rdXP9i/DXYFbxSmejdP5jOPFcJDqibbB n1JaoIlMWbeG73yDcJZwGai3KuWYLqSkMEHwa0Lq0GrD9KQx9O6ed62fB+GL6oVFz+ Xt8Vsqj5t8U+w== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.88.83]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MHmlu-1pdLaN2gJ4-00EvIY; Tue, 28 Mar 2023 19:15:57 +0200 Message-ID: <52ec07cb-82bf-9a04-da79-62d19015212d@web.de> Date: Tue, 28 Mar 2023 19:15:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: [PATCH 1/2] ARM: Delete an error message for a failed memory allocation in init_atags_procfs() Content-Language: en-GB From: Markus Elfring To: kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King Cc: cocci@inria.fr, LKML References: <6cbcf640-55e5-2f11-4a09-716fe681c0d2@web.de> <562a6f99-3f8e-9a77-e519-b668e24dced2@web.de> In-Reply-To: <562a6f99-3f8e-9a77-e519-b668e24dced2@web.de> X-Provags-ID: V03:K1:fuyB2ITDQsf7Gof7u5S1puc/4xtNnK2aa2KF4CkTug0NYiKjcNy z5Wu6rq7BRr/98ImhF4JGznugAsZOmY0f6L7HgoDETKBTWrH2R+6Pxae4nwNV3GOz/Mq6/V +YI3iQ72iNYDBVFWpkAarGQL6REngnefcVDj5gFRqkEpUyak6RNPbjZJPozcdqy18wKuBmT 7VVxLY5keugI0CDqsMJFg== UI-OutboundReport: notjunk:1;M01:P0:2NyYn4xURlY=;CqKGXHCk9QFvMu7gOIg2Ef2wU6k d0Y1z3V4SzrwXnwfUfDT53Cp0iYwicvYikDUG7OWg3iTYspt1cwT9JDbP5jGLcujxXXugOKYs lipBDFWoFV2fpEH03c5JF/4eTsgrENpmj1ACcqfsCawJJ1VGZHvkG2/EXQYTuyUZvoBqGyrmW /IEFsD3lVtpI5oK8Muh1Qrg+WJ7pZmGItSL/G/2qxvM4fdF8bV6hsrSoFK36y9lyp/HCQoRX2 QeVKrwf7/28z6NVDJZNXvFx57xMvRHzxJotOE4ZZL1fVQ9RnIAFsFnCx/9zHID4SkPUOCyPt8 Ua/0Hihxjh9YG5eSJLtG+2uD9DcCzhmwpVYlIP37dk3cmsIRXDzV14PdnHW2QUJiiT8F/kHot fEIbuTozQnijzWEn0t1Qw6xK+59x/C/pHtrrJKhjTRnqFPn7H6iURtX0Z9iqoHqnIBqYaNvk0 //Do6IuYIDaIYUWVOG00U2HTtJ02SOiZRDBFPgD6Amshsy9a+hVwzzhHs7PlaHLF0Sc3lpvvF R9Z7aIonGFv/QazYst78HWonCT+0TtLPdSIs5NIQcSaZ4vFA6lYm+fXt0NWl70ELxiTRpgulG tvp3d7R3/iW8UhobCek47KNond2ig2ZXR+1BSFDt6zCVR6wZIE1S8NItRuUgZqtWWPcNOhgza cDRwoNDZPKqfMv7izSSvXRIWiCjg9NrJgJlTyDOUaYbvSLc/ez+n9Qi9LXko7eDAeBJ9LXwby fqiTSt5R+5ANE+lMaUda5n8M+HYQoKytoi6e/Jy/PV2hd4AA9/P7whJD7PqBCR7Vw0UNKx2Mz k3pKgqIv0n5fgqb3X/3cszw3eIf5Xdk67PEq1dutwyvAhQVdvlYvR/jydpKfJazpa9SKvqcsA 5WbFWCFAb5HEi63Rw/NrksBZHUW+CN5rZkLmAgvLem0vqq3998lYMVaNO X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_101600_899332_C1D8EC0E X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Date: Tue, 28 Mar 2023 18:40:26 +0200 Omit an extra message for a memory allocation failure in this function. Signed-off-by: Markus Elfring --- arch/arm/kernel/atags_proc.c | 2 -- 1 file changed, 2 deletions(-) -- 2.40.0 diff --git a/arch/arm/kernel/atags_proc.c b/arch/arm/kernel/atags_proc.c index 3ec2afe78423..2f08ab08e68f 100644 --- a/arch/arm/kernel/atags_proc.c +++ b/arch/arm/kernel/atags_proc.c @@ -69,8 +69,6 @@ static int __init init_atags_procfs(void) nomem: kfree(b); - pr_err("Exporting ATAGs: not enough memory\n"); - return -ENOMEM; } arch_initcall(init_atags_procfs); From patchwork Tue Mar 28 17:17:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 13191381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F112BC6FD18 for ; Tue, 28 Mar 2023 17:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:From: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hGM2J+xN+4BGwmGE7Bkhz8OTD27T+fQY67aP4+Wnu2o=; b=zr+i6bV/rbUQCD cy5LuDgpgXDAT7CcJAkze4obwg5SYCtslRXYO/agtCcMw0oCseklyVFxWEV5UeoM0JkSyUCdAhw4b EDkiX/Sftxgf8W5b7pCgsEaC2QKL1NLpyMISwnt7G4D6JXaftWd/RJdEsetqCz+dyP/impd6ULd63 r6w8SBI/LfYql5dybrBxxTs/s6QQA+VGJLrASAyEVmc52hOYyxcjn1U+LrOL5hbse3wQHhIcEOGNo OQJYN7LtxWHEbBSLo8xjFY8S7jJnjEQoI3hNkkYu+gH7tIofxxar9S7d7s38vXDH15xphjto8Gw1g oS9KJ/Wc9wszBN9wpevw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phCwx-00FHbi-2h; Tue, 28 Mar 2023 17:17:35 +0000 Received: from mout.web.de ([212.227.15.3]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phCwu-00FHaT-24 for linux-arm-kernel@lists.infradead.org; Tue, 28 Mar 2023 17:17:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1680023850; i=markus.elfring@web.de; bh=w/2uNMl1KX2jgPywO6+eEF6wu8T/V/mHXVOfzRQZtS4=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=Ym4W9zoH3MhB5/DleBdWfBI7+aWajz1OGqsFRNNI4sORnYGRt5kLsChTgUE0hSh6o oPetZeiEVllzIK2IZbXhtUJN925zhrIPQBrOSKOS0TAZRzSLBxuYTnAb0WlIaNFVnl g0etg8tty/OYxxO4vCgmqK2yq6bftIzrYXwoVEcrwWvxwQzz4XysH5fhEJGnhrOmKD v2zslNc6y3tJ2by8+fV/P+H92domyGUeTF5w6V9vT8F5teo1utZVb1uPn9xqlaA4Yx i84B5246hCLgcQ5mEGsV4gHmbQr5yZeRlrZ8t10t90x2daNkxcMJbHbG+IYL2KZdUw HO6W0PY0MAVuw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.88.83]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MYtwy-1puSVO33Qm-00Unpv; Tue, 28 Mar 2023 19:17:30 +0200 Message-ID: <7dce2d53-9066-e26d-9e4f-e923226611d8@web.de> Date: Tue, 28 Mar 2023 19:17:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: [PATCH 2/2] ARM: Return directly after a failed kmalloc() in init_atags_procfs() Content-Language: en-GB From: Markus Elfring To: kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King Cc: cocci@inria.fr, LKML References: <6cbcf640-55e5-2f11-4a09-716fe681c0d2@web.de> <562a6f99-3f8e-9a77-e519-b668e24dced2@web.de> In-Reply-To: <562a6f99-3f8e-9a77-e519-b668e24dced2@web.de> X-Provags-ID: V03:K1:avmJgY1SCLe4YYARC1gqJFm0Whcsi/9f5JD+tR9ODFN8Z0n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nwdOvjsMecin5ntcl0V/WhX wk2Vz7evYQs9tRCB07IOLWPZAd6xHlinxdr6ywyeBjLTRdM0kxW/WUvyT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230328_101732_964428_944EEC03 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Date: Tue, 28 Mar 2023 18:56:31 +0200 Return directly after a call of the function “kmalloc” failed at the beginning. Signed-off-by: Markus Elfring --- arch/arm/kernel/atags_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.40.0 diff --git a/arch/arm/kernel/atags_proc.c b/arch/arm/kernel/atags_proc.c index 2f08ab08e68f..1c7441f3af85 100644 --- a/arch/arm/kernel/atags_proc.c +++ b/arch/arm/kernel/atags_proc.c @@ -56,7 +56,7 @@ static int __init init_atags_procfs(void) b = kmalloc(sizeof(*b) + size, GFP_KERNEL); if (!b) - goto nomem; + return -ENOMEM; b->size = size; memcpy(b->data, atags_copy, size);