Message ID | 3d3d969d-651d-4e9d-a892-900876a60ab5@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-75971-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:aa16:b0:108:e6aa:91d0 with SMTP id by22csp61423dyb; Wed, 21 Feb 2024 22:14:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWczGvjb6z+29+qX70eFKD6PnNgmZqjj0kQWu3c9pbUeMXXjK8dqBaNU/dDPNeYYnOdttrr6k1+5CNAzM/aV/rlE5DbgQ== X-Google-Smtp-Source: AGHT+IGE/oCvKt+NBt/suWrBc6JLuY1Z+3wIpMIpDeLOmH2IRvn/s9ihQWekbJCJLNlC8PX3Dev4 X-Received: by 2002:a05:620a:120f:b0:787:6de6:cc64 with SMTP id u15-20020a05620a120f00b007876de6cc64mr8721799qkj.12.1708582466949; Wed, 21 Feb 2024 22:14:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708582466; cv=pass; d=google.com; s=arc-20160816; b=pa6FUSNGWpb32Q1laCwEji4hWEAWV3nnDAZfmgBWSdJvgvPt1RX7KF4/MMvvEsJqMV JTLzaz0qL6K/uhK3BiGV5TPtDnwubn7kO91Tx3f9mCsGumnC7GMWf/VFSvy4AhqVQxUW 4NWkogpWK46i1CrkVnVIS/XIkQ+rFZWRd+0C4v9G6XGIuoFI3xkIe1jJFThIodtxQ3bJ SK5BF9zWoC6078eVkOS5HOfuFS1BtIfYrfo5oGHpI2GXtsFvh1jafrKdmXupjO4YCI40 hHMpjr2JAuu+5LW9PYighn3sSD3AH39OewnGuPLiucbUmeyTCfPwNOiPHMawrUWcyhjT 4CvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=4SC+H9Oulb2l4KVayVXMGit73eWaz8qeCs2MKjcvOvk=; fh=gtt/pDTRpM6tC2oWFZ/LxWr4/94BtrfOhR5nh3NoIsI=; b=v9iqWKJU0I7hA7IAcgkOkDKW+OTQU43PWnQjjvuC1fD446zY0Rjf10gAYNoYXlWZ14 6l7Y07K9Tf0igOqoMMm9UVt6F6sq2JHPqwUZdnMsquLAhSAdHY3MX31Y7T7xgKMSjnVr 7GCo4qjePM9xXkKCfMELeoL4EK0/MhHwausP+cmXFuIiyTiTEuRJDtDtF1Xvik96x3Q8 UNYsOomNbqkjvq4excWKpUwfMjJ4Oe7zBZaPKWjdDIr7vzzngvD0eBkqPy4M1suS2a4j C6tLve2l0nPRVx68p2T9bY4eTNG/hvoaOJQsbbioufTq+EVGTveHteVE6nR/wR8jm4Jj Xi8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZssiwUOS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75971-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75971-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d6-20020a05620a240600b007879eb9335bsi579466qkn.96.2024.02.21.22.14.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 22:14:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75971-ouuuleilei=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=@linaro.org header.s=google header.b=ZssiwUOS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-75971-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75971-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 BADA91C218E8 for <ouuuleilei@gmail.com>; Thu, 22 Feb 2024 06:14:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2218F1799C; Thu, 22 Feb 2024 06:14:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ZssiwUOS" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.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 4D834134A1 for <linux-kernel@vger.kernel.org>; Thu, 22 Feb 2024 06:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708582450; cv=none; b=tBQIEscnKGDe6sv9qYnkaf8PuJ2rClYn7VKyZIeukqaPgfeVNSf9GraqehB1sVDjCK5FawEAENlwplpzvODSxPkswEutTP1VlNupdZOBYFrRoWvDWGAK6Yi0uBdnqdP2cZiZyGO3rgfeNdIWmU8FxK7AIDwRltBtq6nL1hqyTaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708582450; c=relaxed/simple; bh=bn5i7/H5MiGU8X0jDHY08Xk8tKztkxjuCmvj7DxUVWU=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=rcKLKjWf9ScKAgrkr0cd0xHPLC7G81qcrSkjCAKMrCJ6nFbNh/62LzZHg6wLLtWOPA2kfP0c2i2nyf9pbd5L2rJIIGlZ3zXAT4FjDlWD1AwBDrgSWVeVHIKb4KUTIOw2ZFr9ktLNl4xUqHFw130p34sPvFbeGDbZdh1vhvk4jT4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ZssiwUOS; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-512bce554a5so4856260e87.3 for <linux-kernel@vger.kernel.org>; Wed, 21 Feb 2024 22:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708582446; x=1709187246; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=4SC+H9Oulb2l4KVayVXMGit73eWaz8qeCs2MKjcvOvk=; b=ZssiwUOSH8jikzJYq8ZcP5uGGi6D0dmW7qLMtDVUrOprFj/imhE5lg8l+2JBrT+1Ja jo+dQATSr2viMRGoeXXXZdBuw3hgeLLWfudCiYtdRR9glVeZslvFJqeaxuLyEPGR3Z+6 EVv9XO/cS4V1lTlYl3SP8X8JI9SJONBpwCOBBjYDIzyoRLQMoV8FNTQgzVv7mxLzKHRN 29pK2BNotffTu44O84ADPTQohNQDHcWrpVx6ckGqkg4avFKqTDD4DuLTqXRqoQJqheI4 CBgUglcOQ/9SDcg3YsyB06Xjs91+Nza1AcoG548haDqPcO3ZkYZ794PNYwaxd+cn+cql lZ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708582446; x=1709187246; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4SC+H9Oulb2l4KVayVXMGit73eWaz8qeCs2MKjcvOvk=; b=mVLNy+BrWYL4Qr3MutmrZD1b/tWz9U9FHw1RBQT6WHgZtL3ezA8WMgchUxxn3dkuM8 8lESLw0KYagnwoH3Vg6Zu0OGslvcccB5GGPpea4TauPbcb01hsdXxfGxufnEjamnC+VG B6KMlzVjhHBEqVuA3l9AW4tq7mEdNPo+uYtaxVa9rXA/X2W+JFPPxlSlenzHT8nK9pIw prnN0TiqIUt+r/WU11nz47pBxiudWJ9j++G27zqXF/JrDFCyDSFggUlQm4DIX0oDvfGk jtlPLdGBs7QhxEp2JyqKDjRKcEOfasLQl3+NjiYIacHiZGeuhXSwN50tpHobVQoYk2sy AHxw== X-Forwarded-Encrypted: i=1; AJvYcCXn3vXkCPzC6DTWZJX2B2JrJAPluyuMzJ4I3Qjfic0qfdcd5DJWDRQp0LoNd+QSWsshDbMiY2hYMsZ6NFpzGTZPBm8dQHffNfDFvQtM X-Gm-Message-State: AOJu0YyicskSO3EAmLr+K4iZXski0pvv5EjCLVKa5/uh/udptlggVGAH lNjLJ1brYHpzPU4hkmqvrbbo24YZfO6YeDoTCpr4aORqC1VTc/vhEZKEmupRzFY= X-Received: by 2002:a05:6512:3f06:b0:512:8d30:6dce with SMTP id y6-20020a0565123f0600b005128d306dcemr14162544lfa.52.1708582446477; Wed, 21 Feb 2024 22:14:06 -0800 (PST) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id u7-20020a7bc047000000b0040fe4b733f4sm4867924wmc.26.2024.02.21.22.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 22:14:06 -0800 (PST) Date: Thu, 22 Feb 2024 09:14:02 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Davidlohr Bueso <dave@stgolabs.net> Cc: Jonathan Cameron <jonathan.cameron@huawei.com>, Dave Jiang <dave.jiang@intel.com>, Alison Schofield <alison.schofield@intel.com>, Vishal Verma <vishal.l.verma@intel.com>, Ira Weiny <ira.weiny@intel.com>, Dan Williams <dan.j.williams@intel.com>, Robert Richter <rrichter@amd.com>, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] cxl/hdm: Clean up a debug printk Message-ID: <3d3d969d-651d-4e9d-a892-900876a60ab5@moroto.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791578568525359699 X-GMAIL-MSGID: 1791578568525359699 |
Series |
cxl/hdm: Clean up a debug printk
|
|
Commit Message
Dan Carpenter
Feb. 22, 2024, 6:14 a.m. UTC
Smatch complains that %pa is for phys_addr_t types and "size" is a u64.
drivers/cxl/core/hdm.c:521 cxl_dpa_alloc() error: '%pa' expects
argument of type 'phys_addr_t*', argument 4 has type 'ullong*
Looking at this, to me it seems more useful to print the sizes as
decimal instead of hex. Let's do that.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/cxl/core/hdm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 2/21/24 11:14 PM, Dan Carpenter wrote: > Smatch complains that %pa is for phys_addr_t types and "size" is a u64. > > drivers/cxl/core/hdm.c:521 cxl_dpa_alloc() error: '%pa' expects > argument of type 'phys_addr_t*', argument 4 has type 'ullong* > > Looking at this, to me it seems more useful to print the sizes as > decimal instead of hex. Let's do that. > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Dave Jiang <dave.jiang@intel.com> > --- > drivers/cxl/core/hdm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c > index 7d97790b893d..0b1843631b26 100644 > --- a/drivers/cxl/core/hdm.c > +++ b/drivers/cxl/core/hdm.c > @@ -518,9 +518,9 @@ int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size) > } > > if (size > avail) { > - dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size, > + dev_dbg(dev, "%llu exceeds available %s capacity: %llu\n", size, > cxled->mode == CXL_DECODER_RAM ? "ram" : "pmem", > - &avail); > + (u64)avail); > rc = -ENOSPC; > goto out; > }
On Thu, Feb 22, 2024 at 09:14:02AM +0300, Dan Carpenter wrote: > Smatch complains that %pa is for phys_addr_t types and "size" is a u64. > > drivers/cxl/core/hdm.c:521 cxl_dpa_alloc() error: '%pa' expects > argument of type 'phys_addr_t*', argument 4 has type 'ullong* > > Looking at this, to me it seems more useful to print the sizes as > decimal instead of hex. Let's do that. > > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- Reviewed-by: Fan Ni <fan.ni@samsung.com> > drivers/cxl/core/hdm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c > index 7d97790b893d..0b1843631b26 100644 > --- a/drivers/cxl/core/hdm.c > +++ b/drivers/cxl/core/hdm.c > @@ -518,9 +518,9 @@ int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size) > } > > if (size > avail) { > - dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size, > + dev_dbg(dev, "%llu exceeds available %s capacity: %llu\n", size, > cxled->mode == CXL_DECODER_RAM ? "ram" : "pmem", > - &avail); > + (u64)avail); > rc = -ENOSPC; > goto out; > } > -- > 2.43.0 >
diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c index 7d97790b893d..0b1843631b26 100644 --- a/drivers/cxl/core/hdm.c +++ b/drivers/cxl/core/hdm.c @@ -518,9 +518,9 @@ int cxl_dpa_alloc(struct cxl_endpoint_decoder *cxled, unsigned long long size) } if (size > avail) { - dev_dbg(dev, "%pa exceeds available %s capacity: %pa\n", &size, + dev_dbg(dev, "%llu exceeds available %s capacity: %llu\n", size, cxled->mode == CXL_DECODER_RAM ? "ram" : "pmem", - &avail); + (u64)avail); rc = -ENOSPC; goto out; }