Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7002301rwr; Wed, 10 May 2023 02:22:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7emxDMADeKEUmW5UrQvIMyKVwLgor+DWIir20AcYNSL/8Jp3HzeofLLHwm4ZMrH2zR0HtS X-Received: by 2002:a17:90b:4a07:b0:250:2192:1bff with SMTP id kk7-20020a17090b4a0700b0025021921bffmr16892329pjb.23.1683710564850; Wed, 10 May 2023 02:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683710564; cv=none; d=google.com; s=arc-20160816; b=0iUtQgYgE4xbLTmxwsSb45Ffgh0PzWAtfqq5WgalehyPusbQzxvdfijFvXSii4xrVr bABl5eGUuYgHcNoSzLaE1NzDWKpcUDzSwgCDZGLCkj11BKxBAcp7mwR9yVbAF+61wW8i 1WPg92JYtHuLRKEadFOnImbzFEM3ZpHxfGzf9FI92RW9ia7JnyhQ1iFTORl1E8loMFOt uDlD7dPjvpg3+eq12gGvoNEVCdoiDiAXYVNrjjAxHvSQN3YdflL6UQUVvqPjG+L4yp8k hWubjCK+eAulSAsbQD+a9K3MYlBCxX1XMD3TCtDMH/0kYVYM6TRfK0CN1/PZJxv26zc/ 88gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jY6ohWt0SiEOpD+GaXhJR12rpojr2gafwTd+y3U4lgE=; b=VqMOCX8ueExcQ17L0M6pqRdddx6pm3I47FvbFihOz7mkHZfND9kef4ZMVni5btGEFq ItShzMF6/4tncV62dylNvhayLHaQ7HkrCgqNyvRj5/66vc926STM9E+Dktrwkdk5dVHX ZWjzGnq7TyNTKaAxY6WyIHy9ZPGgyCDRudh2ZUVN3TJITshkvEYJT6LzfR+vy+E5R79Q dF28eqixKqjtIUNFalxjj0wS5o7wGGfIjCH1iM/hm/MJk9OHuwvkZBloyBIB37JVGyZL BdwrLTdy6jtHw05iO3OAjYzOOLOh4pzP9kE2ZYLIrCZCFEdb7IHzhILaOnLdUOuGuXHs PzhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dgs7sb1b; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id em4-20020a17090b014400b00246d776cbdcsi17348237pjb.57.2023.05.10.02.22.24; Wed, 10 May 2023 02:22:44 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dgs7sb1b; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236336AbjEJJIg (ORCPT + 99 others); Wed, 10 May 2023 05:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjEJJIf (ORCPT ); Wed, 10 May 2023 05:08:35 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8599F2680 for ; Wed, 10 May 2023 02:08:33 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-50bcb00a4c2so10951082a12.1 for ; Wed, 10 May 2023 02:08:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683709712; x=1686301712; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jY6ohWt0SiEOpD+GaXhJR12rpojr2gafwTd+y3U4lgE=; b=dgs7sb1bhyKMn9gNX8gJw1oa0vsL3dNqXLVgQVEgqrf4Ym0n9kugYLl5pLHHhUxtSW FNooMdlmHa9Qmd2S1JTvv1A1eXRT/7Ml6IFNTDOSc9+TY0StE2f3xVVVaBwWGUJuOECO R8GXuGxDzghWh8O6ai+Pv7wWXsp8uG7N58Dc8NvMiTF034Hw6cUdiNuvxDrgs4n3nGPv 5Uf1vqGDeXxUyE1VNLuWze3RqNunJFH1HGKLhZxoTd0HgMob4uegnJSgVqFlzQoHODWM DGqXj0BGBgEnMZiktvo7fgcFU5IXgd/ArrP64VuVDqeP2GrVLtcKWyuYWVFTASqhdDxg vsBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683709712; x=1686301712; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jY6ohWt0SiEOpD+GaXhJR12rpojr2gafwTd+y3U4lgE=; b=bbs14zCgXFVIuBOJjUcjySh6T8WfyzSXtLJ1lbrmsOVB7jdU25xGFXGa7oavO+8sxe V4hmXbYvDH/ifMgc5dAeZB5rN5TJxWefRg9ZZ4ho436OME7Vb1+ct4jjlOob5LTEenEo gt4EbGQRGizQ/f4swFy8arBUPJeOits0jvPZjJfSzo9tPe7JqGc0SJjipWf3Qk90pfUj YrXSxb1OWW0XfOIAklmWtb+V3ezrcLgRO8HUmOTc4KNuEaf9Pg+Q3uX+vrSvZLbxtuGx Cnyito2j/tqqyTbFyllQ4SBkf3XOW8RfHK3fLcNNfLUM8X/SBhlI0HrmjfMi5yPEEPzL LCSw== X-Gm-Message-State: AC+VfDy4nXqpAeiva788T5kxvm7AfxaOLcQSatFtf2qtbTceRj0Rj+Hy FivoMmCDKx+6F+ujKe9w36E= X-Received: by 2002:a17:907:2687:b0:94e:16d:4bf1 with SMTP id bn7-20020a170907268700b0094e016d4bf1mr13278593ejc.66.1683709711884; Wed, 10 May 2023 02:08:31 -0700 (PDT) Received: from A13PC04R.einet.ad.eivd.ch ([193.134.219.72]) by smtp.googlemail.com with ESMTPSA id hz17-20020a1709072cf100b009664e25c425sm2440333ejc.95.2023.05.10.02.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 May 2023 02:08:31 -0700 (PDT) From: Rick Wertenbroek To: rick.wertenbroek@heig-vd.ch Cc: Rick Wertenbroek , David Hildenbrand , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: memory_hotplug: Fix format string in warnings Date: Wed, 10 May 2023 11:07:57 +0200 Message-Id: <20230510090758.3537242-1-rick.wertenbroek@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 The format string in __add_pages and __remove_pages has a typo and prints e.g., "Misaligned __add_pages start: 0xfc605 end: #fc609" instead of "Misaligned __add_pages start: 0xfc605 end: 0xfc609" Fix "#%lx" => "%#lx" Signed-off-by: Rick Wertenbroek --- mm/memory_hotplug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 8e0fa209d533..9061ac69b1b6 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -325,7 +325,7 @@ int __ref __add_pages(int nid, unsigned long pfn, unsigned long nr_pages, } if (check_pfn_span(pfn, nr_pages)) { - WARN(1, "Misaligned %s start: %#lx end: #%lx\n", __func__, pfn, pfn + nr_pages - 1); + WARN(1, "Misaligned %s start: %#lx end: %#lx\n", __func__, pfn, pfn + nr_pages - 1); return -EINVAL; } @@ -525,7 +525,7 @@ void __remove_pages(unsigned long pfn, unsigned long nr_pages, map_offset = vmem_altmap_offset(altmap); if (check_pfn_span(pfn, nr_pages)) { - WARN(1, "Misaligned %s start: %#lx end: #%lx\n", __func__, pfn, pfn + nr_pages - 1); + WARN(1, "Misaligned %s start: %#lx end: %#lx\n", __func__, pfn, pfn + nr_pages - 1); return; } -- 2.25.1