From nobody Sun Feb 8 08:27:40 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CB8DEB64D7 for ; Wed, 21 Jun 2023 16:32:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbjFUQcY (ORCPT ); Wed, 21 Jun 2023 12:32:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbjFUQcT (ORCPT ); Wed, 21 Jun 2023 12:32:19 -0400 Received: from imap5.colo.codethink.co.uk (imap5.colo.codethink.co.uk [78.40.148.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00230268E for ; Wed, 21 Jun 2023 09:31:46 -0700 (PDT) Received: from [167.98.27.226] (helo=rainbowdash) by imap5.colo.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1qC0jL-00CSw4-Jo; Wed, 21 Jun 2023 17:30:52 +0100 Received: from ben by rainbowdash with local (Exim 4.96) (envelope-from ) id 1qC0jM-0020GX-0U; Wed, 21 Jun 2023 17:30:52 +0100 From: Ben Dooks To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, akpm@linux-foundation.org, Ben Dooks Subject: [PATCH] devres: show which resource was invalid in __devm_ioremap_resource() Date: Wed, 21 Jun 2023 17:30:50 +0100 Message-Id: <20230621163050.477668-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The other error prints in this call show the resource which wsan't valid, so add this to the first print when it checks for basic validity of the resource. Signed-off-by: Ben Dooks --- lib/devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/devres.c b/lib/devres.c index 6baf43902ead..c44f104b58d5 100644 --- a/lib/devres.c +++ b/lib/devres.c @@ -129,7 +129,7 @@ __devm_ioremap_resource(struct device *dev, const struc= t resource *res, BUG_ON(!dev); =20 if (!res || resource_type(res) !=3D IORESOURCE_MEM) { - dev_err(dev, "invalid resource\n"); + dev_err(dev, "invalid resource %pR\n", res); return IOMEM_ERR_PTR(-EINVAL); } =20 --=20 2.40.1