Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp191509lqe; Thu, 4 Apr 2024 04:04:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXNQqJ7MxLSXcgnlQ0z7VxNAg8OtlAJL71rqUH5BwJiaPRy2U9uJ69jhzsYWc03YIP/SwLMKjmeoF3nOkV8Lqi2Qju95h1raBGYa4lQvw== X-Google-Smtp-Source: AGHT+IHnA4fPw9vi9rjVY5r8Tjiwzf680guYNSGyauRpH7XHTKPeWAk7bEBAERgjyf7f7fpcDry8 X-Received: by 2002:a05:6122:50b:b0:4d4:1cca:1a72 with SMTP id x11-20020a056122050b00b004d41cca1a72mr1943033vko.6.1712228693098; Thu, 04 Apr 2024 04:04:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712228693; cv=pass; d=google.com; s=arc-20160816; b=zu1pgep0UeQHymaZ5+yIdf2RlNAF3hV/8zmR+lwHGfP3qVzmnQJekhiOA8jeHPITql Sc1cStJZ+jilfdkt4E7bJZHk0p/PEYLOP51J9m5cs5JkvVQ+dZaaAf7PPQllRolUIx0v Om+7QVimlqcVf7aqoRnRz2Y8qR6Z8B1lIdyhsFscqLlxfT5/CJxEwzsqbdm4ti4SSv1j jcxd+jE4dfVXy4L/HmQqOTtuTbILNSLNCwM66wn99eJfwETQrIb3hNnw4ym96uMwj+8z uZHgBs7gbiNzarpzR4h9jwUVxtvtRDtUWGmjTCQMcPTQyZAborms9wUZpezk/nhllHpI 0UXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=uWqk0JO3baIctyaWPjpfcs40ZE8bKsqU4sHSf23WV8s=; fh=4ZmU7bXFQGg/m62Go2Ycip7zrzRnugJtp/XWMMrbylc=; b=WVwv88XM3CwtREG5XBGcoKAy5OjalWuE4mh0+fsWaQ3nozDBmwR41HJN09mV/bfptR O0W0yIL0maFD67PNfpfDwszjsJcIIbMutcJDKwQyT29ZUAkwn3S2Kkj1WPrOW/o3lxBh bRZb4no/OBNUbwl1ENMT837UcRw2FbnpEt3qwRw7T7SI7LNGRd2X/TRlYTFuH+//yj9u l2mgfuJqtp+r590Ye+isEim160wn2ZCnuQQFxwphHZH2FTh5ox7PRPAU4wF4QIaO9oCG o5YhvFaMZW5N2lKntvtDC8eR93yTuiiTUSBdQuApZn6ABakOyp+0oINozPBB2vb+ob7O RkKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b=P7g4AvrR; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-131283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gg34-20020a0561221da200b004d88ff27f9csi2396754vkb.275.2024.04.04.04.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@analog.com header.s=DKIM header.b=P7g4AvrR; arc=pass (i=1 spf=pass spfdomain=analog.com dkim=pass dkdomain=analog.com dmarc=pass fromdomain=analog.com); spf=pass (google.com: domain of linux-kernel+bounces-131283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=analog.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B2F0E1C22D84 for ; Thu, 4 Apr 2024 11:04:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37D4A82C8E; Thu, 4 Apr 2024 11:03:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="P7g4AvrR" Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3EAF745C3; Thu, 4 Apr 2024 11:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712228637; cv=none; b=qsjIt93hUgEcr8CdjIHIKFkVkNdNg/XnB2+4mxsUvwvL2kXqeIMMumN3zizW/TWPzWeJiguaOkBCNMMoO6LyFnzwfjCQU5hIAurSF6EcDK3GqGHGn6ajpV0PS/iDkR/gyTj3EOQLmMhibidxABofiA3nEYaTSQ+kRiDJkCOVOLM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712228637; c=relaxed/simple; bh=87v1wghWfpMJ0bHVd3Jee9dLM2aOFzaMiSOSC+PXCsw=; h=From:Subject:Date:Message-ID:MIME-Version:Content-Type:To:CC; b=neRt1YeG8PbJVqwOlve8kgzNEXOyH99jpwnRTnEpwkvqUZDkH7nZw/rGy7AOP6jtPsDJystsu7J+W/xTl+qRy5G95lTcUcBXCFC8F3C6BrS8M0M7h6DqPDcbzG/wxUqoCJQI22TVhDSeMJjJc5rU7AwaJtI/LHkTy5e4U8G7yT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=P7g4AvrR; arc=none smtp.client-ip=148.163.135.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4348RPhE001360; Thu, 4 Apr 2024 07:03:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h= from:subject:date:message-id:mime-version:content-type :content-transfer-encoding:to:cc; s=DKIM; bh=uWqk0JO3baIctyaWPjp fcs40ZE8bKsqU4sHSf23WV8s=; b=P7g4AvrRy9w2BmdAYK+/BSIGVv3TdxZx4gq yAEIdRwJYSni54fBJZTaVCozv86UHkqwtH0tJ9ccPnGPevnoaRxXuc5NtwdQ3C0n KuwVcK4wClLTGM9XLFqPa//1QlcoLsWEYHZyEU5LVPF9yqi3jxRDDuXY2jDFH117 P9BMj9ih91VVJFjRCYQxAPdmfqb90ubk+BavXO1Xy1odmEqhSK+sszId04YiFgF/ lSUtyhUQFeT57iZvOv40oVHmo420WUPZiDJb3GKujUDHlb5sLT5hFVv3DpT87lvw V9i1+m7zi2e1KMMOrmKF+mSIsTRBD/mt7DYgm5bpihwwF7qQAIA== Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3x9eks2kxf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Apr 2024 07:03:20 -0400 (EDT) Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 434B3J4K018912 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 4 Apr 2024 07:03:19 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 4 Apr 2024 07:03:18 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Thu, 4 Apr 2024 07:03:18 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Thu, 4 Apr 2024 07:03:18 -0400 Received: from [127.0.0.1] ([10.44.3.56]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 434B2vc8008372; Thu, 4 Apr 2024 07:03:00 -0400 From: Nuno Sa Subject: [PATCH 0/4] dev_printk: add dev_errp_probe() helper Date: Thu, 4 Apr 2024 13:06:22 +0200 Message-ID: <20240404-dev-add_dev_errp_probe-v1-0-d18e3eb7ec3f@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAK6JDmYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDINRNSS3TTUxJiQfS8alFRQXxBUX5Sam6Zpap5qZGJslGFgbGSkDNBUW paZkVYIOjY2trAd/SrnFoAAAA To: Petr Mladek , Jonathan Cameron , Lars-Peter Clausen , Olivier Moysan , Jyoti Bhayana , "Andy Shevchenko" , Chris Down , John Ogness , "Greg Kroah-Hartman" CC: , X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712228790; l=1552; i=nuno.sa@analog.com; s=20231116; h=from:subject:message-id; bh=87v1wghWfpMJ0bHVd3Jee9dLM2aOFzaMiSOSC+PXCsw=; b=K5ua3M1fp8McUAe46RoYz9pu0EtKvriBWwVhiuiHthke0oFGOW89EfaiWWWY/dhw/qZlZF3rn ctenC+k3qtTAG83veAaaQttLKycdbk4bLf2UgKpXD7KJRnoeEMeonWr X-Developer-Key: i=nuno.sa@analog.com; a=ed25519; pk=3NQwYA013OUYZsmDFBf8rmyyr5iQlxV/9H4/Df83o1E= X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: gymPCS_wSV0XUHuI-F9ZCPIaml9eF14g X-Proofpoint-ORIG-GUID: gymPCS_wSV0XUHuI-F9ZCPIaml9eF14g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-04_07,2024-04-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=716 clxscore=1015 suspectscore=0 bulkscore=0 spamscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404040075 This series adds a dev_errp_probe() helper. This is similar to dev_err_probe() but for cases where an ERR_PTR() is to be returned simplifying patterns like: dev_err_probe(dev, ret, ...); return ERR_PTR(ret) The other three patches are adding users for it. The main motivator for this were the changes in the commit ("iio: temperature: ltc2983: convert to dev_err_probe()"). Initially I just had a local helper [1] but then it was suggested to try a new, common helper. As a result, I looked for a couple more users. I then move into dev_errp_probe() [2] but it was then suggested to separare the patch series so we have onde dedicated for the printk helper. [1]: https://lore.kernel.org/all/20240301-ltc2983-misc-improv-v3-1-c09516ac0efc@analog.com/ [2]: https://lore.kernel.org/all/20240328-ltc2983-misc-improv-v4-0-0cc428c07cd5@analog.com/ --- Nuno Sa (4): dev_printk: add new dev_errp_probe() helper iio: temperature: ltc2983: convert to dev_err_probe() iio: backend: make use of dev_errp_probe() iio: common: scmi_iio: convert to dev_err_probe() drivers/iio/common/scmi_sensors/scmi_iio.c | 45 +++-- drivers/iio/industrialio-backend.c | 8 +- drivers/iio/temperature/ltc2983.c | 255 +++++++++++++---------------- include/linux/dev_printk.h | 5 + 4 files changed, 142 insertions(+), 171 deletions(-) --- base-commit: 2b3d5988ae2cb5cd945ddbc653f0a71706231fdd change-id: 20240404-dev-add_dev_errp_probe-69e7524c2803 -- Thanks! - Nuno Sá