From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965506AbcIHJkd (ORCPT ); Thu, 8 Sep 2016 05:40:33 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:54800 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757781AbcIHJka (ORCPT ); Thu, 8 Sep 2016 05:40:30 -0400 Subject: Re: [PATCH v2 06/19] remoteproc: core: Add explicit message error if cached table failed To: Lee Jones References: <1472676622-32533-1-git-send-email-loic.pallardy@st.com> <1472676622-32533-7-git-send-email-loic.pallardy@st.com> <20160901070953.GB4921@dell> CC: , , , , , Loic Pallardy From: loic pallardy Message-ID: Date: Thu, 8 Sep 2016 11:40:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160901070953.GB4921@dell> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.201.23.23] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-08_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/01/2016 09:09 AM, Lee Jones wrote: > On Wed, 31 Aug 2016, Loic Pallardy wrote: > >> In rproc_fw_boot, add error message if kmemdump failed >> as done for other errors. >> >> Signed-off-by: Loic Pallardy >> --- >> drivers/remoteproc/remoteproc_core.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c >> index 96bc8c644..3282a4e 100644 >> --- a/drivers/remoteproc/remoteproc_core.c >> +++ b/drivers/remoteproc/remoteproc_core.c >> @@ -1139,8 +1139,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) >> * cached_table will be copied into device memory. >> */ >> rproc->cached_table = kmemdup(table, tablesz, GFP_KERNEL); >> - if (!rproc->cached_table) >> + if (!rproc->cached_table) { >> + dev_err(dev, "Failed to create cached table\n"); > > This is an OOM error message, which are not allowed upstream. > > I believe if kmemdup() fails, the OOM handler will inform the user. Yes true, I'll drop this patch in v2 Regards, Loic > >> goto clean_up; >> + } >> >> rproc->table_ptr = rproc->cached_table; >> >