Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp13353imm; Tue, 3 Jul 2018 12:58:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIlAAU4dLHx6NByN76JzoO2bCdSIvzZ76mZVFOmNP1RmRjjoqk0ERB1Z8Qjy3b5pcWLCTWT X-Received: by 2002:a65:5907:: with SMTP id f7-v6mr26166598pgu.83.1530647909991; Tue, 03 Jul 2018 12:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530647909; cv=none; d=google.com; s=arc-20160816; b=LT0QXaZC0rT3QUbURzHPBrRURBAY7B4wBUHZaXeBwxNKwioHnoqmvgeSM1MCPKIC0l H06ZdcDad4WkmZr2W4j80mSVZzIbhwRxU31sQCx9LposTaSSRvNZujdzr+oDwVzjErq+ jaAWlEyqCdYXY8nFmnAMskIozTXHLRTveeM9musUa+VNALpSnpOZHXI4EiwI6NynTZDL jOJTaqx7ZTWZV3pYy28TVuyxmxrLSPc6qcfXLsuqyqABzi0oowh4CmmK5j7+T+A5AkeF 6sPGh1RxTsTL9GZrnQlin1BHv+y09sBudx4u2kamBv60NpKAYVsSHcAINy4O8fg8lXvl oBqg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=qwCp5H8gszUVKVtYjsi9SZM1lSi2ZtDZHWZAMJ5JTWU=; b=OVxQdbgrIQklNXZXnb2RZjK5CZ2Z7dCrtefTHTk59C23QBk0aYT+v+xdlq2VGOd3vb s4wsd0CqkcEdseTnqt15+v9UabbZNp3d/MtyTGhLAZHsAL/dZLgcdeD06WMvS2vONzyL aILXm8lJptafe1a7zo1wwFM56/2EXOR2N668yCnuMcWok2wqarMs2OeX7UU3JF3lTaEc Tbb/xVgkN/kCeVykTn/MM/YenZXMDd/vJw1wp5jeMRbWeLsq7lFATsKhALwzPWB7DlSZ n9Q+dG6JbA2wX/I0RbnF/xrhsx5uHbYQKzpNAkt1QQBpi+5zCvA8okKeySWqdbBj8ZQH ezNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e190-v6si1765294pfa.355.2018.07.03.12.58.14; Tue, 03 Jul 2018 12:58:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbeGCT5Z (ORCPT + 99 others); Tue, 3 Jul 2018 15:57:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33606 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbeGCT5Y (ORCPT ); Tue, 3 Jul 2018 15:57:24 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CBE63AEF; Tue, 3 Jul 2018 19:57:23 +0000 (UTC) Date: Tue, 3 Jul 2018 12:57:22 -0700 From: Andrew Morton To: Mike Rapoport Cc: linux-mm , lkml , Michal Hocko , Matthew Wilcox Subject: Re: [PATCH] mm/memblock: replace u64 with phys_addr_t where appropriate Message-Id: <20180703125722.6fd0f02b27c01f5684877354@linux-foundation.org> In-Reply-To: <1530637506-1256-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1530637506-1256-1-git-send-email-rppt@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 3 Jul 2018 20:05:06 +0300 Mike Rapoport wrote: > Most functions in memblock already use phys_addr_t to represent a physical > address with __memblock_free_late() being an exception. > > This patch replaces u64 with phys_addr_t in __memblock_free_late() and > switches several format strings from %llx to %pa to avoid casting from > phys_addr_t to u64. > > ... > > @@ -1343,9 +1343,9 @@ void * __init memblock_virt_alloc_try_nid_raw( > { > void *ptr; > > - memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=0x%llx max_addr=0x%llx %pF\n", > - __func__, (u64)size, (u64)align, nid, (u64)min_addr, > - (u64)max_addr, (void *)_RET_IP_); > + memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pF\n", > + __func__, (u64)size, (u64)align, nid, &min_addr, > + &max_addr, (void *)_RET_IP_); > Did you see all this checkpatch noise? : WARNING: Deprecated vsprintf pointer extension '%pF' - use %pS instead : #54: FILE: mm/memblock.c:1348: : + memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pF\n", : + __func__, (u64)size, (u64)align, nid, &min_addr, : + &max_addr, (void *)_RET_IP_); : ... : * - 'S' For symbolic direct pointers (or function descriptors) with offset * - 's' For symbolic direct pointers (or function descriptors) without offset * - 'F' Same as 'S' * - 'f' Same as 's' I'm not sure why or when all that happened. I suppose we should do that as a separate patch sometime.