Message ID | 20230719145534.9812-1-martijn@brixit.nl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2498173vqt; Wed, 19 Jul 2023 08:01:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsg+HpTp0orO9AwrxbQwVDooBZvN5vj/E/yWuTbNxzUt8buikfF8S4allsPNReprMlO6Ht X-Received: by 2002:a2e:808e:0:b0:2b6:dcde:b77f with SMTP id i14-20020a2e808e000000b002b6dcdeb77fmr104497ljg.35.1689778893072; Wed, 19 Jul 2023 08:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689778893; cv=none; d=google.com; s=arc-20160816; b=PE4W16krwG4bUnqh5feGeNOS8TXjdAUYzUBxdQ8WHHhHW7L/XBnwNQ5W9KpYoGdGGy zuamJ6PrD/ZO432KgrcTXb9yxnO+sb56wDZDKl1cT56Wrob5ZvCyGcJ0X/OLMOhXUI3D 5JrCoj2MYMERgo3O/cHrBsCIju/84DtrPMdMYGoQT80bKWBveZ9Ks3R2FRtiU2a//2m1 TZTV04nDHzkj8ApN6OxlGwmyalUkXznuNHA6zKyXZDQTxjItqHRV2ld7VdhPv4M6U+03 3Sr5jrXqazmr95a4+5I9Dsl+drcJKSHaLLhs+cxlSVUbpV7KXCa6exrb6iNhB4DC9FS0 p1Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=bz36UCyZvhK5ImAPfX/8b57agUtYhAfBWMkUTD8b+IQ=; fh=wnR/EVQPuFVq0MFatjn+tQGKvT0ZTsUh9MP43zgK+dk=; b=IqRa5J/jz8Ajq6Y1hmqzJ1InnE33GSgvqy0litKqCEoAWpTESf5DAeBpI8VJS7/Eu0 8Mfz9Xb0+89b9WZlZNvmsuEFKN7GbL7y01o0ba+6vDFdPya5SiiFgw8cbYlbAmjjw4Cu jxl8uZLgoAHh5Pzpv2NtyOHao9yms1TXcEtY5mPV7xXYj6WJ2UQhjNrZCBXLJG57E/jl QlIn16gMZPzq/irslce7EBMEGtiDRxtKW3YuRPZxDQqbH8DwrBV0ciZEBANWmDYM/11m 60rdSiR0Uh1vYYqJAUjsefZ/NlsV2wgbkpDlLngVL9YztBkeUflw/roU0933Ig84kOHB D6kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@brixit-nl.20221208.gappssmtp.com header.s=20221208 header.b=WQGZyAI7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a170906855300b0098f99532db4si2766037ejy.664.2023.07.19.08.01.01; Wed, 19 Jul 2023 08:01:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@brixit-nl.20221208.gappssmtp.com header.s=20221208 header.b=WQGZyAI7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbjGSO4I (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 10:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbjGSOzk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 10:55:40 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26505C7 for <linux-kernel@vger.kernel.org>; Wed, 19 Jul 2023 07:55:39 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51e57874bfdso9890665a12.0 for <linux-kernel@vger.kernel.org>; Wed, 19 Jul 2023 07:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brixit-nl.20221208.gappssmtp.com; s=20221208; t=1689778537; x=1690383337; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bz36UCyZvhK5ImAPfX/8b57agUtYhAfBWMkUTD8b+IQ=; b=WQGZyAI7rm3pERIjqORRkLifB2HjLWnL0y7Cytm9LJO+zPgHU9WhLJR9S/Hocn6vRf n8hts+SCBfGQLfTZHkhcwkzfNdIMnPeDt8faU1wq2n3vCw+XuMFm1e0whavNQYGqOCie dPJwuYzTj1yyDDB+RbsinMmYuEGr+NiO58DlIKRiYXAki3icpT4E5r3SnO55eo+krTvQ TL8blYRdXmT1zNz0sbNXlSaulTrMbtBXsCz9yUJ3eF6FHdN2AyY2ihicpKd+As7YsDGO lJNgr0BDt9HhwtaF1uJFqhpHYMh8d66Yfm/zsXkrsAUkei3kLmPF76bi9CVz5hFl2MCc t9SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689778537; x=1690383337; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bz36UCyZvhK5ImAPfX/8b57agUtYhAfBWMkUTD8b+IQ=; b=VtngqOQpdFEzbnmWmUJhUkbu7Js4ccKv37xADlkH2Ab5cNeEWZovShMMW4HCxQWaaY gxbtSeuhvGf4tWok49nBnxywou33LsntLdIosl6Le5gTh+lJfFhVHIe9W+vyA2yk6Qz3 Iga8BGFPb7FA3Swgug9i7uKbwt8XqackL6BB0ZOcbrwdNPhpwr9N1cLLEP+6Il1M4X4T boG0607oLMLOXpUC4wUGq832tfjF57z/PRldub8SVyDTdkSqeFV+8K/I4g8OMGE2fZyv uFtXrmm2FeszwRGkUeGrYqRVMYfpWRE4vDlNt2EmuP2DL5s5CiRhfjP5u8y30MzI8mQb A0Og== X-Gm-Message-State: ABy/qLbwuhpDD0m3Lhxfgu9X9BgHTH75Ith+gaiQIOBlMdCtNwXQ2rLv TJxB7m1gC4b9VPJ1pnPCq/q1CQ== X-Received: by 2002:a17:906:7386:b0:994:5396:e322 with SMTP id f6-20020a170906738600b009945396e322mr2712499ejl.1.1689778537344; Wed, 19 Jul 2023 07:55:37 -0700 (PDT) Received: from msi.net.brixit.nl (2a00-bba0-120c-9f00-7a8e-8795-650f-7c4e.static6.cust.trined.nl. [2a00:bba0:120c:9f00:7a8e:8795:650f:7c4e]) by smtp.gmail.com with ESMTPSA id jx26-20020a170906ca5a00b0098d15d170a0sm2397794ejb.202.2023.07.19.07.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 07:55:36 -0700 (PDT) From: Martijn Braam <martijn@brixit.nl> Cc: Martijn Braam <martijn@brixit.nl>, Dafna Hirschfeld <dafna@fastmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Heiko Stuebner <heiko@sntech.de>, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: rkisp1: Promote link validation error to dev_err Date: Wed, 19 Jul 2023 16:55:33 +0200 Message-Id: <20230719145534.9812-1-martijn@brixit.nl> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771861592376713414 X-GMAIL-MSGID: 1771861592376713414 |
Series |
media: rkisp1: Promote link validation error to dev_err
|
|
Commit Message
Martijn Braam
July 19, 2023, 2:55 p.m. UTC
Show an error when the pipeline cannot start due to an invalid link
instead of hiding it behind the debugging system.
Signed-off-by: Martijn Braam <martijn@brixit.nl>
---
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Martijn, Thank you for the patch. On Wed, Jul 19, 2023 at 04:55:33PM +0200, Martijn Braam wrote: > Show an error when the pipeline cannot start due to an invalid link > instead of hiding it behind the debugging system. While this can help debugging issues in applications, allowing unpriviledged applications to control messages being printed to the kernel log is frowned upon, is it could flood the log. This is why these messages use dev_dbg() and not dev_err(). > Signed-off-by: Martijn Braam <martijn@brixit.nl> > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c > index 8f3cba319762..9361b9086f6b 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c > @@ -1340,7 +1340,7 @@ static int rkisp1_capture_link_validate(struct media_link *link) > if (sd_fmt.format.height != cap->pix.fmt.height || > sd_fmt.format.width != cap->pix.fmt.width || > sd_fmt.format.code != fmt->mbus) { > - dev_dbg(cap->rkisp1->dev, > + dev_err(cap->rkisp1->dev, > "link '%s':%u -> '%s':%u not valid: 0x%04x/%ux%u != 0x%04x/%ux%u\n", > link->source->entity->name, link->source->index, > link->sink->entity->name, link->sink->index,
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c index 8f3cba319762..9361b9086f6b 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c @@ -1340,7 +1340,7 @@ static int rkisp1_capture_link_validate(struct media_link *link) if (sd_fmt.format.height != cap->pix.fmt.height || sd_fmt.format.width != cap->pix.fmt.width || sd_fmt.format.code != fmt->mbus) { - dev_dbg(cap->rkisp1->dev, + dev_err(cap->rkisp1->dev, "link '%s':%u -> '%s':%u not valid: 0x%04x/%ux%u != 0x%04x/%ux%u\n", link->source->entity->name, link->source->index, link->sink->entity->name, link->sink->index,