From patchwork Mon Mar 5 09:35:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10258469 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 3849E60365 for ; Mon, 5 Mar 2018 09:35:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F922899E for ; Mon, 5 Mar 2018 09:35:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BCA9289B1; Mon, 5 Mar 2018 09:35:54 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 074D42899E for ; Mon, 5 Mar 2018 09:35:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933721AbeCEJfv (ORCPT ); Mon, 5 Mar 2018 04:35:51 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49547 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933710AbeCEJft (ORCPT ); Mon, 5 Mar 2018 04:35:49 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 64734208C9; Mon, 5 Mar 2018 10:35:47 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 02B5B207CA; Mon, 5 Mar 2018 10:35:36 +0100 (CET) From: Maxime Ripard To: Yong Deng Cc: Mauro Carvalho Chehab , Chen-Yu Tsai , Maxime Ripard , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Mylene Josserand Subject: [PATCH 2/7] media: sun6i: Reduce the error level Date: Mon, 5 Mar 2018 10:35:29 +0100 Message-Id: <20180305093535.11801-3-maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180305093535.11801-1-maxime.ripard@bootlin.com> References: <1519697113-32202-1-git-send-email-yong.deng@magewell.com> <20180305093535.11801-1-maxime.ripard@bootlin.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The is_format_support function can be called in the standard format negociation path with a sensor, where it's expected to have not exactly the same set of formats available. Reduce the error logging level when we find a format not supported to not have a lot of spurious messages. Signed-off-by: Maxime Ripard --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index 2ec33fb04632..b0ac8a188f92 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -111,15 +111,14 @@ bool sun6i_csi_is_format_support(struct sun6i_csi *csi, case MEDIA_BUS_FMT_YVYU8_1X16: return true; default: - dev_warn(sdev->dev, - "Unsupported mbus code: 0x%x\n", - mbus_code); + dev_dbg(sdev->dev, "Unsupported mbus code: 0x%x\n", + mbus_code); break; } break; default: - dev_warn(sdev->dev, "Unsupported pixformat: 0x%x\n", - pixformat); + dev_dbg(sdev->dev, "Unsupported pixformat: 0x%x\n", + pixformat); break; } return false; @@ -175,13 +174,13 @@ bool sun6i_csi_is_format_support(struct sun6i_csi *csi, case MEDIA_BUS_FMT_YVYU8_2X8: return true; default: - dev_warn(sdev->dev, "Unsupported mbus code: 0x%x\n", - mbus_code); + dev_dbg(sdev->dev, "Unsupported mbus code: 0x%x\n", + mbus_code); break; } break; default: - dev_warn(sdev->dev, "Unsupported pixformat: 0x%x\n", pixformat); + dev_dbg(sdev->dev, "Unsupported pixformat: 0x%x\n", pixformat); break; }