Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1726781rwl; Thu, 30 Mar 2023 00:13:01 -0700 (PDT) X-Google-Smtp-Source: AKy350aCmm/QmixLwEKlT1JdrQrRDV0+H27/XxLtEiJ2fYulBn+q/gci+dK8lZMGaDn55g1Hrtk4 X-Received: by 2002:a17:906:15c:b0:8f5:14ab:94bc with SMTP id 28-20020a170906015c00b008f514ab94bcmr19251010ejh.6.1680160381213; Thu, 30 Mar 2023 00:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680160381; cv=none; d=google.com; s=arc-20160816; b=jXcYJNd0cPKoN0A5NDFT99JmQZRoFedBBvzHZxVPJq203UBQVa/2R8fiHrVqkmrp3x 8P5rP8IJHecy9uGUwrvb2F3YVQrjM2EHOdjN+FCcvhkTUR8Det4qXoqIGyBG+bKKdIuq kqyuG2dq+jzSJNWIsHPfNj32kCc2GxAVUFpbaX82BVDe337jxiCNVPynrSKUuJSrgYjs 0Ml8J/oTutymcgdghlykXcsYSwoVnoi5S1Jw4Y5Ofa+nceqf2pvEDjbaa2NZLW4Y27FJ Qt18j40OOS5Sk0q8DziphAzNlqTbEAPKE/1NgCW/+UmY/7hPzjk0+WjKTxOUI8wWdBYg Bggw== 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=L1EMZiBJJkNQ1LdrwBbLBuhtxBD7S3WQAyfzzBYYrf0=; b=gKr/vfyt8OUBwU0fJdE5EeDO341ZbahErodC8YvyrYgVy94KMnRIlPkOQeokqUQuD1 FhTgMHuR4HXwgcCEx8mmNqu/maY0A6FTd2W9l8vw+xLW5upumr6tkm0icIOvI68jgM9k DSqLFdT5uTrF3vr2PE9EnZGuly//uYVHlfKPiF5UgYKrGqCCz5Y4ys0RUZPIDsCE/Q7K z38+/pBP3qeJduo/IUMd+Yj4cSV0niTiXFOsvlSAnEV2yBhpWgUZng0oqD2P1YYv1But e8siCCW/nA99EfMDVdulpNjIc6tfrZtakB6BQ3tWwwU7G6yj99zEHP0Lkn0UDHqH5XDV r/gw== 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 y26-20020a170906915a00b0092a4dbf7cc5si34668377ejw.555.2023.03.30.00.12.36; Thu, 30 Mar 2023 00:13:01 -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 S230393AbjC3HHw convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Mar 2023 03:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbjC3HHv (ORCPT ); Thu, 30 Mar 2023 03:07:51 -0400 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2DA859FA for ; Thu, 30 Mar 2023 00:07:47 -0700 (PDT) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-536af432ee5so339016517b3.0 for ; Thu, 30 Mar 2023 00:07:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680160066; 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=Lx/OPeSP/6JGscUKbwjWV1A44GfF+C/voNDzk4y2Gmk=; b=2weDzp8zhC4bhhVpwpMakjkft1DGB0tyYEVv0DYpcL4MZTK89hVzh3zQotROvbNq5b u93y3TmIwmqlgon+P5x8jNIJ1qtfxhuPdDGGYwvfz/DbnrBvQ8FGgSdzV7kLdzhxArWa er7fuvyvtWjyqPePoTLuwJHioVOluy/Zq+0hBFB7FYQVbxvQQOBqr3Ub2npdOGSJBSx1 1T6LzyIFdlZASCRTSbYpYm8RLEQ0UmKNa9uReCSKE/vdpQp7Xm6k0MB0Eu/+/Vpe5sR3 YmfRraXakYVynaKp11l8L18wwLqDrd3IRZqDr+ANgQ/inYveihJ2dcq17IwuyPnj5tak 7Opw== X-Gm-Message-State: AAQBX9fZXv/FkKAvoDS834J2QS9LAPRFRptFeKZuCUtKQf3IjvcQsFW8 tyl5W8Z4AXzJSZOtEQQblPZlyHnef8xe3w== X-Received: by 2002:a0d:cb56:0:b0:527:abe5:8478 with SMTP id n83-20020a0dcb56000000b00527abe58478mr22570825ywd.10.1680160066423; Thu, 30 Mar 2023 00:07:46 -0700 (PDT) Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com. [209.85.128.179]) by smtp.gmail.com with ESMTPSA id y3-20020a814b03000000b0054629ed82f9sm655163ywa.83.2023.03.30.00.07.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Mar 2023 00:07:46 -0700 (PDT) Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-5456249756bso338214427b3.5 for ; Thu, 30 Mar 2023 00:07:45 -0700 (PDT) X-Received: by 2002:a81:a7c4:0:b0:546:264:a375 with SMTP id e187-20020a81a7c4000000b005460264a375mr5797313ywh.4.1680160065429; Thu, 30 Mar 2023 00:07:45 -0700 (PDT) MIME-Version: 1.0 References: <20230329071405.1568021-1-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 30 Mar 2023 09:07:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH -next] dma-debug: Use %pa to format phys_addr_t To: Christoph Hellwig 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, Arnd Bergmann 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, RCVD_IN_MSPIKE_H2,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 Christoph, On Thu, Mar 30, 2023 at 1:50 AM Christoph Hellwig wrote: > I've applied this as it is the first fix I got into my mailbox for it. Thank you! > Arnd sent one a little later, which uses %pap instead of %pa, which > confused me a bit. The documentation seems to allow both without > any recommendation which one to use, which confuses me even further. The "%pa" class supports two variants: "%pad" (for dma_addr_t) and "%pap" (for phys_addr_t). "%pa" is a shortcut for the latter, cfr. https://elixir.bootlin.com/linux/latest/source/lib/vsprintf.c#L1792 The default exists because "%pa" was fist, cfr. commit aaf07621b8bbfdc0 ("vsprintf: add %pad extension for dma_addr_t use"), and I don't think we can easily remove it. The default is shorter (saves one byte, even compared to %llx"), so why not use it? 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