Skip to content

Commit

Permalink
doc: module: revert misconversions for MODULE_IMPORT_NS()
Browse files Browse the repository at this point in the history
This reverts the misconversions introduced by commit cdd30eb
("module: Convert symbol namespace to string literal").

The affected descriptions refer to MODULE_IMPORT_NS() tags in general,
rather than suggesting the use of the empty string ("") as the
namespace.

Fixes: cdd30eb ("module: Convert symbol namespace to string literal")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Masahiro Yamada authored and Linus Torvalds committed Dec 3, 2024
1 parent 62aa6f2 commit 3727b1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Documentation/core-api/symbol-namespaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ inspected with modinfo::
[...]


It is advisable to add the MODULE_IMPORT_NS("") statement close to other module
It is advisable to add the MODULE_IMPORT_NS() statement close to other module
metadata definitions like MODULE_AUTHOR() or MODULE_LICENSE(). Refer to section
5. for a way to create missing import statements automatically.

Expand All @@ -128,7 +128,7 @@ enable loading regardless, but will emit a warning.
Missing namespaces imports can easily be detected at build time. In fact,
modpost will emit a warning if a module uses a symbol from a namespace
without importing it.
MODULE_IMPORT_NS("") statements will usually be added at a definite location
MODULE_IMPORT_NS() statements will usually be added at a definite location
(along with other module meta data). To make the life of module authors (and
subsystem maintainers) easier, a script and make target is available to fixup
missing imports. Fixing missing imports can be done with::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ modinfo::
[...]


Si consiglia di posizionare la dichiarazione MODULE_IMPORT_NS("") vicino
Si consiglia di posizionare la dichiarazione MODULE_IMPORT_NS() vicino
ai metadati del modulo come MODULE_AUTHOR() o MODULE_LICENSE(). Fate
riferimento alla sezione 5. per creare automaticamente le importazioni
mancanti.
Expand All @@ -131,7 +131,7 @@ emetterà un avviso.
La mancanza di un'importazione può essere individuata facilmente al momento
della compilazione. Infatti, modpost emetterà un avviso se il modulo usa
un simbolo da uno spazio dei nomi che non è stato importato.
La dichiarazione MODULE_IMPORT_NS("") viene solitamente aggiunta in un posto
La dichiarazione MODULE_IMPORT_NS() viene solitamente aggiunta in un posto
ben definito (assieme agli altri metadati del modulo). Per facilitare
la vita di chi scrive moduli (e i manutentori di sottosistemi), esistono uno
script e un target make per correggere le importazioni mancanti. Questo può
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
[...]


建议将 MODULE_IMPORT_NS("") 语句添加到靠近其他模块元数据定义的地方,
建议将 MODULE_IMPORT_NS() 语句添加到靠近其他模块元数据定义的地方,
如 MODULE_AUTHOR() 或 MODULE_LICENSE() 。关于自动创建缺失的导入
语句的方法,请参考第5节。

Expand All @@ -118,7 +118,7 @@ EINVAL方式失败。要允许加载不满足这个前提条件的模块,可

缺少命名空间的导入可以在构建时很容易被检测到。事实上,如果一个模块
使用了一个命名空间的符号而没有导入它,modpost会发出警告。
MODULE_IMPORT_NS("")语句通常会被添加到一个明确的位置(和其他模块元
MODULE_IMPORT_NS()语句通常会被添加到一个明确的位置(和其他模块元
数据一起)。为了使模块作者(和子系统维护者)的生活更加轻松,我们提
供了一个脚本和make目标来修复丢失的导入。修复丢失的导入可以用::

Expand Down

0 comments on commit 3727b1a

Please sign in to comment.