Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp565741ybl; Fri, 16 Aug 2019 00:03:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyD42ZXeBX5zjB8GkOvG8EyvIttQCv6eSqNxowvWZD6ZWscEsMnRHBjOeuTEbeu7AX2ipvC X-Received: by 2002:a17:902:f096:: with SMTP id go22mr8101765plb.58.1565938983420; Fri, 16 Aug 2019 00:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565938983; cv=none; d=google.com; s=arc-20160816; b=MeAIoUCaclC62aJgVgkkncWdPwp+lUaxd3a0B3ztT3usxXbcr1wtg1hTIyt1iJql+L JVnMQyd9Gpdrodg1B01eqFo/LEp6vLOmgxJ2oriwpK5TqSnkh1Zg7dl5V/o093yJEJAl 5seGCTz+lGRWYUxxOYS0OVed4N7xFiE2UiXFAjo2ir5MilZIo/dy/201PK7IQPFqKXNN itPP4AoUZdjGoQ+7t8PkZdg8g5gfCSLNZsMVG9KmOojH6uDXg7NjZtMGs5Je/LblXFYR sR74Yq7P6KXbGQ+kK1J27O/U0aS6S1haATicEFOqcAXuW+ucjHjdYb/CRk6FFhw/pmwJ yxVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WWDcS1MtmkAPxQpLDIQPln5wnsWSy27rRb70gzCDixU=; b=mjHFZ7A4VD99+wPE9PJu5EEHa+JO3y5a1nrRhBMIznekN+att2rUUa1Mil5wMYNpxG HGbnBvSIshnP2nQW3rDHlv0bXw2kNalL/Uq+HmxYdnO7b6vudNfWJSSWVBy7NXPjrfgY WdjosPlVYkiNyYd1ay79r/+eeWSmSdtTQxZ6El3Cr+hsv+GiKYPa8V+ZwTCZ5OXN5n8Z 6tdAbIqLtG/woL9qv7GkbOp1OT6/LG7tsgucX859thWPDxpWswREx/X/W0eZUEm195zq Hqt57Ig140NWHwrf9poIOa3a45OsepOmlAdQoeUgH+yKtCWWbIohYa9mMOWvvwIHQgQm dNuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CsAKE+2X; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s23si3237520pgq.516.2019.08.16.00.02.42; Fri, 16 Aug 2019 00:03:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CsAKE+2X; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725945AbfHPHCk (ORCPT + 99 others); Fri, 16 Aug 2019 03:02:40 -0400 Received: from mail-pg1-f173.google.com ([209.85.215.173]:43277 "EHLO mail-pg1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfHPHCk (ORCPT ); Fri, 16 Aug 2019 03:02:40 -0400 Received: by mail-pg1-f173.google.com with SMTP id k3so2465344pgb.10 for ; Fri, 16 Aug 2019 00:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WWDcS1MtmkAPxQpLDIQPln5wnsWSy27rRb70gzCDixU=; b=CsAKE+2XFHczapDtYLQMpdAdya4ovVmg0OrT93AWcTGkpueJj+wCuoBVvWt5RDsVSU QwmwfNa6KY1Bi5fEbXpval7RHUDW3uk25bnJ67kmEIxZer2R2TtnDhpB7J+QIufgwBAS A38mQPWzmYcRMt/MXKvql7Luc6jIdzz4RiL/bhIMJ+aqofuXQxWUob9rdqu2VfejkfHf Vo5rmPntxJplKK3Jk69UhpgP92VOfmIMBHno2R+6juzExnOgx5iJCf1B9VYBvMQVeSao 33tdwoxian/XnA6NcupijgqRyA+HrFOZeDFU9eoOOnriV77v4muRB9hyKfTYiD9Uv1Gx 9ovA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WWDcS1MtmkAPxQpLDIQPln5wnsWSy27rRb70gzCDixU=; b=OmgbkthHRpxcNAnva/w46C0Tn+Tct+OBT/xCtIBsoHsvip+fyjsekTJ8MLlGcaI9jd WYQRnkjn5JkIiPyF97tWgpYB3UC3y04lPdxAcTEl//CxF0ebyk+JalLa85+Xnwq6WU2n G/xhk+uMozOHNH1f6x3EaxKCrX6ME4rrbWW/hKYSZ4tkEnsjOLaqNM8iBPMRBzorlyIs 2cjhd1rH05AeLgrUkGjNNKVPKuAuZ4mCJmtewdMg7R2L/4drcUzsli6lrmfMP2Yzrsll LgAVKimFrVbJnfUNexgYq+dSYlk5WkX9+nqgnlQybgqGUifzb1xjO8+FgPL3iJjnyYb+ XCmQ== X-Gm-Message-State: APjAAAWhFF2WJ3HQsOrVQKA9eliRjaJW/Ly5At4UCQLuEPoJPZZW3Ljy frDTvY044gr9K2WM36Q0VT1b62WeMr7QVF9Jo6QbrGW5W+U= X-Received: by 2002:a63:b10f:: with SMTP id r15mr6421028pgf.230.1565938959380; Fri, 16 Aug 2019 00:02:39 -0700 (PDT) MIME-Version: 1.0 References: <20190815120313.GA29253@gondor.apana.org.au> <5D556981.2080309@hisilicon.com> <20190815224207.GA3047@gondor.apana.org.au> In-Reply-To: <20190815224207.GA3047@gondor.apana.org.au> From: =?UTF-8?B?T25kcmVqIE1vc27DocSNZWs=?= Date: Fri, 16 Aug 2019 09:02:27 +0200 Message-ID: Subject: Re: crypto: hisilicon - Fix warning on printing %p with dma_addr_t To: Herbert Xu Cc: Zhou Wang , linux-crypto@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Herbert, pi 16. 8. 2019 o 1:52 Herbert Xu nap=C3=ADsal= (a): > On Thu, Aug 15, 2019 at 10:17:37PM +0800, Zhou Wang wrote: > > > > > - dev_dbg(&qm->pdev->dev, "QM mailbox request to q%u: %u-%pad\n", q= ueue, > > > - cmd, dma_addr); > > > + dev_dbg(&qm->pdev->dev, "QM mailbox request to q%u: %u-%#lxad\n", > > > + queue, cmd, (unsigned long)dma_addr); > > > > Thanks. However, to be honest I can't get why we fix it like this. > > Can you give me a clue? > > dma_addr_t is not a pointer. It's an integer type and therefore > you need to print it out as such. According to Documentation/core-api/printk-formats.rst, %pad is the format specifier intended specifically for dma_addr_t [1], so perhaps the kbuild robot warning was in fact bogus? [1] https://www.kernel.org/doc/html/latest/core-api/printk-formats.html#dma= -address-types-dma-addr-t > > Actually my patch is buggy too, on some architectures it can be > a long long so we need to cast is such. > > Cheers, > -- > Email: Herbert Xu > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt