Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp678194lqs; Fri, 14 Jun 2024 02:16:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkjIPWKrmO+YkshzbnjhuRD0m9LJL8N2lr36oTMTnmfTk2LAittId+9mTVmzqwqkPDj7t7ff1rQDMX0W41v1Fn+bmkPemmP62Mw+Fy1g== X-Google-Smtp-Source: AGHT+IG1lMhlNLdrzEp6LvzkxisKX+DxRCQ6QSCMzqnhm4IxKVM4dqLvEKhCn1Cj51X8cM0Ul1Gb X-Received: by 2002:a17:90a:43c2:b0:2c4:bbd9:83af with SMTP id 98e67ed59e1d1-2c4db24bc6fmr2460943a91.19.1718356594033; Fri, 14 Jun 2024 02:16:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718356594; cv=pass; d=google.com; s=arc-20160816; b=YodhofQ+SQbFpT988RvLRtyGQR4N+prf6YM9IOAoE6dPkbqSHr8cmZp6bBU/zHt+Sv Kxoxp/tv9daH6dff/t0z6Kvussdg6YhCosu3Xb8TleVthl4hGPdgwwxS4Pmft+NTMAom 5BICEhFsdW+OREcG+pjt0ZAnSwC1jDexqYbtct+/HMuGuEPOPINCai1a6/AkjhB6f3sh +Xc2ChM63ap6TkxFeaAVFf+DqTwdWe2d3j4RjJiBU1IbEeRnrc3hEhifzsIT0EVtjpy4 v0s/D2HeCyDtjquAknW32NHyHCrZFkfGFZCzbRc6GDnIsKLqa8ncEWY3RYqsiT/fUHxx Z74w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=SuqvfsAxCA+jgecy6hs7ZPJ0qUifTMDLbWii6etDTFM=; fh=/1CFvn67j2JUoDJkpXUcOp07KQYxnumfuGmKGveX7Fg=; b=dpzzcqRWy3sfhhqrLIPEE0Gdjh61kEV+b+iCr1sgYgfvCfK+lPn14WVdJyZOfGnocG P7SYHJLkleYHjIM632Io9UqrQakD1QaFkmfCficRs+DqfZLNdvXIMJDLYeqpLo9IDW68 vg8jgJD9ndTezVHzG459GwgBPmeb9cYIBPbJKC5iPu75iuzsr6iIAQdfoU0BArPLoXyw kcOwex+x2CSWhzRh5rC7ozU4aqb8dmy3UBc8cXMBZtgevx8y7Vhf0NWdsoV5x3KUiM8L Wjq86sZQtB3oJ+PTXpRE2JT/hYanMGu/ge6gzA7YWsfDpd06RaYCdCS+LVT6AhIUuGg1 V04A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J1Cwqw2F; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4c47b1571si3254585a91.177.2024.06.14.02.16.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 02:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J1Cwqw2F; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-214614-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214614-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9BB6FB21D40 for ; Fri, 14 Jun 2024 09:11:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EDCB1922CD; Fri, 14 Jun 2024 09:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J1Cwqw2F" Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF0535FBB7; Fri, 14 Jun 2024 09:11:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718356299; cv=none; b=C/qaxBuauEiXdi+nLakEuPJZGt3w6CttV3vt/tXquvi0PCj158S4jxK8AYBOP8ifrkov88Am9bXGC9HTNO0DgmWhka4vG59YElf34r4TKdM3XgILwduYKqjcTJTZDUxCi/RRM/a75UMX+8kPVlXSwpK+qThpKYk/NxXply/6SjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718356299; c=relaxed/simple; bh=SuqvfsAxCA+jgecy6hs7ZPJ0qUifTMDLbWii6etDTFM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=gD68q/9htGiobJe4YfSjRd+z0peq50cnpTVoSMkyuwEMOVBDVhh4vW3PYq5LE5br0GGn6IeG2RvTF2fVENV5/fdw2zXf+F91narc6YF6MvIU0MLnQFjDfFyOEd6ihv7T0luNeeTD5/zzjNnpD40hEOVrot/LO8DtMVspFCY/hQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J1Cwqw2F; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-57a44c2ce80so2207926a12.0; Fri, 14 Jun 2024 02:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718356296; x=1718961096; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=SuqvfsAxCA+jgecy6hs7ZPJ0qUifTMDLbWii6etDTFM=; b=J1Cwqw2FT2zUz7FSWuX7Jc6hkXZ33FDXELnFn1Qbk6D9Opo6e152L5mQjB5ffdlv43 QcIMlRPgXafcJBpbrCe1UQlbNURtBgCG7XZpYdUABWLuB8y9/zClsTTRVPPQY7Nm3qE8 5In2utA7IBfrnWovaa8lne6e0KgFaMS/3w6Qe9sSvBRxObeBAlQkSOGRDLhvTMD7Bm4o Phdk7K31mWpHHB9YKrakPZnGBDCs4pjSCmmF9mW884bVpLVIdWCy4sJdQsRnNlPRg0wY 1I9KNwdpvYP+H1B5kbT4XFC1Jwc0aH+EgJBlU/mQUbyRm/jQcg85U5ogOSXZyVTWCx4A CI8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718356296; x=1718961096; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SuqvfsAxCA+jgecy6hs7ZPJ0qUifTMDLbWii6etDTFM=; b=KFqCaISs8VmIzOEp12i638HtRnkJ1x11D87jIJOYvhQW3Jh1F6Za604I3Dwf2ry2oa 30XkIUheSg1djGsM3qXeW+Q6KRifeYKYnOqtVQb+33dFZb1npGfp4E4kLk+/B98MHO6K bGqbxirORW35CTs98MuUiVIgdIRK55kUuOCLWQUqgGpCNMXOerEWN4j1/18kbb1QZSNc JDcwBky1uyl/NgaFHA6a7RLaqSdANASZVzMHCWCUGgh8ymRepYdlz85WQ3svXFiIr0Q4 X6Cw8naxGQQ4ubnFFHXz8o+WTtO6d9Nz6+iamuQz3FhgSGci+K5+8A33K5yFPIcbvlK0 y+/Q== X-Forwarded-Encrypted: i=1; AJvYcCU/sfLsalK/iPalc4z6dG8RrgUeJJDGzV2oDJ7SXHufTDgi3OcyGgJFVf3H+2CQCSEUisoXJS8aFSDcmojmaSjXF/IpMmP1oTsNPwGB X-Gm-Message-State: AOJu0Yx16hnMn7Cpgqa4JJVNo8H4/aFLH8vFK/UbhJmAe60yvht1mmqm mSzRFiTFCfsoPYrtBylQiB78fFBMnOGwvnodlxDTG/1MBJrYW/UC X-Received: by 2002:a17:906:b28a:b0:a6f:11c9:f349 with SMTP id a640c23a62f3a-a6f60d29731mr153670166b.23.1718356295500; Fri, 14 Jun 2024 02:11:35 -0700 (PDT) Received: from nsa.fritz.box ([2001:a61:35f9:9001:40df:88bb:5090:7ab6]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ecdcfbsm162508066b.109.2024.06.14.02.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 02:11:35 -0700 (PDT) Message-ID: <57d4659a5abb63d7c085865059b9d71c40371edd.camel@gmail.com> Subject: Re: [PATCH] iio: adc: adi-axi-adc: improve probe() error messaging From: Nuno =?ISO-8859-1?Q?S=E1?= To: Trevor Gamblin , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 14 Jun 2024 11:11:34 +0200 In-Reply-To: <20240613163407.2147884-1-tgamblin@baylibre.com> References: <20240613163407.2147884-1-tgamblin@baylibre.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 (3.52.2-1.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-06-13 at 12:34 -0400, Trevor Gamblin wrote: > The current error handling for calls such as devm_clk_get_enabled() in > the adi-axi-adc probe() function means that, if a property such as > 'clocks' (for example) is not present in the devicetree when booting a > kernel with the driver enabled, the resulting error message will be > vague, e.g.: >=20 > > adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with= error -2 >=20 > Change the devm_clk_get_enabled(), devm_regmap_init_mmio(), and > devm_iio_backend_register() checks to use dev_err_probe() with some > context for easier debugging. >=20 > After the fix: >=20 > > adi_axi_adc 44a00000.backend: error -ENOENT: failed to get clock > > adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with= error -2 >=20 > Signed-off-by: Trevor Gamblin > --- Somehow feel that in these cases the error log should come from the functio= ns we're calling but bah... likely not going happen/change: Reviewed-by: Nuno Sa (As a suggestion, you may do similar work in the axi-dac driver) - Nuno S=C3=A1