Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3750326imw; Mon, 11 Jul 2022 15:15:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s14Szi4OTA/2pWcd0bCppV9u2Vb0l5mqX7HGmApq2taMHuUYvQp/35S3ro8P3RzRervCqq X-Received: by 2002:a62:16ce:0:b0:528:c4c7:972f with SMTP id 197-20020a6216ce000000b00528c4c7972fmr20401959pfw.55.1657577729709; Mon, 11 Jul 2022 15:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657577729; cv=none; d=google.com; s=arc-20160816; b=VzTmwmxRXNmE3AnXq2c2wXbGVK/QOuZ+y8ek+anhbIiyXQsCmJ2srIPhg0L609hkRi L/0TFXtoSRiG5kcf0rnUz/gp8+IIl8lZzKFQeJmvemzKbYldJP/OxYQH6Y1KlDIt4FNH ajNDtIVZzmQx6hWWxw5Dm3pB81ECEq23jz9TRNeqOmElneQ5wSQ3CHiWuvLorefSQVDf G0XIQRpp6hxYFNQ5t3lzIobFjzrvs1BQMV0ShsDezGUWWsdR23y2vBWN1xSkVRcn5Hmx OU7qoKcmHk/jKc/ZsLxNnRHp18fqYkrXdMzlffeB6XGwCZzu01REVQ/MqrRnI+K26Rf6 mn5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=W1lfMFF7GwisucHEs2WhdN/ngSj9xjvJck8CvmDPr8Q=; b=LgIAGfM5wFL+jsGh9YIT+hXu4muGvaUTY3JHJPI0cJ/0+/mg78iOPeGOIqoLT5qozR l3JrksPA1vhUU2JCzoDmWS49I/l4IrzVYgOnqLUhIBh6mLesOu5nyc3Z5PFu2SSvn8fh Su4Q3m4gA9UPsy7mjQoq0We0Jg2EzUB851c7eXbyBPf82qOO0AAQCWqbsobM5Qucenou 4WZ0UsQ/2cJrSuUJgpTdDxPHbI42NbS6rxeoL7n/VXjATRUevep8cW2nPvw0R7oYVak5 u8St0pkisQcS7WvZbEJg5amFeI6WPQ8oYNgeM8i7onqiSMJZbsyjhhABkxwdaO5X1JvB 90Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20210112.gappssmtp.com header.s=20210112 header.b=m3zlf3ea; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902ce0c00b0016bd79636a5si11016833plg.575.2022.07.11.15.15.17; Mon, 11 Jul 2022 15:15:29 -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=pass header.i=@vanguardiasur-com-ar.20210112.gappssmtp.com header.s=20210112 header.b=m3zlf3ea; 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 S230501AbiGKVgX (ORCPT + 99 others); Mon, 11 Jul 2022 17:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbiGKVgI (ORCPT ); Mon, 11 Jul 2022 17:36:08 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 392A085F8C for ; Mon, 11 Jul 2022 14:36:04 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id t189so8257248oie.8 for ; Mon, 11 Jul 2022 14:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W1lfMFF7GwisucHEs2WhdN/ngSj9xjvJck8CvmDPr8Q=; b=m3zlf3eaY+ozNxIYDmb53Dyn4cP8iN10VPE2PcHMMkNQ9B2QriL/uoXD3KinNbSCAf R/jGyCPjVfs+Y/AURJLDM3VfiBz+w/TJUmx1mPLs5NfjNaUicM/sJBmLH7oa78GdqTRd dCfTnoM1Y/xR0GDVkc+OMWaXuozZ8hXrGWyFj3Oc8s9x/D7hYkqVt7waYUXceAKyQYBR hJGiu3OXz4anUqmK+YnlzMOskhRFOwH68SeARH3VE9rqYgvskwyPmoxINBIWCoKpQqS5 ZS5z+fQYqavQg+9MF6Bgtw4OiOxkzfd4UPKbX12r6/rTuAJsMPguquCbHZi1YOP5NHGG CIXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W1lfMFF7GwisucHEs2WhdN/ngSj9xjvJck8CvmDPr8Q=; b=NZ7+pKh177ViHnz4xVEe+Ou+ORNWvg52PZF3PL1p9B4VeAdmoM3mwyYszX5FXevYTy VJs15RiZo1A1xBBb0GewEgp6YWSNeerVRxj74AkR8KA8/BMTdE42H3RBfJ/lVVYj0qyf fLFGRG83U13AwNCMt4rVfUM0ONvUKdcXul+/UCU2Q5vTsy6IOhuBiLKfZjtMovW1TlAt 0/ZT4HoipXNgb3wLKw2LPUWDlmabmLElJZFtH8zMv1EJsZzbQ+H4OqaXdueMPLAW6Z3D 6/W1XWoE6z9nhRlfikhYyQ8cVMOn0M2HmQRMS2f9EMV6MkjiIdB04ZxhgsNLn39o51wK O3Tw== X-Gm-Message-State: AJIora8yA/OC+DK89A6wTQB0e/aI5KikBmX1U91ObXOiD+aa8Ugsr6Zt X1n1qwane1yYTPwE/jhxcF2zwg== X-Received: by 2002:a05:6808:2127:b0:335:9807:959e with SMTP id r39-20020a056808212700b003359807959emr251350oiw.270.1657575363633; Mon, 11 Jul 2022 14:36:03 -0700 (PDT) Received: from eze-laptop ([190.190.187.68]) by smtp.gmail.com with ESMTPSA id cj8-20020a0568081b8800b00339e4ca6a15sm3239334oib.45.2022.07.11.14.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 14:36:03 -0700 (PDT) Date: Mon, 11 Jul 2022 18:35:57 -0300 From: Ezequiel Garcia To: Jernej Skrabec Cc: mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, samuel@sholland.org, 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 Subject: Re: [PATCH 3/7] media: cedrus: Improve error messages for controls Message-ID: References: <20220620175517.648767-1-jernej.skrabec@gmail.com> <20220620175517.648767-4-jernej.skrabec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220620175517.648767-4-jernej.skrabec@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 20, 2022 at 07:55:13PM +0200, Jernej Skrabec wrote: > 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); > -- > 2.36.1 >