Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3746575rdb; Thu, 14 Sep 2023 00:59:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtoVrnFpTbdf/fxnmkpu9ze2Gp7iJnYHLwYnN2/GGzRXkV7kgo8pv27Gqx8O7nwIB4BvVY X-Received: by 2002:a17:90b:1e46:b0:268:15dd:c5c7 with SMTP id pi6-20020a17090b1e4600b0026815ddc5c7mr4122386pjb.40.1694678339912; Thu, 14 Sep 2023 00:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694678339; cv=none; d=google.com; s=arc-20160816; b=u0kSl3IuS+3T9s/9f0x50dlFW0/YezNlb46iPgltxI4XMkJbeEa5KF+jvCgUFaTMkp 3N9rZh0shpaKcXoRxgDcvvreXTMMjzGUd7UIzSDKkWO42uqIA7Rd1HjPpPTfkHq67MDP iKG34cd8S7QBuONS1Z27cawyZoPw1Lvi/C+UcnBgzfrT/ERLxWHHu+ySPXcBWVQOlOVl upViPm3TDSUTWYG9y8eSYz+1qFOnnYrBlRaSLstjXtCyzx54rhWyzm3hZkOzcbSTQ+BZ anw2yo2/KJHiaT+a5qn4bo786v7QPFXzMQ+BjWjnWN1EWq9x0x9WNu0n8LSQg+eAx8Uu INWw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=thSMwp1+oYnYBVswQ47ILEV1PRhPp3DO3ndk8vH4O2Q=; fh=fwStCqjhUX7M3xSS+y9hGH2Aj4Ysyh0lvKOLTCiQ8J0=; b=VMyheminyOrIJIUokhqzuQ9/WkgAXBB18xMJEZZGURI3zmJ6uwFxaW7hQAYbtAYp6t NVSBrGDFge9zSv8d8NPXskVx2OdSbsTy/uaG9qcUmjHpzOVkxpx/MzIaOJaSdymr61xb sBPxijbCHFXkFmWZLfzM7phrfE2YioWWA56Su/jtxGGKGjFL2WUFyx5k4rKwO7+QRS7m VhZl5TAms8uFTP/LNMRTbbQ5xO9v7snWlemkCfm+8sqwA8kg0p/3u0ZSijRC7NG/R/PI dKKKuh1Ytloblaiu0QJ7MTQxU+Hie7bLM+kZr9GzBMGptxYaiivRJpKtDlUTZxPNMc03 hoVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kdHUcK77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id az16-20020a17090b029000b0026f292ea34dsi3203899pjb.69.2023.09.14.00.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 00:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kdHUcK77; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 65C9F82516F2; Thu, 14 Sep 2023 00:56:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235951AbjINH4z (ORCPT + 99 others); Thu, 14 Sep 2023 03:56:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235935AbjINH4u (ORCPT ); Thu, 14 Sep 2023 03:56:50 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4671FC0 for ; Thu, 14 Sep 2023 00:56:45 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4188BC433C7; Thu, 14 Sep 2023 07:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694678205; bh=43+dXaouu7djoigVoxm+HE1AawyJHHKsfY707t/g9tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdHUcK77snHtiH1fIoj0JBOIn6Atut9NYodwp5lUWUVzNxD8HUeW+Wr4Zk4sXrAqv IvuWlXrl5Cq6Agmxx3Dn08a2n60FttFEdpJ/7O+fgEluQRNsGL/Rq+LNNg1tsi55DA pA/UxvpXRVQuoXCmlbO4Zjk8+/97NfnuaCA/NAO4aJPtH3dL6xslM9qe1BxIYsXO8s nQ0ZSrmVGQbxuxU5dQVyYRbhnnljE7VJVJ6ty7RoNfFb/nKZ8gTTlHXiX9h4zbfmcy /sSvgkShjcY3VvpCWsQt/B22w13h9n2HXcnVh7FZXGXjEFSnVGGa1vR/SpXCU3oTzr jF8zlgVbaTCGQ== From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , Mike Rapoport , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] memblock tests: fix warning: "__ALIGN_KERNEL" redefined Date: Thu, 14 Sep 2023 10:56:31 +0300 Message-Id: <20230914075632.9515-2-rppt@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914075632.9515-1-rppt@kernel.org> References: <20230914075632.9515-1-rppt@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 00:56:56 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email From: "Mike Rapoport (IBM)" Building memblock tests produces the following warning: cc -I. -I../../include -Wall -O2 -fsanitize=address -fsanitize=undefined -D CONFIG_PHYS_ADDR_T_64BIT -c -o main.o main.c In file included from ../../include/linux/pfn.h:5, from ./linux/memory_hotplug.h:6, from ./linux/init.h:7, from ./linux/memblock.h:11, from tests/common.h:8, from tests/basic_api.h:5, from main.c:2: ../../include/linux/mm.h:14: warning: "__ALIGN_KERNEL" redefined 14 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | In file included from ../../include/linux/mm.h:6, from ../../include/linux/pfn.h:5, from ./linux/memory_hotplug.h:6, from ./linux/init.h:7, from ./linux/memblock.h:11, from tests/common.h:8, from tests/basic_api.h:5, from main.c:2: ../../include/uapi/linux/const.h:31: note: this is the location of the previous definition 31 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1) | Remove definitions of __ALIGN_KERNEL and __ALIGN_KERNEL_MASK from tools/include/linux/mm.h to fix it. Signed-off-by: Mike Rapoport (IBM) --- tools/include/linux/mm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/include/linux/mm.h b/tools/include/linux/mm.h index 2bc94079d616..f3c82ab5b14c 100644 --- a/tools/include/linux/mm.h +++ b/tools/include/linux/mm.h @@ -11,8 +11,6 @@ #define PHYS_ADDR_MAX (~(phys_addr_t)0) -#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) -#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) #define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) -- 2.39.2