From patchwork Thu Sep 14 07:56:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13384768 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D743EDE98F for ; Thu, 14 Sep 2023 07:56:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C67F26B0290; Thu, 14 Sep 2023 03:56:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C184F6B0297; Thu, 14 Sep 2023 03:56:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B067B6B029D; Thu, 14 Sep 2023 03:56:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9EFA16B0290 for ; Thu, 14 Sep 2023 03:56:49 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 76B86A10D4 for ; Thu, 14 Sep 2023 07:56:49 +0000 (UTC) X-FDA: 81234446538.01.B5B29A0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id C8D9840024 for ; Thu, 14 Sep 2023 07:56:46 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kdHUcK77; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694678207; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=thSMwp1+oYnYBVswQ47ILEV1PRhPp3DO3ndk8vH4O2Q=; b=6wLrCO6Qf6+M4L84lTJSwIVqzBACuYA7tm7MGTMliaUlGEAZkqCxjAwoX5HQOyENwz8j35 28AkJntblG6JX0vCSjqEnQXukusAGC/sxBjxMhbjdxEb90deqimkLQXGDcKPugGmA64e+3 NbKj4HI2/a+m5/VaMlEp3W+J8awbkpo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=kdHUcK77; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694678207; a=rsa-sha256; cv=none; b=rFMimuSsYn/oIPYDTcup2Pbm8LYKpNLNl0Kf4855rK3yurH66L6i1mYkQoafAknJFvsQA0 AyKlF2/6ASwaVCMSwhVlo/fcU2dwcNwooi0ufmnID/PC579SIKxPQ6ZroOY9/aGaDrFeyd xl1pBeCfyU+NDJ/oKFGJ32A6M5DzfwA= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B24E561CD6; Thu, 14 Sep 2023 07:56:45 +0000 (UTC) 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 X-Rspamd-Queue-Id: C8D9840024 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: yu64m6b4o8qpg4wqice18zstpywjdxot X-HE-Tag: 1694678206-58040 X-HE-Meta: U2FsdGVkX1/TI+QwBUw48wXquoRgS7ZkpDZ6l1xp363s0w9EE5GsQzZ97W/QPC7aReEXrRpfZLDm2km4HBzckkHwomzhpNhZkFJChCXAqqqGreNY8jIddtD2wTtOrIla1hH0sy/N3JfGPkFPOsSDKnPkl7wARxqWdmuAjw4l5kTwWQBBQYjXrQ0Oxh2T3wnqKKhQTva/hSekBATmpxhXjI1stanDv6X7QKqsKMFlrMCUvI64dW+EC6e6pnJCAqpzh8v5rEHmbc/TZna13LVG8yPD3Dfor7PFNOSX60wTI9oG+lW2S0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ity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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))