From nobody Thu Dec 18 20:24:00 2025 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 7D2721AAA10 for ; Mon, 30 Dec 2024 14:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735568658; cv=none; b=SYDLAjUCz8rS8UhnrFziJcO5MHZ7PC8Cql1JtMZ243VYvKG4nwjq1OwV7XH8DNV+YTR1IuuQhGagcxFa7dp9oYW/MJpmAfvE/yL+OXyJHuYVLoz6KHzIkylYIc6g8JQwlPGy5PBh99TI4Ym3Z81DlYq2uWfL4Me11Uc5coy4hlU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735568658; c=relaxed/simple; bh=riqKkyM9akRaX1QToakRQt2HKZxJfQmlWPKBKamryN0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SH0CIEi5YzrR26GwZsC1S7yJNqmpW5vSnjZFemTM73LzCHR9gi8M+sujt2v8NgV3RPzua+J2juX6wjFgGtAFrNEjnwkmy/NK6fuIn96jnTS9d1Qhxw9VNyQLWcOeOD9YM2CDKD3feqAQLHggUz/DL6z0l9QNT8kGDpxNrM6/joI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=AuOaDau/; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="AuOaDau/" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-aaf57c2e0beso168984666b.3 for ; Mon, 30 Dec 2024 06:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1735568655; x=1736173455; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/xjs7J+W/ttqDs1occ4gvPsm7x6ioMVSDeQBqY18Vao=; b=AuOaDau/riCtxdZV6VY4TN5rnnUZGbHMXBYKabcB2wjmoqcE3ox7WeDdBKnXjEtpOA KPpOzca0dtVuwcfu1zMv3GRXUUJ2l5ZmsZExLXy7fbx7ytG7bSiqEYlETPOil/X4w0Df oY7tzIuat3jbdEv4CSPcOCZ/pDGfyDvGNDq88apQfGMAof4VyTt9Mzl+Kw2P54pDPx+Q XDCB84Yvn+8mZ8rCQ6ROCn0lQ1YtFqfRgG15OBlXOCkeCyBlnuVVOI327dBaA+ksH14y 6MLNMHg77eDD0p52lAWqleWi60vnfRRyE5vQ5HaHepwluJDiSmL0F403k9gIlcP3QKFc u/xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735568655; x=1736173455; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/xjs7J+W/ttqDs1occ4gvPsm7x6ioMVSDeQBqY18Vao=; b=T1GHt+xjWtgn/MPTGwMsRaQwbRfCag5r2RGo3Ow0pyyTSSedsipkmZjXfzO8bSiWvG SEQpUlOwsytIFtbS2L7hn6OyBD4qKBxybcTP27Zxbf5yTzSTo1NpKT3xLobaQLw3Ck7L oVrOTFDhXbsgsvAZCtLrqXCdWRnPrD9x6jRjicwlmjZROQxoazN6gbg6qOSvSDLMgBtF 3/Em1NiQWBYqMbee1wfCBBoan37OQbiFVp1zCaD2NuHJ6s3NWZsttOIAMF29I58LAP8W TWuuuT7zHuR0fe2P1QAETknX26dqCEevFcU5H9nQikYsUzGc3EadrQ+Lq79VmaueBhgL Ztrw== X-Forwarded-Encrypted: i=1; AJvYcCVrmTpyfzt6spNag120aNjRK0C11tKyzhwzbHAnWwyUd8BxCeKRsSZfgzTF0BJ8eCIIAyydWhFheitVa/0=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5+GEMBYbeUt1XSp92x35bO4T8BhISGJMQUKDUgz6i0kUUiRqK Kw5PuAgVuvH6vAPIXJpFiibXdMQn5lg/0ALULeySmuimwG+pG0Unrgy8ESVj8jM= X-Gm-Gg: ASbGncvHo2LMHhgjZEfYfAtne+V5QDbo22nGA9TAI1w9yHOu8J+gUeWHRennMfsi4HM rtGe0+bZG6mllIfeUka1Nus6vxOoVn5UXT0wemwd2qztLIvJPi9CloGKlywrg+6J4LhxBwvNgD5 7tRsPISZyEOftoV16jk7OTVVe3G+LUd7YHxbKIBLPrxKkavSaXLZe1ax7G0z30ErqdXqDO7HX0u 9Q/DVhg/sYkEUrz5P05JnVEFcj/FSck1PhuXA27xpdQhMafbJMxYN6qHmkgJxzliThxxMwi99ay 68HDk7nxtw== X-Google-Smtp-Source: AGHT+IFyy9NNGSmVpY1h0VDz0oNXG2SdHrUvBSZei4PSFoh1BjCSTNBFpNPjatAVgDk3IoRGxKn/Xg== X-Received: by 2002:a17:907:97d0:b0:aa6:2c18:aaa2 with SMTP id a640c23a62f3a-aac2d447071mr3266674866b.27.1735568654824; Mon, 30 Dec 2024 06:24:14 -0800 (PST) Received: from localhost (p50915bc6.dip0.t-ipconnect.de. [80.145.91.198]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aaf379e34e4sm434430966b.121.2024.12.30.06.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 06:24:14 -0800 (PST) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Matthias Maennich , Jonathan Corbet , Masahiro Yamada Cc: Andy Shevchenko , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] doc: module: Fix documented type of namespace Date: Mon, 30 Dec 2024 15:23:59 +0100 Message-ID: <20241230142357.3203913-5-u.kleine-koenig@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241230142357.3203913-4-u.kleine-koenig@baylibre.com> References: <20241230142357.3203913-4-u.kleine-koenig@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1482; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=riqKkyM9akRaX1QToakRQt2HKZxJfQmlWPKBKamryN0=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBncq0A/FFYP2Z9mEg4HqPUGtrDhRrubtr9oi/U2 gzkNxXj79mJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZ3KtAAAKCRCPgPtYfRL+ To+tB/wI8V+cIbuWFIQcN1/wDx5ot6AY7NFp1AL2rqCFEClcevQLZD32aKy+mJnl84fUXYOE7Gw paqI5TbyhWvADClUKdscANwoo+f2cv8NrUm3XVX+Y3hRMbokpQqMtgTZK37AA/M9auT2KzMUcrs nDsQ8aUEusLiYgYsCQtcka/gP9SrnnglpRd9aUEPLO9VOQtIgLENDYMpAJL8+QkfwNUHLoO+NrJ zttSaBblbfFNxMffoCajOaOeKnFUjD3CHcvk9gvjnldWkUV0jfQVUDd8o4U7dohOcBB+dTYgyEc hLJZYvbYzftTV708+qemmMtxRWhZVkTvtlX932V0UJfRAF66 X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal") the namespace has to be a string. Fix accordingly. Signed-off-by: Uwe Kleine-K=C3=B6nig Link: https://lore.kernel.org/r/6fe15069c01b31aaa68c6224bec2df9f4a449858.17= 33305665.git.ukleinek@kernel.org --- Documentation/core-api/symbol-namespaces.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/c= ore-api/symbol-namespaces.rst index 27a9cccc792c..473d025657fd 100644 --- a/Documentation/core-api/symbol-namespaces.rst +++ b/Documentation/core-api/symbol-namespaces.rst @@ -41,9 +41,9 @@ entries. In addition to the macros EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL(), that al= low exporting of kernel symbols to the kernel symbol table, variants of these = are available to export symbols into a certain namespace: EXPORT_SYMBOL_NS() a= nd -EXPORT_SYMBOL_NS_GPL(). They take one additional argument: the namespace. -Please note that due to macro expansion that argument needs to be a -preprocessor symbol. E.g. to export the symbol ``usb_stor_suspend`` into t= he +EXPORT_SYMBOL_NS_GPL(). They take one additional argument: the namespace a= s a +string constant. Note that this string must not contain whitespaces. +E.g. to export the symbol ``usb_stor_suspend`` into the namespace ``USB_STORAGE``, use:: =20 EXPORT_SYMBOL_NS(usb_stor_suspend, "USB_STORAGE"); --=20 2.45.2 From nobody Thu Dec 18 20:24:00 2025 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 222B91ACEB3 for ; Mon, 30 Dec 2024 14:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735568660; cv=none; b=BqWAjBg3yxZdtzpY/58WLQHXBf4YPJTklKLa0qjg5q6GhWv95ezNbHfpg+lgvPATQcVe5rni/gUqpW8UIvOlkDlGFLQBxEWm86c9RyMQpuqDROlodRJIgITUna/csvsxQ4x1WwZ0m41LXW4iV4PFapsa2rt5lZZAzXk9JOs0VjM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735568660; c=relaxed/simple; bh=7H5NeV/Cd9MbRtA6mmk+DcOGx5EEmgZqhra692U74/Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=unCfk7AWjiQ39zNM5SG+RXSkdUVTBrfNTjEG4Mf8NnLBAbW/o1jk8sZRBp2x+mI1ceMyD0OaGfG9DMxmStcUCgiNKCpk5V3sRAdNMXFdQzTKm+lENHvZ8IxlcdQywemJEYgU7NqX3rt0SXbCWerTZ3vfp7lIHnWijGuYmakyi70= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=F2pCbso4; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="F2pCbso4" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d7e3f1fc01so18351593a12.2 for ; Mon, 30 Dec 2024 06:24:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1735568656; x=1736173456; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kxGAZwLqgzTlNCxgVSyrh1FCKX+2hwF4QSuh41Pzwn4=; b=F2pCbso4fTKJut25cIsUett+6uVsD+w3MBBrUy0O+asB+40+PjgPxWc/8y6pZa5zou 3NToNpgOP4avrnCCxSRTiLFAid/L7CaeFSvtx6VdB4eBNuec35LAHEkBPdx/cGIHdH35 IE58uw6RX78S+CpbavIUHKZl6iLhUb5R3CE7XJ0RF3FhBnA04BZdJ4D76BuuknTWiaYS EjBxPvBvq7hFfDk33DtxXskgJgtyTkbiSGWsawsH+8dSr0n9IcK2jG9PNUPp81PdR7Vm 738HCrfX0/BHoXZCnbQbDVsgpcRs/Xeln+NNgRPCk35lvwYW43tooUpRGNtVAyPIBwkz sXjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735568656; x=1736173456; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kxGAZwLqgzTlNCxgVSyrh1FCKX+2hwF4QSuh41Pzwn4=; b=TuutYpjxwQSWzsCKvHZtI957vkXAFGUyzzsFxhKyV40qvh6Zq2PlqJWqt10yWVF0We THMbct187eFhI3FJ9//AOI+onO2qMvJUtU/nlbUDn3x9CI/SdlWDcXlxgNSl47kbGxIf MS5Ds3IowbNkwbXB4FIIZ0idaMFDnnC4tslJ742SU+o8W59hq5/paMTW8s04oGvO/fRi S4GG0e9eR6l1Xp9e81f+NqHhIcb9HVmwHERJuVzab0hHPuFsIwNpHVqQHNwVop3wojM/ fzH2Ijvnnf3SI9p+BcBWsJxEudWpG+1pq1QAJKD0BmjToILi7x+4KM2Jyh+Tg8vclpFQ /1tg== X-Forwarded-Encrypted: i=1; AJvYcCWR6FEC8cGEj5DS4+tx55yXPfnILsvNUgvaIJugB5gbKQ+pip1m4pHuhO2TrgB8hr5Z3mlxv3kREDI2hcM=@vger.kernel.org X-Gm-Message-State: AOJu0YxUU8GFOAaAtOECVlNYuehuJXNjL/o04fzkg3E94xUT6w++hLJ7 VB9Jzp5aZHGtG8qnbTF/keC0kYx+H/NjpnEuAUytre8NsmacPBkxrzDMQGlPVpg= X-Gm-Gg: ASbGncvcVk/hJ+TMV21tew2dwTNVrzV+cu9yqaefKbG+kf2BSortIuaAQv+tZAQFbgo ctxNwwyCWau+K+wFuk6qfdBR/S6kmXIBftrxZKF43o4l1fNMwF+zk1KL7UggPiHqql1dX8C57Rf BQ2FC/t1rIYMeUQZCOTwWMWFtRjjUrYVE3owR7uU+wD9utfXaSn4WaNCVUhotT0vLIzUhAgA3MC X+K4DA0ryvNWjT3g3W7dFkfNpUGe/AUf/ACXjNbLscNl2dPp/T+OuONk5forS1LTN8KJMp1mxeb TMYLskMQug== X-Google-Smtp-Source: AGHT+IFXCO7/R+hV99Zloto/k//1v9ZXKgxYxFO5PKomrRxzwp7CGxOMNf+XNgwBH6mUUdnCkmU/VQ== X-Received: by 2002:a05:6402:358f:b0:5d3:e63c:7d71 with SMTP id 4fb4d7f45d1cf-5d81dd90636mr28573490a12.11.1735568656369; Mon, 30 Dec 2024 06:24:16 -0800 (PST) Received: from localhost (p50915bc6.dip0.t-ipconnect.de. [80.145.91.198]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80701c94csm14729504a12.85.2024.12.30.06.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 06:24:16 -0800 (PST) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Matthias Maennich , Jonathan Corbet , Masahiro Yamada Cc: Andy Shevchenko , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] doc: module: DEFAULT_SYMBOL_NAMESPACE must be defined before #includes Date: Mon, 30 Dec 2024 15:24:00 +0100 Message-ID: <20241230142357.3203913-6-u.kleine-koenig@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241230142357.3203913-4-u.kleine-koenig@baylibre.com> References: <20241230142357.3203913-4-u.kleine-koenig@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1623; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=7H5NeV/Cd9MbRtA6mmk+DcOGx5EEmgZqhra692U74/Q=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBncq0DEyW5r15ek2cUo+yeDb7/RlHgMR5AkHUWU /nJw3CnZ+CJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZ3KtAwAKCRCPgPtYfRL+ TnvaB/wIr0tyALQw7nPSOaKZnX7O3LLCFd9mtrabBuY7wS9And9XNgH74alto5gS7I1ZSvTktb4 oI1EpQ41YpUA3Bc9kS1ix6uH8QMfaR5gjrRfSOp0rgdpwc+ae82+5kHm4OwTGEBHXxnFZ4tEuGK tXk4j8WHsv0OtQLWwvnbUyoscqzB2diKy2zPLiO1SAdTyjbFO4qq1QY+4SoMfTphoswNcyX0zjL efD2eUHciVlWMdiD4ZfEg9ejnvUiT+EUVBfR4TUVaVP35G/bd/xDBKe8ER9b6Y4yefmENMU3TIU cp9jmHeOOZy5dbrXdYC8zW7D2/K6FTDRle6kbBP2mje4p09e X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable The definition of EXPORT_SYMBOL et al depends on DEFAULT_SYMBOL_NAMESPACE. So DEFAULT_SYMBOL_NAMESPACE must already be available when is parsed. Also when defined that early there is no need for an #undef, so drop that from the usage example. Reported-by: Andy Shevchenko Link: https://lore.kernel.org/linux-i2c/Z09bp9uMzwXRLXuF@smile.fi.intel.com/ Signed-off-by: Uwe Kleine-K=C3=B6nig Link: https://lore.kernel.org/r/3dd7ff6fa0a636de86e091286016be8c90e03631.17= 33305665.git.ukleinek@kernel.org --- Documentation/core-api/symbol-namespaces.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/core-api/symbol-namespaces.rst b/Documentation/c= ore-api/symbol-namespaces.rst index 473d025657fd..06f766a6aab2 100644 --- a/Documentation/core-api/symbol-namespaces.rst +++ b/Documentation/core-api/symbol-namespaces.rst @@ -78,11 +78,10 @@ as this argument has preference over a default symbol n= amespace. A second option to define the default namespace is directly in the compila= tion unit as preprocessor statement. The above example would then read:: =20 - #undef DEFAULT_SYMBOL_NAMESPACE #define DEFAULT_SYMBOL_NAMESPACE "USB_COMMON" =20 -within the corresponding compilation unit before any EXPORT_SYMBOL macro is -used. +within the corresponding compilation unit before the #include for +. Typically it's placed before the first #include statemen= t. =20 3. How to use Symbols exported in Namespaces =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.45.2