From patchwork Mon Jun 20 17:55:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12888011 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 A6556CCA480 for ; Mon, 20 Jun 2022 17:57:49 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rUvvFDXMx9f7Ve3j4D8zYOKfsOjzwdFxsOlzK77SDuo=; b=pIjGqakld148hc +BXpXuwD0Ob1J6LZiD/QhSU6YR+FrcRN0Mm2QvoKh7XctHfOkngsg0K0GKCu7c6Ki1SqTOp9jk6TI CCpUEEhHrtfbJfiK5ipyphAbaIbgjeXGN6FE6nwTTDl+Ld7MRRHMDm3R0Dx5Abvj8j58RgWC7NUbp 0N7kH/GTo5FPkY6709j95acL1T67ekqQolVMSfRUqGgLXlJinaWmswc06RfzN7BSn5NCUcWXgsuQr /FEKwZKLM9E4ln6DpcetdRaYI+JbF5USwNsjRg0uwQ/VJRKlyVJvEAb8fPGoElzM/9F27CLqrs8Ab uny+tA+zLiSjbi9vplLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3Ldh-001hq5-2y; Mon, 20 Jun 2022 17:56:41 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o3Lcf-001hQK-Go for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2022 17:55:39 +0000 Received: by mail-wr1-x434.google.com with SMTP id g4so15671591wrh.11 for ; Mon, 20 Jun 2022 10:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oDUyLN4Pryhtw9N4iCwOXaC7LwBCPSfNWeiXJOlMPkg=; b=j/IwIO3a0ts7j8gthEBmCMeJ6vuYBo7HD3mAfvcgjHRCoMpwlDgxlGwUcshfULkvl4 ux3FYylaS1HAhyCbCRfcmlKK1iAcVIKdHj+yrmEOFmbCiXy6V4a+wtYGsPZNyzriN7gj qibFoseY20ti4Hsd7U+99+ibAKfJP5EBKJdU/FlP9ttzN48lcL6Bq6/z2ymORhORcBwJ BXN+XPG9XT/9ERCFxVBGFR0BZ0k4DrArLCAsL4vyu6pZqBPvD491gJMHWamNmvy2eHEg mgeSu4G8QcNhmdcgLErLyKtI1w09RHh+nQTOnlXS8hnZ04a5zgRLlkN+ELVwpZTw1k7V lzEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oDUyLN4Pryhtw9N4iCwOXaC7LwBCPSfNWeiXJOlMPkg=; b=Rp51HFLqpX+XYW++AgBiTUSXX82LFlitymH2rkDag4C533axM23SpDs43jxwnWjgP5 2CZ7M93DBvbxiadeEW3SxgyxNZ0/JTEgtFTqVrsK0s0ji1lS0kZc1S9Ns7/A4PuCTHAh BaWaRskCSejjrIYY1ZZ2Yo/4UyaixDkoTQVC5NRuj6hcrjHWWKmvLioD0/OgHEiB9Aej Z9NIlu4pjWdXiV3q8d3g35byRsk0Wm81Rs7di9GV9AsgAbYu1E8hMJsm7KyyK7347Lp1 yqyx9e9heFEQWvm6Dca/fwHd8ddXGwvhaLpd22BW+1akTTvKG6+kCog6kN45kSEEnk7E 7VUg== X-Gm-Message-State: AJIora/YXiEtXpPyAYbfs25WUaww1fQTMTIQvGGrouhOpDGcgRDakdNe u/eD/m7mo0P7cGQEYgVDVz0= X-Google-Smtp-Source: AGRyM1vzYBSQFI6blw/ovMZUI5R79+0X2OmRbBajL6gKqGWCQJxqwYvaZKB0wzV66Sh9rKiSy4aM9w== X-Received: by 2002:a5d:5c08:0:b0:219:e5de:72af with SMTP id cc8-20020a5d5c08000000b00219e5de72afmr23720384wrb.513.1655747733393; Mon, 20 Jun 2022 10:55:33 -0700 (PDT) Received: from kista.localdomain (213-161-3-76.dynamic.telemach.net. [213.161.3.76]) by smtp.gmail.com with ESMTPSA id 184-20020a1c02c1000000b0039db31f6372sm19620752wmc.2.2022.06.20.10.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:55:33 -0700 (PDT) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, samuel@sholland.org Cc: mchehab@kernel.org, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH 3/7] media: cedrus: Improve error messages for controls Date: Mon, 20 Jun 2022 19:55:13 +0200 Message-Id: <20220620175517.648767-4-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620175517.648767-1-jernej.skrabec@gmail.com> References: <20220620175517.648767-1-jernej.skrabec@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220620_105537_680795_5103A39C X-CRM114-Status: GOOD ( 10.81 ) 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 Currently error messages when control creation fails are very sparse. Granted, user should never observe them. However, developer working on codecs can. In such cases additional information like which control creation failed and error number are very useful. Expand error messages with additional info. Signed-off-by: Jernej Skrabec Reviewed-by: Ezequiel Garcia --- drivers/staging/media/sunxi/cedrus/cedrus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c index b12219123a6b..99c87319d2b4 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus.c @@ -242,7 +242,8 @@ static int cedrus_init_ctrls(struct cedrus_dev *dev, struct cedrus_ctx *ctx) v4l2_ctrl_handler_init(hdl, CEDRUS_CONTROLS_COUNT); if (hdl->error) { v4l2_err(&dev->v4l2_dev, - "Failed to initialize control handler\n"); + "Failed to initialize control handler: %d\n", + hdl->error); return hdl->error; } @@ -257,7 +258,9 @@ static int cedrus_init_ctrls(struct cedrus_dev *dev, struct cedrus_ctx *ctx) NULL); if (hdl->error) { v4l2_err(&dev->v4l2_dev, - "Failed to create new custom control\n"); + "Failed to create %s control: %d\n", + v4l2_ctrl_get_name(cedrus_controls[i].cfg.id), + hdl->error); v4l2_ctrl_handler_free(hdl); kfree(ctx->ctrls);