From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751348AbcGNMqs (ORCPT ); Thu, 14 Jul 2016 08:46:48 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:46598 "EHLO s-opensource.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbcGNMqr (ORCPT ); Thu, 14 Jul 2016 08:46:47 -0400 Subject: Re: [PATCH] media: s5p-mfc remove unnecessary error messages To: Shuah Khan , kyungmin.park@samsung.com, k.debski@samsung.com, jtp.park@samsung.com, mchehab@kernel.org References: <1468370038-5364-1-git-send-email-shuahkh@osg.samsung.com> Cc: linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org From: Javier Martinez Canillas Message-ID: Date: Thu, 14 Jul 2016 08:46:34 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1468370038-5364-1-git-send-email-shuahkh@osg.samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Shuah, On 07/12/2016 08:33 PM, Shuah Khan wrote: > Removing unnecessary error messages as appropriate error code is returned. > > Signed-off-by: Shuah Khan > --- > drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c > index b6fde20..906f80c 100644 > --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c > +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c > @@ -759,7 +759,6 @@ static int s5p_mfc_open(struct file *file) > /* Allocate memory for context */ > ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); > if (!ctx) { > - mfc_err("Not enough memory\n"); I agree to remove this since in case of a OOM, the core already does a stack dump and prints an error message so there's no need to it here. > ret = -ENOMEM; > goto err_alloc; > } > @@ -776,7 +775,6 @@ static int s5p_mfc_open(struct file *file) > while (dev->ctx[ctx->num]) { > ctx->num++; > if (ctx->num >= MFC_NUM_CONTEXTS) { > - mfc_err("Too many open contexts\n"); But I think this error message shouldn't be removed since explains why the open failed, even when an error code is returned. > ret = -EBUSY; > goto err_no_ctx; > } > Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America