From patchwork Mon Feb 5 09:39:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 196713 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp777525dyb; Mon, 5 Feb 2024 02:10:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJUUUqSj1eDrd7FyX8u9L0JgLQd3i0GHZv0fD11NRMdf6q7OMr57zHPS9dGFvobdpAVB2a X-Received: by 2002:a17:902:ec85:b0:1d7:691e:2704 with SMTP id x5-20020a170902ec8500b001d7691e2704mr15087797plg.35.1707127824161; Mon, 05 Feb 2024 02:10:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707127824; cv=pass; d=google.com; s=arc-20160816; b=zYKUAa+lDyGIXNEmYbJL95Ux6QdFq/MRSbrO7CURQr1S3N9UqGxcctIidNPBUbgnPt EHmc1B97/Bz8e/4x6LL4SG0HCmbiGqVjyHlCX3pESbIzWpMQW26hKbBw0I7ioImkXi2Z LfWY/W/ZupogDH5FVrbbm+Un+OoQm6guOfDt5mCJnpqe5B9aJOPDJBTdVcyqOIjjwI0Y WfXt27Da+Dq3QRfwcmM3Pf/MdcoA1mNdC5qkU9jO2E9bIsWk/tP3EhQhpRNjgQ7JOlgt 9mo2mKi0XtqvO/LC2OXA68ooANAfczcNUk8M002Vhn+0kHRIVj+bDfqJR/iVkGN2hMIU pPRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id :subject:cc:to:from:date:dkim-signature; bh=A1lYBRZvANc8NTjqQCLcG5zRX1RODX3spfuiCcoB8eI=; fh=sxVTPeol7zCAsaZVSB+sg11msAmpKVFMtsqx8Np1c7s=; b=QWTlAoxmZsQ5R8b2GiofPeyDOljRKbGJEq8A1YRc0QzjB3wucDp0q4MkqwGsLSeqaR h+04/V2lx7VF8+ElVY9tEK8GgHfxtNeCyc2RQ7iv0X8B+fQ8dPTxFTvMHd8T1nEno1mI N6JpTEujVzhfFwAZGBLsyokyuz59cinEK2MdgdtcFprCnK3rQbcUXBh3vby8TfaAh6Pu X098Ilsyjc2NUle53UbqwoaMuDtFxE9a5DQ4A1ST7zTf2roOsCcZK9NW5EsNLzRkrxTr 6KZHVSFzP/khhvHN7ioiEg8lffjC+auT5Wa/Qybc2jOVUUlQBZRPSD/U7GPF1v9CYSjH IwQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GhItRGOy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52331-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCX56PEFeQjnaEFMN0BykJBp3kJEgsTye5uEYtATeaVfchMqSXSXweMD60OAI+n1HK7QYBUK4/59WIehKRxK0LcjswZPcw== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id g18-20020a170902869200b001d71d722818si5916305plo.513.2024.02.05.02.10.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 02:10:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52331-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GhItRGOy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-52331-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52331-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5E4DCB2661E for ; Mon, 5 Feb 2024 09:41:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89F4413FFD; Mon, 5 Feb 2024 09:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GhItRGOy" Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39E5112E5C for ; Mon, 5 Feb 2024 09:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707125976; cv=none; b=beMUZwL2mAm44BdbRSReNWfCCD550WwI9fFSX428nCsgEbdQ6FqVVJllc5jsBy9AITKuCMyVxTcJrndKzHZsj3Du74w/9H3R/TQN5xVf8tloLqB8tCchysONNwn4Yc8Zk5fHF51e8DcC/woOXiMQN64IPNYDDJqBtPumwFkMwGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707125976; c=relaxed/simple; bh=xIDctwqwnFoouPbumxcKvA7QckHnFJYT+ZVd0nPEP9k=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=g+Si84pqajLsCbMR+q2heveH5z+94uAG2c6VlY0Pk/taktDcWSyAzcC/8NS9LKi8dbak2qTmlhFGLsjYlNeHkPlIQvbu4JWkc9DZ9UmZ8NVfuAu4my7VXkoUIe/Y4770JbeQMoiOHoK6ifgQ+gi3toYR4CUBBqFK1MAY9nh+0m0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GhItRGOy; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33b409fc4aeso280722f8f.1 for ; Mon, 05 Feb 2024 01:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707125973; x=1707730773; darn=vger.kernel.org; h=content-transfer-encoding:content-disposition:mime-version :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=A1lYBRZvANc8NTjqQCLcG5zRX1RODX3spfuiCcoB8eI=; b=GhItRGOyExqBKy3DN/IH9Uhy3oinVqnMMGSqi42X+dHLzTsF6OJSPgUMdk7JypnAJT dImS42NiUnmfncOeQTBjcuxg/gLsWqGG+GJNSpxifurU5UleI4HD0ZtisGjoev5HQaT2 mF8IS3d5cQo2a1UAccHnEpoElRhzwuYbLJnOGpmpiuOzOAV96/lau+XHNiKDDXiS3tUW +rASl0ETly2P5V4TkgRLUPmm29M45HXjPg65ac3xFODTuuZSiJzG0V7yuIvM4OyvYcFB vu01CVWImoDJUDU2VU0+I3bNvliGBy/wUss5AJ5ovujKvo22nW79IHlwd1YE8Gr2gaZh jpIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707125973; x=1707730773; h=content-transfer-encoding:content-disposition:mime-version :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A1lYBRZvANc8NTjqQCLcG5zRX1RODX3spfuiCcoB8eI=; b=UcfnlNqIJVb9c7pvrubmodvnclNcdwKBnKZLqHCjjavCBRJ/olkeFw29dMluTIYci7 SRwWJYHCMkO4OVSZFU4OPUw0A52wGi9uBxegE/37hodtUNIumN3BRn5/ETrqnNR5UOd3 2cnXYFptU8LUdfGrwenwRFkLsciv9Xe52QuIrbMx6l1EaHsaSzPVdfW+w1zmWY6MYlbJ OGfgDKzIxti77BRRf5+bXBi+rOy+y8mk7OQwzsoFBWcn5GC1Uri4HcHTVDdmFO0zMkQA ZfcBz+mus/+hMJboFwdcPq6WBFW0m5hb7fe7L0eAhes6vnjK79rNT8PvPjZfncXU05kR C2/Q== X-Gm-Message-State: AOJu0YwvZM2JVkUxQ+csUm79E3EXj6khK16DqER8TfHaLREWaJcuzpfe qJl4I3Z+5KF4Jakpuf1w7UT3N+G8hQIY3HkvWxKOnlxlnQt6Fw0= X-Received: by 2002:a5d:4a0c:0:b0:33b:17e3:60d9 with SMTP id m12-20020a5d4a0c000000b0033b17e360d9mr5489751wrq.1.1707125973150; Mon, 05 Feb 2024 01:39:33 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUnegPd6GboLd7sc0JhbFf6NfPRhbY9zrp7y41biV0O1FhgMnLyc4k9Aba66QPXFxic2L1vQjqLLmxDIC+rJg9qvDuY4aF1znNs Received: from p183 ([46.53.250.163]) by smtp.gmail.com with ESMTPSA id q16-20020adfcd90000000b0033afc875fd5sm7600537wrj.49.2024.02.05.01.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 01:39:32 -0800 (PST) Date: Mon, 5 Feb 2024 12:39:30 +0300 From: Alexey Dobriyan To: peterz@infradead.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] smp: make __smp_processor_id() 0-argument macro Message-ID: <0037d1f2-8153-4b33-b43e-f4b6ecd710ac@p183> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790053265177712292 X-GMAIL-MSGID: 1790053265177712292 smp_processor_id family of macros never accepted any arguments. #define __smp_processor_id(x) works by accident (see C99 6.10.3 ยง4). __smp_processor_id() gets 1 (empty) argument and passes it down to raw_smp_processor_id() which doesn't accept arguments. Signed-off-by: Alexey Dobriyan --- include/linux/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -261,7 +261,7 @@ static inline int get_boot_cpu_id(void) * regular asm read for the stable. */ #ifndef __smp_processor_id -#define __smp_processor_id(x) raw_smp_processor_id(x) +#define __smp_processor_id() raw_smp_processor_id() #endif #ifdef CONFIG_DEBUG_PREEMPT