From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (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 67F8E3290BA for ; Mon, 3 Aug 2026 15:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785771851; cv=none; b=VwMwKt4U+BXDZNOXhOjxE/qKUOPY5ki7tguGnx2Oi0Jig3rB3L+/wivlbnS+LhxXnYbSq27kRPEbog1TccFz7AXemsZ6NNBs/feyGblrvrt73KlJpIUmwFQ5slD6sSIBafP3PgaqhmvbK70KKkG0W+rFlTKkR9fmJGDfmHlY0EY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785771851; c=relaxed/simple; bh=U6WCpFIaj9Ldkepqa8ZWS4P81gu0qFQU3JuhIKF7jU4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aaSi38WoNOU80sQ/ujjY6eTwMdFM2h7tWKIloZsEyVEgMhJ2++AXGLscnSoVkAJPPkUDvu+rJ2OEW1QKBU3W4GJ+S/CExdaGZoKyhoUC/DJyhyaZ9BfupAAkmjbuzA76ieQMtaqsArOF6vpxpdoTWZFCRWfSj41s7+29GDkYkpA= 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=WgIcnbm0; arc=none smtp.client-ip=209.85.216.52 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WgIcnbm0" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-38511175ad3so2371604a91.2 for ; Mon, 03 Aug 2026 08:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785771850; x=1786376650; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=SrhAm/6//YgJz8cqJEcdVdktRz2BVD+nvXX5seWQO+U=; b=WgIcnbm0MGEqZhNqD+lDGMpFkxsflnV+REYcClgHgUhsW2sh6tdLC8pN1ONPd9Quv3 svUyldSCHIFSCWJyO7PPmCgIr64e5FI5npwhDj2WtgYkZpbX89pzilA6nqNFbhFxDoKE pRYB5DEXrrKy+Hz0JTkNGpFkCBktdJy8rIvDUI5WcfvkXLt9UiYwi1ROgV02IaUKp3vY NDqlNXrWdLf9ii2DCJFS1dco54Dova1L31TAZL4gqSlpx+9S5IWu+vfXJ5TnG/vvF1nY H4TBkdUlBkxRsg/5FQ5EcNbv6nQGihAqxbMWRckQHN6xadSecX9HGyR5Xxyy/Hmm3cq+ khJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785771850; x=1786376650; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SrhAm/6//YgJz8cqJEcdVdktRz2BVD+nvXX5seWQO+U=; b=LPix0lbI64D2qMujZlGicdnWEFfedMjYoVhrndnyxPNVzKaKCbvrEytYaFfAYOrj8s zJnuOOw/JifK4EbsOFw2XIC2WguPpO10zkvXbQ2crmJ8AEZ/uP9TZhtqBs1DeltSSMdo CQaHdkwt5V+UrqoBHjoN6vHwxKD/OWY77xyiyHz1ysLOF5878pElGWK+6j4wptsEr+19 Xr1HXN4Dj2GR3guBaDD+M7Ef1gL/2rFsTFeYIkZibbtc7rH6U3l5NJgLez3YbNqFAS23 WEwNDKhUMaauX9WYBRCkgDAu6Lv/gF5ztQnjgX8yhzjm8BoXzvAZjgile9ys0B1tHsNj 95kA== X-Forwarded-Encrypted: i=1; AHgh+RpgbaQ4zgjT6OmbkoX89QssEhBGzuQdgsCyh7IIaWMKCcFGqE2HYabqkNUkYuyCxHBf3ZqBg7Sk80lKkbM=@vger.kernel.org X-Gm-Message-State: AOJu0YyGtRY6XkeiERWRxYnpQ0AzECiPa2eK8h7QiSp7SuAJWZDYwgYG w2ad+s4Pb2EclWPQnT4xdyZaUKdKYX5XHGT709qAwej1BaI/SnJocqdm X-Gm-Gg: AR+sD12jLlCfHxejPmmGLPjrQph/ErOz04kP11t26cTRLI6UAE//WV86VlwEYR8DVLg oh/u++6GWlnfhchhA27zljcVJxhr2+vvrowkPvBaaWv9y7pFTrjyvq7YBQY37zzPwKBudNqTSrW Jr0rLw93JrhxhsDP1VLSxhVaai8e0v7slS4acDeOYXbhkF0zmYh89u/hTXU+6u07HL+r0NOUSUZ ElpuhhrYpQULBcdfi99pDrxFDj+wXrOW5IaNco5Dv1jnj42V2OELHHS0QLROPPN1C2hd78WBmGf UC7C3N79zPyFVAA4nxu5Ssc0zr2hficGeGGIRkPchdatBheQ8ynFFomwtcTbnTDAS58fVkxx3XW c3fCc4cPtM6kCjdys+sCdMhJUCDA+6jTn67urGlMvFxz0PB2aEE9q5nKi5eyKbK2STHQlJBh6HC 6UdxWkWRWc+/0TUXkqIZux3FJHDcowQQ9iEX0LPRWJ3pw1tmXZjtH+ERQwQtqMZhc= X-Received: by 2002:a17:90b:4d8e:b0:38e:a74:dfe4 with SMTP id 98e67ed59e1d1-38fbc534570mr9945161a91.25.1785771849528; Mon, 03 Aug 2026 08:44:09 -0700 (PDT) Received: from localhost ([118.34.230.2]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38fb2bae2efsm4191757a91.11.2026.08.03.08.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 08:44:08 -0700 (PDT) Date: Mon, 3 Aug 2026 21:14:06 +0530 From: shaikh kamaluddin To: Alison Schofield Cc: Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Robert Richter , Gregory Price , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cxl: use %pe to print error pointers Message-ID: References: <20260801101217.12778-1-shaikhkamal2012@gmail.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-Disposition: inline In-Reply-To: On Sat, Aug 01, 2026 at 10:13:16AM -0700, Alison Schofield wrote: > On Sat, Aug 01, 2026 at 03:42:17PM +0530, Shaikh Kamaluddin wrote: > > Make the code printing pointer error values simpler and address the > > coccinelle warnings: > > > > drivers/cxl/core/port.c:939:3-10: WARNING: Consider using %pe to print PTR_ERR() > > drivers/cxl/core/port.c:1275:25-32: WARNING: Consider using %pe to print PTR_ERR() > > drivers/cxl/core/port.c:1309:25-32: WARNING: Consider using %pe to print PTR_ERR() > > drivers/cxl/core/region.c:686:3-10: WARNING: Consider using %pe to print PTR_ERR() > > drivers/cxl/core/region.c:3778:13-20: WARNING: Consider using %pe to print PTR_ERR() > > > > The %pe specifier prints the error symbolically, so a failed dport > > addition reports -EBUSY rather than -16, which is easier to follow > > when tracing port and region setup with dynamic debug enabled. > > > > The PTR_ERR() uses in return statements are left unchanged. > > > > Signed-off-by: Shaikh Kamaluddin > > --- > > Tested with cxl config build in x86 Architecture > ^ Should this say "Compile tested only with cxl ..." > > > Hi Shaikh, > > Thanks for the patch. The code changes look perfect. > > I'd like you to spin a v2 of this for the commit message and log > only. No code changes. > > Commit message: follow CXL subject line format, start w uppercase. > ie: "cxl: Use %pe to print error pointers" > > Commit log: Can this be reordered so that the code improvement is > the reason for the patch and coccinelle is only the tool that found > the sites? We don't change code to address coccinelle warnings, we > use coccinelle to find code worth improving. > > Please take a look at and follow the model in this commit for your v2: > c69ca4e992e3 ("mm/zswap: use %pe to print error pointers") > > It would also be useful for the commit log to note that drivers/cxl > was completely scanned and that these are the only conversion candidates. > That documents the cleanup as complete and saves the next person from > wondering whether additional sites remain. > > -- Alison > Hi Alison, Thanks for the review and the helpful suggestions. I've incorporated them into v2. v2 link: https://lore.kernel.org/all/20260802112029.28767-1-shaikhkamal2012@gmail.com/ Thanks, Shaikh > snip