Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp799960rwl; Wed, 29 Mar 2023 08:37:18 -0700 (PDT) X-Google-Smtp-Source: AKy350Zp/99evNG2u3I+K7BmZn0bYZ5R+C8rYLiS8NsyAnR1JTIJKnmSxipltPiw8NXnDfrUIH9T X-Received: by 2002:a17:907:2bd5:b0:931:f9f8:d4ea with SMTP id gv21-20020a1709072bd500b00931f9f8d4eamr19482487ejc.53.1680104237968; Wed, 29 Mar 2023 08:37:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680104237; cv=none; d=google.com; s=arc-20160816; b=Xx6MWlTNcwIS/yfNpKVd21fcLtGBD+XYgls+/kn+o4PpQV1h9AYdFHFKVIuFUufm8x pbtSGvehbaQ4/BhvrNw65361qEQ5wrMopBetw8RUEUQFLrgRuUCOBm4jPj8U1XmfUrOi 3qZx2qmQ8vouJNwyd+QJslIeC3hbfTOOEnijB298/Mv8XlldAd+bMxQzkZ5BCaui1h4L 6Ro4/QgwpA9uKBDttOT36E8iwYBNyIxv0p3bmim7j9OjRNof/f+n+SywdgmnlMWfShIF u4cWumEPrOMeJSk5YRbV50bKxURhBEc9fDEh0I8CjJkhpOBqy8eUsUl1Ge392S5vnLNC LS5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=IaKtsc9UQdDqeYVZzgAF5x6c9vKlyOHHrwHbh/3/jR0=; b=IJLhjaGkevEw6EEh1nnXxv9V1bdnmqD4GrZNg+NUWRWIdXRJw51M+H9DaX4vbvhGJ9 PBy+Iw3HClXBhNKC2RzJn/1TSKPUI2BmQ+EfWCaPrnw/csmYOfBRfAulMhiGxRq1yfja M+sXXlNyeSBiurhwxRPLIGVlC1rUUpWQh0T1JzaG18KnXUpBilShn3dY9fZ0LmbI51sO /kuFzTxkr7XWtBNUrE+2N9ZdwkOxXfFMKBp3ybxJnyPik5qvGQ7RTbYwl/d+nQ3aMsC9 9o+rTwyrWT4ObRtputqgD0tngjd9sjjsyYqan4Z3KuyR+IPRcD4d1IOi7NsEGgRXMwkV OZ6g== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170906240500b008d7983495b4si26347712eja.971.2023.03.29.08.36.53; Wed, 29 Mar 2023 08:37:17 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229704AbjC2PgT convert rfc822-to-8bit (ORCPT + 99 others); Wed, 29 Mar 2023 11:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjC2PgR (ORCPT ); Wed, 29 Mar 2023 11:36:17 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAF2555B1 for ; Wed, 29 Mar 2023 08:35:38 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-54184571389so299983507b3.4 for ; Wed, 29 Mar 2023 08:35:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680104076; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RUMIPPhWmbOod7a8dH8XtYFyKZRtnp1P9P4vDBHhORY=; b=A7hvvKLmTNoCNkKtmldEiN4VoxQX2t251RDs5U61UJiNCKVY30939RiVpOn+Q6PI3B aPuH2/W9DAhLJ1JilbJkkgGbE+y973mugY6r79r4NS7bFjxUB0pgP7pFQjklVyBzNJU1 +s3wabKEe1k1owRweG4j4l7XS8Be8QWTDtAEQwE9Cpa6AD1Kc7D1oarJAT5WRjfVUxlm TZ8J3QZ7M8xe6ZMg5+sI/qmMkQHTVtnH2NFiZc3o7LGxssRXD8eaBwwp7pnsl42dtH15 HlOWxwwg3hg84hqtFHZqAvKRnaglfyVEYf1gBj38M7xHX7hEQuKaqkWBWu7c9Xy0LBEB lnKg== X-Gm-Message-State: AAQBX9cFsbHUbWUOLQoNzQhbln371VpVraFk5RYN9yz9XyPg9mQ+QGMS odYRTUBvN3ByWlI7SqtW2Ae31O0As4ZvRw== X-Received: by 2002:a0d:ddd1:0:b0:544:f952:2184 with SMTP id g200-20020a0dddd1000000b00544f9522184mr23596675ywe.44.1680104076090; Wed, 29 Mar 2023 08:34:36 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id da12-20020a05690c0d8c00b00545a08184efsm3050194ywb.127.2023.03.29.08.34.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Mar 2023 08:34:35 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5456249756bso299924287b3.5 for ; Wed, 29 Mar 2023 08:34:34 -0700 (PDT) X-Received: by 2002:a05:690c:b94:b0:541:698b:7bdb with SMTP id ck20-20020a05690c0b9400b00541698b7bdbmr1638553ywb.2.1680104074757; Wed, 29 Mar 2023 08:34:34 -0700 (PDT) MIME-Version: 1.0 References: <20230329071405.1568021-1-geert+renesas@glider.be> <2w7rzdbzbii4ewliym6qw4svf2mzptsccz23yms5lsdioflcti@w63kwgzkra6r> In-Reply-To: <2w7rzdbzbii4ewliym6qw4svf2mzptsccz23yms5lsdioflcti@w63kwgzkra6r> From: Geert Uytterhoeven Date: Wed, 29 Mar 2023 17:34:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -next] dma-debug: Use %pa to format phys_addr_t To: Jerry Snitselaar Cc: Geert Uytterhoeven , Desnes Nunes , Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, kernel test robot , noreply@ellerman.id.au Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Jerry, On Wed, Mar 29, 2023 at 5:03 PM Jerry Snitselaar wrote: > On Wed, Mar 29, 2023 at 09:14:05AM +0200, Geert Uytterhoeven wrote: > > On 32-bit without LPAE: > > > > kernel/dma/debug.c: In function ‘debug_dma_dump_mappings’: > > kernel/dma/debug.c:537:7: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 9 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] > > kernel/dma/debug.c: In function ‘dump_show’: > > kernel/dma/debug.c:568:59: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 11 has type ‘phys_addr_t’ {aka ‘unsigned int’} [-Wformat=] > > > > Fixes: bd89d69a529fbef3 ("dma-debug: add cacheline to user/kernel space dump messages") > > Reported-by: kernel test robot > > Link: https://lore.kernel.org/r/202303160548.ReyuTsGD-lkp@intel.com > > Reported-by: noreply@ellerman.id.au > > Signed-off-by: Geert Uytterhoeven = > > --- a/kernel/dma/debug.c > > +++ b/kernel/dma/debug.c > > @@ -534,11 +534,11 @@ void debug_dma_dump_mappings(struct device *dev) > > if (!dev || dev == entry->dev) { > > cln = to_cacheline_number(entry); > > dev_info(entry->dev, > > - "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%llx %s %s\n", > > + "%s idx %d P=%llx N=%lx D=%llx L=%llx cln=%pa %s %s\n", > > type2name[entry->type], idx, > > phys_addr(entry), entry->pfn, > > entry->dev_addr, entry->size, > > - cln, dir2name[entry->direction], > > + &cln, dir2name[entry->direction], > > Won't this just print out the address of cln declared at the beginning of debug_dma_dump_mappings() each time, instead of the value > returned from to_cacheline_entry() ? The physical address is passed by reference, cfr. https://elixir.bootlin.com/linux/latest/source/Documentation/core-api/printk-formats.rst#L231 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds