Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1339369rwd; Thu, 8 Jun 2023 16:44:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67yZD+LexQdysY1QMH2PTxVJD/EibPNl+qtsaqdT1uBmZ9b1J4Tg6za3uXDDOji+UjfUV+ X-Received: by 2002:a17:902:d2c8:b0:1b2:5070:c1c9 with SMTP id n8-20020a170902d2c800b001b25070c1c9mr5504966plc.20.1686267842526; Thu, 08 Jun 2023 16:44:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686267842; cv=pass; d=google.com; s=arc-20160816; b=N5IFjwz3hGZWhShFg3nwu8W6Smu+Ucq80iHPp3psznq7p0rBUT+fspI2uAW1fInJcA zzGzq55SE+/bk1FPpz8LM1/dEzT4NW8vs0Acwqo8hVkSP3iY4iOx6odSw4+uWHrplSRl IebZc7XBMfbstTkLI4HQtjTsFzaaczg81AtRl/mDy1OvCUqNd4iRlJVMZy6lIORkkZs+ BFLsetnvl8Hz3O/ZviIv4CZoN5Po70Al4nECjijslp+x8QsHkjWIRpVCU96vw+RB93Qn 1eg3/1o7lPY+/tsMNTsEPgeOUKeb9J4Y8KTUjWFMnOb+1PSvOJZWEIiRtZf1Spm2NbCG +L4g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=30ovn0dE2MI+5v90BQkqxTk9fgY/JH7R3CdcoYtwNxA=; b=I2OfkaXJW/lgPztE/Tr0blAZ3U2rq6FAWpKalZWBCIi6tUU2nRgiSE+YcekyeiJf7n pGy+82lx1tSkZhMSidvT4XlxjlNLEdwF5HOycpZo3uLavyraVv5K1lghOgzNd4hUAbvU V4kjQ8KKR7NcncjVuSty6/WGAiq+cJX2dqKzcSGd/Uu5KJtIICIJkK1OqfV3zHnTEC4n yU6lMnYxS0XuHUQkYIv0TLGcp5hUayKFlGovkSDlm23TX3zz2TsRKs64R2qjHugkn+Oc e0DjVuISY32Isc22mEmTR5HNFksSazeNzz+vJ9Uak9rDZPYtuo+ElQEA272pQ8+OJDfc ch3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=qtxjLsLs; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a17090a15cf00b00258d8f6eabdsi3451944pjd.66.2023.06.08.16.43.49; Thu, 08 Jun 2023 16:44:02 -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=@nxp.com header.s=selector2 header.b=qtxjLsLs; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236492AbjFHXKs (ORCPT + 99 others); Thu, 8 Jun 2023 19:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236258AbjFHXKq (ORCPT ); Thu, 8 Jun 2023 19:10:46 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2084.outbound.protection.outlook.com [40.107.6.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B75B30C2 for ; Thu, 8 Jun 2023 16:10:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BjoqRopW67Ds+wKZ55LJ6L3LgEJE52q8jXHXyCsFVU2Gn0KeGP5I4p0Dd2eXLJQPdNmkNfmZeeBzotUUUD9qDihWWEb6KPoTPomyOMrLnlkGfFGq93ZiHHHau/ziMcoLlczsC3a227jsj/NnnaTHWDIYo19CWkye0xOsSvB5MuTxmYPv7mUo+VQNv41lG2wm2XTOUgfhGID7vOYemLHx8fVZ+3grN+XE55Iwn9euemA6auYWrIxZ8bVrmO75aDKld1gGhcpiJCNkoWxZ1SiWAphg2fqI1BeOvzQMySbtQwscHXAR4LY0B3jv7m4LF+DpXgIaFihZik/3Jx6Xo/07ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=30ovn0dE2MI+5v90BQkqxTk9fgY/JH7R3CdcoYtwNxA=; b=Vt2JJ/ObNZXxKaIOKAe0po/3gjFBx41vkhvT0tfVnR5090caVlZx+6pNT59HSsGswsUA4DWVKjWk2cSbH90yEsAHikE//6Dhap9TsJsv81/A66sH9iNCRp3KjNlaPnB9ryy3qK9IEFhfGCEo9KAejQaQw/rn44kdm6yQ4druKnJ0c/wGKNzHJhfG7np6HujAu5FscZoLAzQ7g7srkeMUHNkbjUN0PyU1PQRMzaocferoSj2edzpjwFZCUxCToOIwAGsErzKN+QQaZJj5dUbueiO4wckBCdryMLJpuLogZYZ79ORRI72eJQb7fq1jHzl0t0ayZkpksMdrBhuEoZ714Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=30ovn0dE2MI+5v90BQkqxTk9fgY/JH7R3CdcoYtwNxA=; b=qtxjLsLsAIwXrvHELM8eMQN9OcEkBL0/LDptfczW/mgheehFDPJoV5dcCwR3EM18ABhwaYPJ6h7kQfwbcpNQrYbLp+d8b1A3JclQVC8Ah4zk+ly6tk7/XNvSoM9h+5IQ6yVUSvxqKr7s+WVLskgn+C+kzql8NrjUpyKvYNhsbrU= Received: from AM0PR04MB6289.eurprd04.prod.outlook.com (2603:10a6:208:145::23) by DB8PR04MB6907.eurprd04.prod.outlook.com (2603:10a6:10:119::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.36; Thu, 8 Jun 2023 23:10:42 +0000 Received: from AM0PR04MB6289.eurprd04.prod.outlook.com ([fe80::7aac:2f58:b7e3:2c24]) by AM0PR04MB6289.eurprd04.prod.outlook.com ([fe80::7aac:2f58:b7e3:2c24%6]) with mapi id 15.20.6455.030; Thu, 8 Jun 2023 23:10:42 +0000 From: Leo Li To: =?iso-8859-1?Q?Uwe_Kleine-K=F6nig?= CC: Nathan Chancellor , "kernel@pengutronix.de" , "llvm@lists.linux.dev" , "linux-kernel@vger.kernel.org" , Stuart Yoder , Laurentiu Tudor Subject: RE: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error reporting Thread-Topic: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error reporting Thread-Index: AQHZlJ98Oz9RTwIAQkWKphRxSM1C9a92K6+AgAtT7NCAAA9agIAABGng Date: Thu, 8 Jun 2023 23:10:42 +0000 Message-ID: References: <20230310224128.2638078-1-u.kleine-koenig@pengutronix.de> <20230310224128.2638078-5-u.kleine-koenig@pengutronix.de> <20230601154101.GA2368233@dev-arch.thelio-3990X> <20230601165945.f7itlyso4rbp2nbb@pengutronix.de> <20230608225355.3raozoq3v6teft7q@pengutronix.de> In-Reply-To: <20230608225355.3raozoq3v6teft7q@pengutronix.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM0PR04MB6289:EE_|DB8PR04MB6907:EE_ x-ms-office365-filtering-correlation-id: 2eee5afd-79fd-43b1-be61-08db687594e2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: gsus/8gw2MdDzLHSOWvuqR06/JzR7JDoacOLe7Oh2GW5oOwg8f3SPn43UfIjkZLCwuR404KX/uonuigIE2FfhIiHAa9PJHLgrZvivJKwz7soL/gKY0z69ydeHDgj6armRWV+ctBXlUvSsFgyi95FyZZ1FKzKLBQo1xvjnj1kBp9Sl9rTc/Ig3ao7uuIUZM3a9xsvDuK/9WD3EJnkUE76VRyMOho3ngQP8RneCnPG3woZAdpMTHvDt97xEWYJ166gSfDojCPNYClv3Ko4KdLZZDE0tsNXuW/TdKcj7PGtTvCfngY34w/JNteyIjO+pQFNuEAQ0PEIkt5p1Z1IUoWQR4qIpUEY2ir9tfy4r6XOdPKOfnnRz1vBz5w5clGaShQ+ciQdfMIsLHMBOjRfruchUk77/WlolilK1/T6x95cPAvH2j0/ZdVt+UGkS2cgE1fNgRsb9pQmw5S8gx0LFaeklfwdk4F9WrnX+XZeL1CR6ptj6NrXWKLLEr4ZoVMReEqio0EKZGBd0dQvfSXcbThaa9o/jKK5VcDp+PtEUgQ6qOj7xiM6ztylCD0UkKcKrUAAdxlELdRYPBVMQ5qEhkNARONegGPd6/30Fpp61HkAb1M= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6289.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(39860400002)(136003)(396003)(376002)(451199021)(52536014)(5660300002)(122000001)(55236004)(53546011)(38070700005)(186003)(38100700002)(9686003)(6506007)(26005)(66574015)(83380400001)(54906003)(55016003)(33656002)(478600001)(2906002)(71200400001)(86362001)(966005)(7696005)(66446008)(66476007)(66556008)(66946007)(64756008)(8936002)(4326008)(6916009)(316002)(76116006)(8676002)(41300700001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?H6Bg5ALv6rz+VvJRjqwmzXfYNWI24F3Gc/ekSPc49Kr3z3M85glNQEkr5e?= =?iso-8859-1?Q?FeSAOzA1NjRCncXNUQ5hjoOciXpiU/DPBTZGrp+7eXkdHwm5PiBKPEJwlL?= =?iso-8859-1?Q?RvZET1GFdac+WyOVJ08cZZFiTIOodcM/heCPQQIufB95UNfqUWHoZPho5e?= =?iso-8859-1?Q?zyuByhOT79nxDUk1eavFfrsv/yiTpg+Q8ZsbJ/4pFRF+NadlhCEV0VxO1W?= =?iso-8859-1?Q?0mipkRRJj0WqQWLBSxmbGUUtGSZHK04PtBXWqJGA4+cT8grlOIbXUBOa8L?= =?iso-8859-1?Q?JO2nNAUxndT+yZZQllCqXT5jsG5T+pAuExQ7Z8mKEAwLgCta2uWZubvcqd?= =?iso-8859-1?Q?DDK1E1Z7VVhv92fyyw3zV4TGTgIhPRDxuX9CtxwhFAR4Yac3K08Wfd9q/Z?= =?iso-8859-1?Q?yUJefPWqjutWFtEfqvXBOQ/65aJgt3G4B1bNprrl62mJlIQxMpUPF3ktEt?= =?iso-8859-1?Q?kg+H7mLMHgkLHOLcCz/ksVv1ljnZKnUp9zpLSXox/KcqVoEiA/dLwZB95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trK2BozUEaSZJJ5DNZiIQciHP5xZ4Hlkt+KD?= =?iso-8859-1?Q?vues0CDP5QL8gKLnZvrItoJfB/gfBmCcfP+VqyPPteK64mLGQ4SNPPAOFJ?= =?iso-8859-1?Q?U6rKkbqp7I/gQULXnqO0wSLXu3ljyrfcPnBxRD3jyVelrC/g0WwJ2u7w5T?= =?iso-8859-1?Q?DOYfn96MOAabt7nlIDW23KQuHRdkF/cL9JYcwFd+bIkx3rlvO4kTKjz9GH?= =?iso-8859-1?Q?LfH1wwZEvYPK4=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6289.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2eee5afd-79fd-43b1-be61-08db687594e2 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2023 23:10:42.0996 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BNqtAqOtKkhHfBxuJx+ujxHJ+I4MRebFoji+hptqKHfZe7kYeGAWXnCgAgUNkKbjDbgO3JnZ4Y0tlXDil3vC9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6907 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 > -----Original Message----- > From: Uwe Kleine-K=F6nig > Sent: Thursday, June 8, 2023 5:54 PM > To: Leo Li > Cc: Nathan Chancellor ; kernel@pengutronix.de; > llvm@lists.linux.dev; linux-kernel@vger.kernel.org; Stuart Yoder > ; Laurentiu Tudor > Subject: Re: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error > reporting >=20 > Hello, >=20 > On Thu, Jun 08, 2023 at 10:00:13PM +0000, Leo Li wrote: > > > Hmm, clang seems to be right, and I just confirmed that gcc > > > (arm-linux- gnueabihf-gcc (Debian 12.2.0-14) 12.2.0) doesn't emit a > > > warning. :-\ > > > > > > My approach would be: > > > > > > diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c > > > b/drivers/bus/fsl-mc/fsl-mc- allocator.c index > > > 0ad68099684e..991273f956ce 100644 > > > --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c > > > +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c > > > @@ -103,14 +103,15 @@ static int __must_check > > > fsl_mc_resource_pool_remove_device(struct fsl_mc_device > > > struct fsl_mc_resource *resource; > > > int error =3D -EINVAL; > > > > > > + mc_bus_dev =3D to_fsl_mc_device(mc_dev->dev.parent); > > > + mc_bus =3D to_fsl_mc_bus(mc_bus_dev); > > > + > > > resource =3D mc_dev->resource; > > > if (!resource || resource->data !=3D mc_dev) { > > > dev_err(&mc_bus_dev->dev, "resource mismatch\n"); > > > goto out; > > > } > > > > > > - mc_bus_dev =3D to_fsl_mc_device(mc_dev->dev.parent); > > > - mc_bus =3D to_fsl_mc_bus(mc_bus_dev); > > > res_pool =3D resource->parent_pool; > > > if (res_pool !=3D &mc_bus->resource_pools[resource->type]) { > > > dev_err(&mc_bus_dev->dev, "pool mismatch\n"); > > > > > > > > > Should I prepare a proper patch, or is it possible to squash this > > > change into b3134039c5b3cf879841e3ec84c8cbf7675554ec? > > > > > > @Li Yang: Please advice. > > > > This looks fine. Please send a new patch and I can squash it to the or= iginal > commit. >=20 > I did send a proper patch already, see >=20 > https://lore.kernel.org/all/20230605112025.80061-1-u.kleine- > koenig@pengutronix.de >=20 > You can apply that on top of the broken commit, or if you prefer also squ= ash > it into the offending commit. Note that in the above thread there is anot= her > fix for an older commit. Thanks. Both look good. Applied for next. Regards, Leo