From a4c174ca8d8f747b7c5e82f64a2c5ddca67cd1ac Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:27 +0200 Subject: docs: kernel-docs: order reference from newest to oldest The documents on each section of this document are ordered by its published date, from the newest to the oldest. In the kernel-docs.rst, the references on each section of this document are intended to be ordered by its published date, from the newest to the oldest. The Linux Kernel Module Programming Guide was published in 2021; so, it is placed at the top as the most recent publication after the rolling-version "Linux Kernel Mailing List Glossary" reference. Fixes: 630c8fa02f9a ("Documentation: Update details of The Linux Kernel Module Programming Guide") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-2-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/process/kernel-docs.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/process/kernel-docs.rst b/Documentation/process/kernel-docs.rst index da9527502ef0..b4d98f6f797a 100644 --- a/Documentation/process/kernel-docs.rst +++ b/Documentation/process/kernel-docs.rst @@ -83,6 +83,18 @@ On-line docs Finally this trace-log is used as base for more a exact conceptual exploration and description of the Linux TCP/IP implementation.* + * Title: **The Linux Kernel Module Programming Guide** + + :Author: Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, + Jim Huang. + :URL: https://sysprog21.github.io/lkmpg/ + :Date: 2021 + :Keywords: modules, GPL book, /proc, ioctls, system calls, + interrupt handlers . + :Description: A very nice GPL book on the topic of modules + programming. Lots of examples. Currently the new version is being + actively maintained at https://github.com/sysprog21/lkmpg. + * Title: **On submitting kernel Patches** :Author: Andi Kleen @@ -126,18 +138,6 @@ On-line docs describes how to write user-mode utilities for communicating with Card Services. - * Title: **The Linux Kernel Module Programming Guide** - - :Author: Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, - Jim Huang. - :URL: https://sysprog21.github.io/lkmpg/ - :Date: 2021 - :Keywords: modules, GPL book, /proc, ioctls, system calls, - interrupt handlers . - :Description: A very nice GPL book on the topic of modules - programming. Lots of examples. Currently the new version is being - actively maintained at https://github.com/sysprog21/lkmpg. - * Title: **Global spinlock list and usage** :Author: Rick Lindsley. -- cgit v1.2.3 From 615041d42a1a03a024d0013390961d105bf2e05e Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:28 +0200 Subject: docs: kernel-docs: shorten the lengthy doc title The original title comes from copying the content from a web page that covered various mixed computer-science material. Within the kernel documentation and its current structure, the title can be shortened. Other titles considered, but not selected were: - Index of More Kernel Documentation - Further Kernel Documentation - References to Further Kernel Documentation Shorten the title. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-3-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/process/kernel-docs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/process/kernel-docs.rst b/Documentation/process/kernel-docs.rst index b4d98f6f797a..5d6fa71895cc 100644 --- a/Documentation/process/kernel-docs.rst +++ b/Documentation/process/kernel-docs.rst @@ -1,7 +1,7 @@ .. _kernel_docs: -Index of Documentation for People Interested in Writing and/or Understanding the Linux Kernel -============================================================================================= +Index of Further Kernel Documentation +===================================== Juan-Mariano de Goyeneche -- cgit v1.2.3 From f46b4b168cdb3b16ae8c7792c28d0b921db1932b Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:29 +0200 Subject: docs: kernel-docs: reflect that it is community-maintained Remove and rephrase statements that only make sense if a single author exclusively would maintain this document, but we would really want to consider this being a page maintained by the kernel community, as it is placed in the kernel repository, and let us hope that more contributors suggest some more documents. Further, do some minor word-smithing. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-4-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/process/kernel-docs.rst | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Documentation/process/kernel-docs.rst b/Documentation/process/kernel-docs.rst index 5d6fa71895cc..b2523267ffc7 100644 --- a/Documentation/process/kernel-docs.rst +++ b/Documentation/process/kernel-docs.rst @@ -3,7 +3,8 @@ Index of Further Kernel Documentation ===================================== - Juan-Mariano de Goyeneche +Initial Author: Juan-Mariano de Goyeneche (; +email address is defunct now.) The need for a document like this one became apparent in the linux-kernel mailing list as the same questions, asking for pointers @@ -16,21 +17,16 @@ philosophy and design decisions behind this code. Unfortunately, not many documents are available for beginners to start. And, even if they exist, there was no "well-known" place which -kept track of them. These lines try to cover this lack. All documents -available on line known by the author are listed, while some reference -books are also mentioned. +kept track of them. These lines try to cover this lack. PLEASE, if you know any paper not listed here or write a new document, -send me an e-mail, and I'll include a reference to it here. Any -corrections, ideas or comments are also welcomed. +include a reference to it here, following the kernel's patch submission +process. Any corrections, ideas or comments are also welcome. -The papers that follow are listed in no particular order. All are -cataloged with the following fields: the document's "Title", the -"Author"/s, the "URL" where they can be found, some "Keywords" helpful -when searching for specific topics, and a brief "Description" of the -Document. - -Enjoy! +All documents are cataloged with the following fields: the document's +"Title", the "Author"/s, the "URL" where they can be found, some +"Keywords" helpful when searching for specific topics, and a brief +"Description" of the Document. .. note:: -- cgit v1.2.3 From 6c568f6a42ab77e5a299ea152efc89f38d88f334 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:30 +0200 Subject: docs: kernel-docs: add a reference mentioned in submitting-drivers.rst One section in submitting-drivers.rst was just a collection of references to other external documentation. All except the one added in this commit is already mentioned in kernel-docs or other places in the kernel documentation. Add Arjan van de Ven's article on How to NOT write kernel driver to this index of further kernel documentation. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-5-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/process/kernel-docs.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/process/kernel-docs.rst b/Documentation/process/kernel-docs.rst index b2523267ffc7..502289d63385 100644 --- a/Documentation/process/kernel-docs.rst +++ b/Documentation/process/kernel-docs.rst @@ -134,6 +134,20 @@ On-line docs describes how to write user-mode utilities for communicating with Card Services. + * Title: **How NOT to write kernel drivers** + + :Author: Arjan van de Ven. + :URL: https://landley.net/kdocs/ols/2002/ols2002-pages-545-555.pdf + :Date: 2002 + :Keywords: driver. + :Description: Programming bugs and Do-nots in kernel driver development + :Abstract: *Quit a few tutorials, articles and books give an introduction + on how to write Linux kernel drivers. Unfortunately the things one + should NOT do in Linux kernel code is either only a minor appendix + or, more commonly, completely absent. This paper tries to briefly touch + the areas in which the most common and serious bugs and do-nots are + encountered.* + * Title: **Global spinlock list and usage** :Author: Rick Lindsley. -- cgit v1.2.3 From 3cb5e516869e2f53b8fc5732f9db140fe539d53d Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:31 +0200 Subject: docs: admin: devices: drop confusing outdated statement on Latex The statement that the Latex version of Linux Device List is unmaintained, must go back to some historic time where there were actually two separate document sources, one in a txt format and another in a tex format (maybe even just on lanana.org). Nowadays, html and tex are generated from the ReST document file and the statement might be confused, believing the actual generated LaTeX document from the maintained ReST document could be an unmaintained one. Remove this statement on the LaTeX version and only keep pointing out that the version on lanana.org is no longer maintained. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-6-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/admin-guide/devices.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/devices.rst b/Documentation/admin-guide/devices.rst index 035275fedbdd..e3776d77374b 100644 --- a/Documentation/admin-guide/devices.rst +++ b/Documentation/admin-guide/devices.rst @@ -7,10 +7,9 @@ This list is the Linux Device List, the official registry of allocated device numbers and ``/dev`` directory nodes for the Linux operating system. -The LaTeX version of this document is no longer maintained, nor is -the document that used to reside at lanana.org. This version in the -mainline Linux kernel is the master document. Updates shall be sent -as patches to the kernel maintainers (see the +The version of this document at lanana.org is no longer maintained. This +version in the mainline Linux kernel is the master document. Updates +shall be sent as patches to the kernel maintainers (see the :ref:`Documentation/process/submitting-patches.rst ` document). Specifically explore the sections titled "CHAR and MISC DRIVERS", and "BLOCK LAYER" in the MAINTAINERS file to find the right maintainers -- cgit v1.2.3 From 9db370de278087321840ea904d877803a78fba71 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:32 +0200 Subject: docs: process: remove outdated submitting-drivers.rst Commit 31b24bee3357 ("docs: add a warning to submitting-drivers.rst") in October 2016 already warns "This (...) should maybe just be deleted, but I'm not quite ready to do that yet". Maybe, six years ago, we were not ready but let us remove old content for the better now and structure and maintain less content in the kernel documentation with a better result. Drop this already outdated document and adjust all textual references. Here is an argument why deleting the content will not remove any useful information to the existing kernel documentation, individually broken down for each section. Section "Allocating Device Numbers" refers to https://www.lanana.org/, and then refers to Documentation/admin-guide/devices.rst. However, the devices.rst clearly states: "The version of this document at lanana.org is no longer maintained." Everything needed for submitting drivers is already stated in devices.rst and the reference to https://www.lanana.org/ is outdated, and should be just deleted. Section "Who To Submit Drivers To" is all about Linux 2.0 - 2.6, before the new release version scheme; the mentioned developers are still around, but actually not the first developers to contact anymore. Section "What Criteria Determine Acceptance" has a few bullet points: Licensing and Copyright is well-covered in process/kernel-license.rst. Interfaces, Code, Portability, Clarity state some obvious things about ensuring kernel code quality. Control suggests to add a MAINTAINERS entry, which is already mentioned in 6.Followthrough.rst: "... added yourself to the MAINTAINERS file..." PM support states a bit about implementing and testing power management of a driver, it remains an open question where to place that in the process documents. Driver developers interested in power management will find the corresponding part on power management in the kernel documentation anyway. In section "What Criteria Do Not Determine Acceptance", the points Vendor and Author states something basic consequence of the kernel being an open-source community software development. Probably no need to mention it nowadays. Section "Resources" lists resources that are also mentioned elsewhere more central. - Linux kernel tree and mailing list is mentioned in many places. - https://lwn.net/Kernel/LDD3/ is mentioned in Documentation/process/kernel-docs.rst. - https://lwn.net/ is mentioned in: - Documentation/process/8.Conclusion.rst - Documentation/process/kernel-docs.rst - https://kernelnewbies.org/ is mentioned in: - Documentation/process/8.Conclusion.rst - Documentation/process/kernel-docs.rst - http://www.linux-usb.org/ is mentioned in Documentation/driver-api/usb/usb.rst - https://landley.net/kdocs/ols/2002/ols2002-pages-545-555.pdf is mentioned in Documentation/process/kernel-docs.rst - https://kernelnewbies.org/KernelJanitors is mentioned in Documentation/process/howto.rst - https://git-scm.com/ is mentioned in - Documentation/process/2.Process.rst - Documentation/process/7.AdvancedTopics.rst - Documentation/process/howto.rst Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-7-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/hwmon/submitting-patches.rst | 1 - Documentation/kernel-hacking/hacking.rst | 3 +- Documentation/process/5.Posting.rst | 3 +- Documentation/process/8.Conclusion.rst | 16 +-- Documentation/process/howto.rst | 4 +- Documentation/process/index.rst | 1 - Documentation/process/submitting-drivers.rst | 194 --------------------------- Documentation/process/submitting-patches.rst | 5 +- 8 files changed, 13 insertions(+), 214 deletions(-) delete mode 100644 Documentation/process/submitting-drivers.rst diff --git a/Documentation/hwmon/submitting-patches.rst b/Documentation/hwmon/submitting-patches.rst index 9a218ea996d8..d953ee763c96 100644 --- a/Documentation/hwmon/submitting-patches.rst +++ b/Documentation/hwmon/submitting-patches.rst @@ -12,7 +12,6 @@ increase the chances of your change being accepted. * It should be unnecessary to mention, but please read and follow: - Documentation/process/submit-checklist.rst - - Documentation/process/submitting-drivers.rst - Documentation/process/submitting-patches.rst - Documentation/process/coding-style.rst diff --git a/Documentation/kernel-hacking/hacking.rst b/Documentation/kernel-hacking/hacking.rst index ebd9d90882ea..9a1f020c8449 100644 --- a/Documentation/kernel-hacking/hacking.rst +++ b/Documentation/kernel-hacking/hacking.rst @@ -755,8 +755,7 @@ make a neat patch, there's administrative work to be done: it implies a more-than-passing commitment to some part of the code. - Finally, don't forget to read - ``Documentation/process/submitting-patches.rst`` and possibly - ``Documentation/process/submitting-drivers.rst``. + ``Documentation/process/submitting-patches.rst`` Kernel Cantrips =============== diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst index bd36ecb29409..906235c11c24 100644 --- a/Documentation/process/5.Posting.rst +++ b/Documentation/process/5.Posting.rst @@ -10,8 +10,7 @@ of conventions and procedures which are used in the posting of patches; following them will make life much easier for everybody involved. This document will attempt to cover these expectations in reasonable detail; more information can also be found in the files -:ref:`Documentation/process/submitting-patches.rst `, -:ref:`Documentation/process/submitting-drivers.rst ` +:ref:`Documentation/process/submitting-patches.rst ` and :ref:`Documentation/process/submit-checklist.rst `. diff --git a/Documentation/process/8.Conclusion.rst b/Documentation/process/8.Conclusion.rst index b32a40215858..8c847dffe76b 100644 --- a/Documentation/process/8.Conclusion.rst +++ b/Documentation/process/8.Conclusion.rst @@ -5,15 +5,13 @@ For more information There are numerous sources of information on Linux kernel development and related topics. First among those will always be the Documentation -directory found in the kernel source distribution. The top-level :ref:`process/howto.rst ` -file is an important starting point; :ref:`process/submitting-patches.rst ` -and :ref:`process/submitting-drivers.rst ` -are also something which all kernel developers should -read. Many internal kernel APIs are documented using the kerneldoc -mechanism; "make htmldocs" or "make pdfdocs" can be used to generate those -documents in HTML or PDF format (though the version of TeX shipped by some -distributions runs into internal limits and fails to process the documents -properly). +directory found in the kernel source distribution. Start with the +top-level :ref:`process/howto.rst `; also read +:ref:`process/submitting-patches.rst `. Many internal +kernel APIs are documented using the kerneldoc mechanism; "make htmldocs" +or "make pdfdocs" can be used to generate those documents in HTML or PDF +format (though the version of TeX shipped by some distributions runs into +internal limits and fails to process the documents properly). Various web sites discuss kernel development at all levels of detail. Your author would like to humbly suggest https://lwn.net/ as a source; diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst index e4beeca57e5f..cd6997a9d203 100644 --- a/Documentation/process/howto.rst +++ b/Documentation/process/howto.rst @@ -105,8 +105,8 @@ required reading: patches if these rules are followed, and many people will only review code if it is in the proper style. - :ref:`Documentation/process/submitting-patches.rst ` and :ref:`Documentation/process/submitting-drivers.rst ` - These files describe in explicit detail how to successfully create + :ref:`Documentation/process/submitting-patches.rst ` + This file describes in explicit detail how to successfully create and send a patch, including (but not limited to): - Email contents diff --git a/Documentation/process/index.rst b/Documentation/process/index.rst index 3587dae4d0ef..2ba2a1582bbe 100644 --- a/Documentation/process/index.rst +++ b/Documentation/process/index.rst @@ -40,7 +40,6 @@ Other guides to the community that are of interest to most developers are: :maxdepth: 1 changes - submitting-drivers stable-api-nonsense management-style stable-kernel-rules diff --git a/Documentation/process/submitting-drivers.rst b/Documentation/process/submitting-drivers.rst deleted file mode 100644 index 8413b693d10d..000000000000 --- a/Documentation/process/submitting-drivers.rst +++ /dev/null @@ -1,194 +0,0 @@ -.. _submittingdrivers: - -Submitting Drivers For The Linux Kernel -======================================= - -This document is intended to explain how to submit device drivers to the -various kernel trees. Note that if you are interested in video card drivers -you should probably talk to XFree86 (https://www.xfree86.org/) and/or X.Org -(https://x.org/) instead. - -.. note:: - - This document is old and has seen little maintenance in recent years; it - should probably be updated or, perhaps better, just deleted. Most of - what is here can be found in the other development documents anyway. - - Oh, and we don't really recommend submitting changes to XFree86 :) - -Also read the :ref:`Documentation/process/submitting-patches.rst ` -document. - - -Allocating Device Numbers -------------------------- - -Major and minor numbers for block and character devices are allocated -by the Linux assigned name and number authority (currently this is -Torben Mathiasen). The site is https://www.lanana.org/. This -also deals with allocating numbers for devices that are not going to -be submitted to the mainstream kernel. -See :ref:`Documentation/admin-guide/devices.rst ` -for more information on this. - -If you don't use assigned numbers then when your device is submitted it will -be given an assigned number even if that is different from values you may -have shipped to customers before. - -Who To Submit Drivers To ------------------------- - -Linux 2.0: - No new drivers are accepted for this kernel tree. - -Linux 2.2: - No new drivers are accepted for this kernel tree. - -Linux 2.4: - If the code area has a general maintainer then please submit it to - the maintainer listed in MAINTAINERS in the kernel file. If the - maintainer does not respond or you cannot find the appropriate - maintainer then please contact Willy Tarreau . - -Linux 2.6 and upper: - The same rules apply as 2.4 except that you should follow linux-kernel - to track changes in API's. The final contact point for Linux 2.6+ - submissions is Andrew Morton. - -What Criteria Determine Acceptance ----------------------------------- - -Licensing: - The code must be released to us under the - GNU General Public License. If you wish the driver to be - useful to other communities such as BSD you may release - under multiple licenses. If you choose to release under - licenses other than the GPL, you should include your - rationale for your license choices in your cover letter. - See accepted licenses at include/linux/module.h - -Copyright: - The copyright owner must agree to use of GPL. - It's best if the submitter and copyright owner - are the same person/entity. If not, the name of - the person/entity authorizing use of GPL should be - listed in case it's necessary to verify the will of - the copyright owner. - -Interfaces: - If your driver uses existing interfaces and behaves like - other drivers in the same class it will be much more likely - to be accepted than if it invents gratuitous new ones. - If you need to implement a common API over Linux and NT - drivers do it in userspace. - -Code: - Please use the Linux style of code formatting as documented - in :ref:`Documentation/process/coding-style.rst `. - If you have sections of code - that need to be in other formats, for example because they - are shared with a windows driver kit and you want to - maintain them just once separate them out nicely and note - this fact. - -Portability: - Pointers are not always 32bits, not all computers are little - endian, people do not all have floating point and you - shouldn't use inline x86 assembler in your driver without - careful thought. Pure x86 drivers generally are not popular. - If you only have x86 hardware it is hard to test portability - but it is easy to make sure the code can easily be made - portable. - -Clarity: - It helps if anyone can see how to fix the driver. It helps - you because you get patches not bug reports. If you submit a - driver that intentionally obfuscates how the hardware works - it will go in the bitbucket. - -PM support: - Since Linux is used on many portable and desktop systems, your - driver is likely to be used on such a system and therefore it - should support basic power management by implementing, if - necessary, the .suspend and .resume methods used during the - system-wide suspend and resume transitions. You should verify - that your driver correctly handles the suspend and resume, but - if you are unable to ensure that, please at least define the - .suspend method returning the -ENOSYS ("Function not - implemented") error. You should also try to make sure that your - driver uses as little power as possible when it's not doing - anything. For the driver testing instructions see - Documentation/power/drivers-testing.rst and for a relatively - complete overview of the power management issues related to - drivers see :ref:`Documentation/driver-api/pm/devices.rst `. - -Control: - In general if there is active maintenance of a driver by - the author then patches will be redirected to them unless - they are totally obvious and without need of checking. - If you want to be the contact and update point for the - driver it is a good idea to state this in the comments, - and include an entry in MAINTAINERS for your driver. - -What Criteria Do Not Determine Acceptance ------------------------------------------ - -Vendor: - Being the hardware vendor and maintaining the driver is - often a good thing. If there is a stable working driver from - other people already in the tree don't expect 'we are the - vendor' to get your driver chosen. Ideally work with the - existing driver author to build a single perfect driver. - -Author: - It doesn't matter if a large Linux company wrote the driver, - or you did. Nobody has any special access to the kernel - tree. Anyone who tells you otherwise isn't telling the - whole story. - - -Resources ---------- - -Linux kernel master tree: - ftp.\ *country_code*\ .kernel.org:/pub/linux/kernel/... - - where *country_code* == your country code, such as - **us**, **uk**, **fr**, etc. - - https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git - -Linux kernel mailing list: - linux-kernel@vger.kernel.org - [mail majordomo@vger.kernel.org to subscribe] - -Linux Device Drivers, Third Edition (covers 2.6.10): - https://lwn.net/Kernel/LDD3/ (free version) - -LWN.net: - Weekly summary of kernel development activity - https://lwn.net/ - - 2.6 API changes: - - https://lwn.net/Articles/2.6-kernel-api/ - - Porting drivers from prior kernels to 2.6: - - https://lwn.net/Articles/driver-porting/ - -KernelNewbies: - Documentation and assistance for new kernel programmers - - https://kernelnewbies.org/ - -Linux USB project: - http://www.linux-usb.org/ - -How to NOT write kernel driver by Arjan van de Ven: - https://landley.net/kdocs/ols/2002/ols2002-pages-545-555.pdf - -Kernel Janitor: - https://kernelnewbies.org/KernelJanitors - -GIT, Fast Version Control System: - https://git-scm.com/ diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst index a1cb6280fbcf..be49d8f2601b 100644 --- a/Documentation/process/submitting-patches.rst +++ b/Documentation/process/submitting-patches.rst @@ -12,9 +12,8 @@ This document contains a large number of suggestions in a relatively terse format. For detailed information on how the kernel development process works, see Documentation/process/development-process.rst. Also, read Documentation/process/submit-checklist.rst -for a list of items to check before submitting code. If you are submitting -a driver, also read Documentation/process/submitting-drivers.rst; for device -tree binding patches, read +for a list of items to check before submitting code. +For device tree binding patches, read Documentation/devicetree/bindings/submitting-patches.rst. This documentation assumes that you're using ``git`` to prepare your patches. -- cgit v1.2.3 From 26f200c9e56fefbcd7d302db1019b955ea20bc98 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:33 +0200 Subject: docs: it_IT: align to submitting-drivers removal Adjust the Italian translation to the removal of submitting-drivers in the English kernel documentation, with some assistance from Frederico Vaga. Link: https://lore.kernel.org/linux-doc/20220628091647.xf5cygybqemwprgb@numero86.vaga.pv.it/ Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-8-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- .../translations/it_IT/kernel-hacking/hacking.rst | 3 +-- Documentation/translations/it_IT/process/5.Posting.rst | 5 ++--- .../translations/it_IT/process/8.Conclusion.rst | 5 ++--- Documentation/translations/it_IT/process/howto.rst | 3 +-- Documentation/translations/it_IT/process/index.rst | 1 - .../translations/it_IT/process/submitting-drivers.rst | 16 ---------------- .../translations/it_IT/process/submitting-patches.rst | 6 ++---- 7 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 Documentation/translations/it_IT/process/submitting-drivers.rst diff --git a/Documentation/translations/it_IT/kernel-hacking/hacking.rst b/Documentation/translations/it_IT/kernel-hacking/hacking.rst index d5c521327f6a..4bec4669cf48 100644 --- a/Documentation/translations/it_IT/kernel-hacking/hacking.rst +++ b/Documentation/translations/it_IT/kernel-hacking/hacking.rst @@ -795,8 +795,7 @@ anche per avere patch pulite, c'è del lavoro amministrativo da fare: di un semplice impegno su una parte del codice. - Infine, non dimenticatevi di leggere - ``Documentation/process/submitting-patches.rst`` e possibilmente anche - ``Documentation/process/submitting-drivers.rst``. + ``Documentation/process/submitting-patches.rst``. Trucchetti del kernel ===================== diff --git a/Documentation/translations/it_IT/process/5.Posting.rst b/Documentation/translations/it_IT/process/5.Posting.rst index 1476d51eb5e5..a036f38fc82e 100644 --- a/Documentation/translations/it_IT/process/5.Posting.rst +++ b/Documentation/translations/it_IT/process/5.Posting.rst @@ -16,9 +16,8 @@ e di procedure per la pubblicazione delle patch; seguirle renderà la vita più facile a tutti quanti. Questo documento cercherà di coprire questi argomenti con un ragionevole livello di dettaglio; più informazioni possono essere trovare nella cartella 'Documentation', nei file -:ref:`translations/it_IT/process/submitting-patches.rst `, -:ref:`translations/it_IT/process/submitting-drivers.rst `, e -:ref:`translations/it_IT/process/submit-checklist.rst `. +:ref:`translations/it_IT/process/submitting-patches.rst ` +e :ref:`translations/it_IT/process/submit-checklist.rst `. Quando pubblicarle diff --git a/Documentation/translations/it_IT/process/8.Conclusion.rst b/Documentation/translations/it_IT/process/8.Conclusion.rst index 039bfc5a4108..32659ff467c0 100644 --- a/Documentation/translations/it_IT/process/8.Conclusion.rst +++ b/Documentation/translations/it_IT/process/8.Conclusion.rst @@ -13,9 +13,8 @@ e argomenti correlati. Primo tra questi sarà sempre la cartella Documentation che si trova nei sorgenti kernel. Il file :ref:`process/howto.rst ` è un punto di partenza -importante; :ref:`process/submitting-patches.rst ` e -:ref:`process/submitting-drivers.rst ` sono -anch'essi qualcosa che tutti gli sviluppatori del kernel dovrebbero leggere. +importante; :ref:`process/submitting-patches.rst ` è +anch'esso qualcosa che tutti gli sviluppatori del kernel dovrebbero leggere. Molte API interne al kernel sono documentate utilizzando il meccanismo kerneldoc; "make htmldocs" o "make pdfdocs" possono essere usati per generare quei documenti in HTML o PDF (sebbene le versioni di TeX di alcune diff --git a/Documentation/translations/it_IT/process/howto.rst b/Documentation/translations/it_IT/process/howto.rst index 9554368a2ae2..16ad5622d549 100644 --- a/Documentation/translations/it_IT/process/howto.rst +++ b/Documentation/translations/it_IT/process/howto.rst @@ -109,8 +109,7 @@ Di seguito una lista di file che sono presenti nei sorgente del kernel e che accetteranno patch solo se queste osserveranno tali regole, e molte persone revisioneranno il codice solo se scritto nello stile appropriato. - :ref:`Documentation/translations/it_IT/process/submitting-patches.rst ` e - :ref:`Documentation/translations/it_IT/process/submitting-drivers.rst ` + :ref:`Documentation/translations/it_IT/process/submitting-patches.rst ` Questo file descrive dettagliatamente come creare ed inviare una patch con successo, includendo (ma non solo questo): diff --git a/Documentation/translations/it_IT/process/index.rst b/Documentation/translations/it_IT/process/index.rst index c4c867132c88..b223b70a4a95 100644 --- a/Documentation/translations/it_IT/process/index.rst +++ b/Documentation/translations/it_IT/process/index.rst @@ -41,7 +41,6 @@ degli sviluppatori: :maxdepth: 1 changes - submitting-drivers stable-api-nonsense management-style stable-kernel-rules diff --git a/Documentation/translations/it_IT/process/submitting-drivers.rst b/Documentation/translations/it_IT/process/submitting-drivers.rst deleted file mode 100644 index dadd77e47613..000000000000 --- a/Documentation/translations/it_IT/process/submitting-drivers.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. include:: ../disclaimer-ita.rst - -:Original: :ref:`Documentation/process/submitting-drivers.rst ` -:Translator: Federico Vaga - -.. _it_submittingdrivers: - -Sottomettere driver per il kernel Linux -======================================= - -.. note:: - - Questo documento è vecchio e negli ultimi anni non è stato più aggiornato; - dovrebbe essere aggiornato, o forse meglio, rimosso. La maggior parte di - quello che viene detto qui può essere trovato anche negli altri documenti - dedicati allo sviluppo. Per questo motivo il documento non verrà tradotto. diff --git a/Documentation/translations/it_IT/process/submitting-patches.rst b/Documentation/translations/it_IT/process/submitting-patches.rst index 4fb5b3aa306d..f117ee0a36e2 100644 --- a/Documentation/translations/it_IT/process/submitting-patches.rst +++ b/Documentation/translations/it_IT/process/submitting-patches.rst @@ -18,10 +18,8 @@ Questo documento contiene un vasto numero di suggerimenti concisi. Per maggiori dettagli su come funziona il processo di sviluppo del kernel leggete Documentation/translations/it_IT/process/development-process.rst. Leggete anche Documentation/translations/it_IT/process/submit-checklist.rst per una lista di -punti da verificare prima di inviare del codice. Se state inviando un driver, -allora leggete anche -Documentation/translations/it_IT/process/submitting-drivers.rst; per delle patch -relative alle associazioni per Device Tree leggete +punti da verificare prima di inviare del codice. +Per delle patch relative alle associazioni per Device Tree leggete Documentation/translations/it_IT/process/submitting-patches.rst. Questa documentazione assume che sappiate usare ``git`` per preparare le patch. -- cgit v1.2.3 From aa3b2a7ffae17b708e926e2cd148c08a3d189fe1 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:34 +0200 Subject: docs: ja_JP: howto: remove reference to removed submitting-drivers The document submitting-drivers.rst was deleted. This removes the corresponding reference in the Japanese translation of the howto, with some assistance from Akira Yokasawa. Link: https://lore.kernel.org/linux-doc/a2be48e5-e559-17d7-5ae7-d1205a737ea4@gmail.com/ Signed-off-by: Lukas Bulwahn Reviewed-by: Akira Yokosawa Link: https://lore.kernel.org/r/20220704122537.3407-9-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/translations/ja_JP/howto.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/translations/ja_JP/howto.rst b/Documentation/translations/ja_JP/howto.rst index 38fed6fe62fe..649e2ff2a407 100644 --- a/Documentation/translations/ja_JP/howto.rst +++ b/Documentation/translations/ja_JP/howto.rst @@ -129,8 +129,8 @@ linux-api@vger.kernel.org に送ることを勧めます。 ルに従っているものだけを受け付け、多くの人は正しいスタイルのコード だけをレビューします。 - :ref:`Documentation/process/submitting-patches.rst ` と :ref:`Documentation/process/submitting-drivers.rst ` - これらのファイルには、どうやってうまくパッチを作って投稿するかにつ + :ref:`Documentation/process/submitting-patches.rst ` + このファイルには、どうやってうまくパッチを作って投稿するかにつ いて非常に詳しく書かれており、以下を含みます (これだけに限らない けれども) -- cgit v1.2.3 From 481bb592d300493a920319e03c0396098119eddf Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:35 +0200 Subject: docs: ko_KR: howto: remove reference to removed submitting-drivers The document submitting-drivers.rst was deleted. This removes the corresponding reference in the Korean translation of the howto. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-10-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- Documentation/translations/ko_KR/howto.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst index e3cdf0c84892..e43970584ca4 100644 --- a/Documentation/translations/ko_KR/howto.rst +++ b/Documentation/translations/ko_KR/howto.rst @@ -124,7 +124,7 @@ mtk.manpages@gmail.com의 메인테이너에게 보낼 것을 권장한다. 메인테이너들은 이 규칙을 따르는 패치들만을 받아들일 것이고 많은 사람들이 그 패치가 올바른 스타일일 경우만 코드를 검토할 것이다. - :ref:`Documentation/process/submitting-patches.rst ` 와 :ref:`Documentation/process/submitting-drivers.rst ` + :ref:`Documentation/process/submitting-patches.rst ` 이 파일들은 성공적으로 패치를 만들고 보내는 법을 다음의 내용들로 굉장히 상세히 설명하고 있다(그러나 다음으로 한정되진 않는다). -- cgit v1.2.3 From 9d4e2eed3f72268ba87af22cf87c9c3bccb8c3c4 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:36 +0200 Subject: docs: zh_CN: align to submitting-drivers removal Adjust the Chinese translation to the removal of submitting-drivers in the English kernel documentation. Signed-off-by: Lukas Bulwahn Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20220704122537.3407-11-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- .../translations/zh_CN/kernel-hacking/hacking.rst | 3 +- .../translations/zh_CN/process/5.Posting.rst | 3 +- Documentation/translations/zh_CN/process/howto.rst | 1 - Documentation/translations/zh_CN/process/index.rst | 1 - .../zh_CN/process/submitting-drivers.rst | 160 --------------------- 5 files changed, 2 insertions(+), 166 deletions(-) delete mode 100644 Documentation/translations/zh_CN/process/submitting-drivers.rst diff --git a/Documentation/translations/zh_CN/kernel-hacking/hacking.rst b/Documentation/translations/zh_CN/kernel-hacking/hacking.rst index bda79646bb1e..9112949b993c 100644 --- a/Documentation/translations/zh_CN/kernel-hacking/hacking.rst +++ b/Documentation/translations/zh_CN/kernel-hacking/hacking.rst @@ -633,8 +633,7 @@ C++ 意味着您希望在对子系统进行更改时得到询问,并了解缺陷;这意味着对某部分 代码做出更多承诺。 -- 最后,别忘记去阅读 Documentation/process/submitting-patches.rst , - 也许还有 Documentation/process/submitting-drivers.rst 。 +- 最后,别忘记去阅读 Documentation/process/submitting-patches.rst。 Kernel 仙女棒 =============== diff --git a/Documentation/translations/zh_CN/process/5.Posting.rst b/Documentation/translations/zh_CN/process/5.Posting.rst index 4ee7de13f373..6a469e1c7deb 100644 --- a/Documentation/translations/zh_CN/process/5.Posting.rst +++ b/Documentation/translations/zh_CN/process/5.Posting.rst @@ -19,8 +19,7 @@ 内核开发社区已经发展出一套用于发布补丁的约定和过程;遵循这些约定和过程将使 参与其中的每个人的生活更加轻松。本文档试图描述这些约定的部分细节;更多信息 也可在以下文档中找到 -:ref:`Documentation/translations/zh_CN/process/submitting-patches.rst `, -:ref:`Documentation/translations/zh_CN/process/submitting-drivers.rst ` +:ref:`Documentation/translations/zh_CN/process/submitting-patches.rst ` 和 :ref:`Documentation/translations/zh_CN/process/submit-checklist.rst `。 何时寄送 diff --git a/Documentation/translations/zh_CN/process/howto.rst b/Documentation/translations/zh_CN/process/howto.rst index 1334cdb32a3c..1455190dc087 100644 --- a/Documentation/translations/zh_CN/process/howto.rst +++ b/Documentation/translations/zh_CN/process/howto.rst @@ -96,7 +96,6 @@ Linux内核代码中包含有大量的文档。这些文档对于学习如何与 的代码。 :ref:`Documentation/translations/zh_CN/process/submitting-patches.rst ` - :ref:`Documentation/process/submitting-drivers.rst ` 这两份文档明确描述如何创建和发送补丁,其中包括(但不仅限于): - 邮件内容 diff --git a/Documentation/translations/zh_CN/process/index.rst b/Documentation/translations/zh_CN/process/index.rst index 39e9c88fbaa6..a683dbea0c83 100644 --- a/Documentation/translations/zh_CN/process/index.rst +++ b/Documentation/translations/zh_CN/process/index.rst @@ -40,7 +40,6 @@ .. toctree:: :maxdepth: 1 - submitting-drivers submit-checklist stable-api-nonsense stable-kernel-rules diff --git a/Documentation/translations/zh_CN/process/submitting-drivers.rst b/Documentation/translations/zh_CN/process/submitting-drivers.rst deleted file mode 100644 index 98341e7cd812..000000000000 --- a/Documentation/translations/zh_CN/process/submitting-drivers.rst +++ /dev/null @@ -1,160 +0,0 @@ -.. _cn_submittingdrivers: - -.. include:: ../disclaimer-zh_CN.rst - -:Original: :ref:`Documentation/process/submitting-drivers.rst - ` - -如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 -交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 -译存在问题,请联系中文版维护者:: - - 中文版维护者: 李阳 Li Yang - 中文版翻译者: 李阳 Li Yang - 中文版校译者: 陈琦 Maggie Chen - 王聪 Wang Cong - 张巍 Zhang Wei - -如何向 Linux 内核提交驱动程序 -============================= - -这篇文档将会解释如何向不同的内核源码树提交设备驱动程序。请注意,如果你感 -兴趣的是显卡驱动程序,你也许应该访问 XFree86 项目(https://www.xfree86.org/) -和/或 X.org 项目 (https://x.org)。 - -另请参阅 Documentation/translations/zh_CN/process/submitting-patches.rst 文档。 - - -分配设备号 ----------- - -块设备和字符设备的主设备号与从设备号是由 Linux 命名编号分配权威 LANANA( -现在是 Torben Mathiasen)负责分配。申请的网址是 https://www.lanana.org/。 -即使不准备提交到主流内核的设备驱动也需要在这里分配设备号。有关详细信息, -请参阅 Documentation/admin-guide/devices.rst。 - -如果你使用的不是已经分配的设备号,那么当你提交设备驱动的时候,它将会被强 -制分配一个新的设备号,即便这个设备号和你之前发给客户的截然不同。 - -设备驱动的提交对象 ------------------- - -Linux 2.0: - 此内核源码树不接受新的驱动程序。 - -Linux 2.2: - 此内核源码树不接受新的驱动程序。 - -Linux 2.4: - 如果所属的代码领域在内核的 MAINTAINERS 文件中列有一个总维护者, - 那么请将驱动程序提交给他。如果此维护者没有回应或者你找不到恰当的 - 维护者,那么请联系 Willy Tarreau 。 - -Linux 2.6: - 除了遵循和 2.4 版内核同样的规则外,你还需要在 linux-kernel 邮件 - 列表上跟踪最新的 API 变化。向 Linux 2.6 内核提交驱动的顶级联系人 - 是 Andrew Morton 。 - -决定设备驱动能否被接受的条件 ----------------------------- - -许可: 代码必须使用 GNU 通用公开许可证 (GPL) 提交给 Linux,但是 - 我们并不要求 GPL 是唯一的许可。你或许会希望同时使用多种 - 许可证发布,如果希望驱动程序可以被其他开源社区(比如BSD) - 使用。请参考 include/linux/module.h 文件中所列出的可被 - 接受共存的许可。 - -版权: 版权所有者必须同意使用 GPL 许可。最好提交者和版权所有者 - 是相同个人或实体。否则,必需列出授权使用 GPL 的版权所有 - 人或实体,以备验证之需。 - -接口: 如果你的驱动程序使用现成的接口并且和其他同类的驱动程序行 - 为相似,而不是去发明无谓的新接口,那么它将会更容易被接受。 - 如果你需要一个 Linux 和 NT 的通用驱动接口,那么请在用 - 户空间实现它。 - -代码: 请使用 Documentation/process/coding-style.rst 中所描述的 Linux 代码风 - 格。如果你的某些代码段(例如那些与 Windows 驱动程序包共 - 享的代码段)需要使用其他格式,而你却只希望维护一份代码, - 那么请将它们很好地区分出来,并且注明原因。 - -可移植性: 请注意,指针并不永远是 32 位的,不是所有的计算机都使用小 - 尾模式 (little endian) 存储数据,不是所有的人都拥有浮点 - 单元,不要随便在你的驱动程序里嵌入 x86 汇编指令。只能在 - x86 上运行的驱动程序一般是不受欢迎的。虽然你可能只有 x86 - 硬件,很难测试驱动程序在其他平台上是否可用,但是确保代码 - 可以被轻松地移植却是很简单的。 - -清晰度: 做到所有人都能修补这个驱动程序将会很有好处,因为这样你将 - 会直接收到修复的补丁而不是 bug 报告。如果你提交一个试图 - 隐藏硬件工作机理的驱动程序,那么它将会被扔进废纸篓。 - -电源管理: 因为 Linux 正在被很多移动设备和桌面系统使用,所以你的驱 - 动程序也很有可能被使用在这些设备上。它应该支持最基本的电 - 源管理,即在需要的情况下实现系统级休眠和唤醒要用到的 - .suspend 和 .resume 函数。你应该检查你的驱动程序是否能正 - 确地处理休眠与唤醒,如果实在无法确认,请至少把 .suspend - 函数定义成返回 -ENOSYS(功能未实现)错误。你还应该尝试确 - 保你的驱动在什么都不干的情况下将耗电降到最低。要获得驱动 - 程序测试的指导,请参阅 - Documentation/power/drivers-testing.rst。有关驱动程序电 - 源管理问题相对全面的概述,请参阅 - Documentation/driver-api/pm/devices.rst。 - -管理: 如果一个驱动程序的作者还在进行有效的维护,那么通常除了那 - 些明显正确且不需要任何检查的补丁以外,其他所有的补丁都会 - 被转发给作者。如果你希望成为驱动程序的联系人和更新者,最 - 好在代码注释中写明并且在 MAINTAINERS 文件中加入这个驱动 - 程序的条目。 - -不影响设备驱动能否被接受的条件 ------------------------------- - -供应商: 由硬件供应商来维护驱动程序通常是一件好事。不过,如果源码 - 树里已经有其他人提供了可稳定工作的驱动程序,那么请不要期 - 望“我是供应商”会成为内核改用你的驱动程序的理由。理想的情 - 况是:供应商与现有驱动程序的作者合作,构建一个统一完美的 - 驱动程序。 - -作者: 驱动程序是由大的 Linux 公司研发还是由你个人编写,并不影 - 响其是否能被内核接受。没有人对内核源码树享有特权。只要你 - 充分了解内核社区,你就会发现这一点。 - - -资源列表 --------- - -Linux 内核主源码树: - ftp.??.kernel.org:/pub/linux/kernel/... - ?? == 你的国家代码,例如 "cn"、"us"、"uk"、"fr" 等等 - -Linux 内核邮件列表: - linux-kernel@vger.kernel.org - [可通过向majordomo@vger.kernel.org发邮件来订阅] - -Linux 设备驱动程序,第三版(探讨 2.6.10 版内核): - https://lwn.net/Kernel/LDD3/ (免费版) - -LWN.net: - 每周内核开发活动摘要 - https://lwn.net/ - - 2.6 版中 API 的变更: - - https://lwn.net/Articles/2.6-kernel-api/ - - 将旧版内核的驱动程序移植到 2.6 版: - - https://lwn.net/Articles/driver-porting/ - -内核新手(KernelNewbies): - 为新的内核开发者提供文档和帮助 - https://kernelnewbies.org/ - -Linux USB项目: - http://www.linux-usb.org/ - -写内核驱动的“不要”(Arjan van de Ven著): - http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf - -内核清洁工 (Kernel Janitor): - https://kernelnewbies.org/KernelJanitors -- cgit v1.2.3 From 374e4e6f7c77bf742e5383e787cc302d655e6016 Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Mon, 4 Jul 2022 14:25:37 +0200 Subject: docs: zh_TW: align to submitting-drivers removal Adjust the Taiwanese translation to the removal of submitting-drivers in the English kernel documentation. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20220704122537.3407-12-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet --- .../translations/zh_TW/process/5.Posting.rst | 3 +- Documentation/translations/zh_TW/process/howto.rst | 1 - Documentation/translations/zh_TW/process/index.rst | 1 - .../zh_TW/process/submitting-drivers.rst | 164 --------------------- 4 files changed, 1 insertion(+), 168 deletions(-) delete mode 100644 Documentation/translations/zh_TW/process/submitting-drivers.rst diff --git a/Documentation/translations/zh_TW/process/5.Posting.rst b/Documentation/translations/zh_TW/process/5.Posting.rst index 5578bca403e6..280a8832ecc0 100644 --- a/Documentation/translations/zh_TW/process/5.Posting.rst +++ b/Documentation/translations/zh_TW/process/5.Posting.rst @@ -22,8 +22,7 @@ 內核開發社區已經發展出一套用於發布補丁的約定和過程;遵循這些約定和過程將使 參與其中的每個人的生活更加輕鬆。本文檔試圖描述這些約定的部分細節;更多信息 也可在以下文檔中找到 -:ref:`Documentation/translations/zh_TW/process/submitting-patches.rst `, -:ref:`Documentation/translations/zh_TW/process/submitting-drivers.rst ` +:ref:`Documentation/translations/zh_TW/process/submitting-patches.rst ` 和 :ref:`Documentation/translations/zh_TW/process/submit-checklist.rst `。 何時郵寄 diff --git a/Documentation/translations/zh_TW/process/howto.rst b/Documentation/translations/zh_TW/process/howto.rst index 2043691b92e3..68ae4411285b 100644 --- a/Documentation/translations/zh_TW/process/howto.rst +++ b/Documentation/translations/zh_TW/process/howto.rst @@ -99,7 +99,6 @@ Linux內核代碼中包含有大量的文檔。這些文檔對於學習如何與 的代碼。 :ref:`Documentation/translations/zh_TW/process/submitting-patches.rst ` - :ref:`Documentation/process/submitting-drivers.rst ` 這兩份文檔明確描述如何創建和發送補丁,其中包括(但不僅限於): - 郵件內容 diff --git a/Documentation/translations/zh_TW/process/index.rst b/Documentation/translations/zh_TW/process/index.rst index ec7ad14bfd13..c5c59b4fd595 100644 --- a/Documentation/translations/zh_TW/process/index.rst +++ b/Documentation/translations/zh_TW/process/index.rst @@ -43,7 +43,6 @@ .. toctree:: :maxdepth: 1 - submitting-drivers submit-checklist stable-api-nonsense stable-kernel-rules diff --git a/Documentation/translations/zh_TW/process/submitting-drivers.rst b/Documentation/translations/zh_TW/process/submitting-drivers.rst deleted file mode 100644 index 2fdd742318ba..000000000000 --- a/Documentation/translations/zh_TW/process/submitting-drivers.rst +++ /dev/null @@ -1,164 +0,0 @@ -.. SPDX-License-Identifier: GPL-2.0 - -.. _tw_submittingdrivers: - -.. include:: ../disclaimer-zh_TW.rst - -:Original: :ref:`Documentation/process/submitting-drivers.rst - ` - -如果想評論或更新本文的內容,請直接聯繫原文檔的維護者。如果你使用英文 -交流有困難的話,也可以向中文版維護者求助。如果本翻譯更新不及時或者翻 -譯存在問題,請聯繫中文版維護者:: - - 中文版維護者: 李陽 Li Yang - 中文版翻譯者: 李陽 Li Yang - 中文版校譯者: 陳琦 Maggie Chen - 王聰 Wang Cong - 張巍 Zhang Wei - 胡皓文 Hu Haowen - -如何向 Linux 內核提交驅動程序 -============================= - -這篇文檔將會解釋如何向不同的內核源碼樹提交設備驅動程序。請注意,如果你感 -興趣的是顯卡驅動程序,你也許應該訪問 XFree86 項目(https://www.xfree86.org/) -和/或 X.org 項目 (https://x.org)。 - -另請參閱 Documentation/translations/zh_TW/process/submitting-patches.rst 文檔。 - - -分配設備號 ----------- - -塊設備和字符設備的主設備號與從設備號是由 Linux 命名編號分配權威 LANANA( -現在是 Torben Mathiasen)負責分配。申請的網址是 https://www.lanana.org/。 -即使不準備提交到主流內核的設備驅動也需要在這裡分配設備號。有關詳細信息, -請參閱 Documentation/admin-guide/devices.rst。 - -如果你使用的不是已經分配的設備號,那麼當你提交設備驅動的時候,它將會被強 -制分配一個新的設備號,即便這個設備號和你之前發給客戶的截然不同。 - -設備驅動的提交對象 ------------------- - -Linux 2.0: - 此內核源碼樹不接受新的驅動程序。 - -Linux 2.2: - 此內核源碼樹不接受新的驅動程序。 - -Linux 2.4: - 如果所屬的代碼領域在內核的 MAINTAINERS 文件中列有一個總維護者, - 那麼請將驅動程序提交給他。如果此維護者沒有回應或者你找不到恰當的 - 維護者,那麼請聯繫 Willy Tarreau 。 - -Linux 2.6: - 除了遵循和 2.4 版內核同樣的規則外,你還需要在 linux-kernel 郵件 - 列表上跟蹤最新的 API 變化。向 Linux 2.6 內核提交驅動的頂級聯繫人 - 是 Andrew Morton 。 - -決定設備驅動能否被接受的條件 ----------------------------- - -許可: 代碼必須使用 GNU 通用公開許可證 (GPL) 提交給 Linux,但是 - 我們並不要求 GPL 是唯一的許可。你或許會希望同時使用多種 - 許可證發布,如果希望驅動程序可以被其他開源社區(比如BSD) - 使用。請參考 include/linux/module.h 文件中所列出的可被 - 接受共存的許可。 - -版權: 版權所有者必須同意使用 GPL 許可。最好提交者和版權所有者 - 是相同個人或實體。否則,必需列出授權使用 GPL 的版權所有 - 人或實體,以備驗證之需。 - -接口: 如果你的驅動程序使用現成的接口並且和其他同類的驅動程序行 - 爲相似,而不是去發明無謂的新接口,那麼它將會更容易被接受。 - 如果你需要一個 Linux 和 NT 的通用驅動接口,那麼請在用 - 戶空間實現它。 - -代碼: 請使用 Documentation/process/coding-style.rst 中所描述的 Linux 代碼風 - 格。如果你的某些代碼段(例如那些與 Windows 驅動程序包共 - 享的代碼段)需要使用其他格式,而你卻只希望維護一份代碼, - 那麼請將它們很好地區分出來,並且註明原因。 - -可移植性: 請注意,指針並不永遠是 32 位的,不是所有的計算機都使用小 - 尾模式 (little endian) 存儲數據,不是所有的人都擁有浮點 - 單元,不要隨便在你的驅動程序里嵌入 x86 彙編指令。只能在 - x86 上運行的驅動程序一般是不受歡迎的。雖然你可能只有 x86 - 硬體,很難測試驅動程序在其他平台上是否可用,但是確保代碼 - 可以被輕鬆地移植卻是很簡單的。 - -清晰度: 做到所有人都能修補這個驅動程序將會很有好處,因爲這樣你將 - 會直接收到修復的補丁而不是 bug 報告。如果你提交一個試圖 - 隱藏硬體工作機理的驅動程序,那麼它將會被扔進廢紙簍。 - -電源管理: 因爲 Linux 正在被很多行動裝置和桌面系統使用,所以你的驅 - 動程序也很有可能被使用在這些設備上。它應該支持最基本的電 - 源管理,即在需要的情況下實現系統級休眠和喚醒要用到的 - .suspend 和 .resume 函數。你應該檢查你的驅動程序是否能正 - 確地處理休眠與喚醒,如果實在無法確認,請至少把 .suspend - 函數定義成返回 -ENOSYS(功能未實現)錯誤。你還應該嘗試確 - 保你的驅動在什麼都不乾的情況下將耗電降到最低。要獲得驅動 - 程序測試的指導,請參閱 - Documentation/power/drivers-testing.rst。有關驅動程序電 - 源管理問題相對全面的概述,請參閱 - Documentation/driver-api/pm/devices.rst。 - -管理: 如果一個驅動程序的作者還在進行有效的維護,那麼通常除了那 - 些明顯正確且不需要任何檢查的補丁以外,其他所有的補丁都會 - 被轉發給作者。如果你希望成爲驅動程序的聯繫人和更新者,最 - 好在代碼注釋中寫明並且在 MAINTAINERS 文件中加入這個驅動 - 程序的條目。 - -不影響設備驅動能否被接受的條件 ------------------------------- - -供應商: 由硬體供應商來維護驅動程序通常是一件好事。不過,如果源碼 - 樹里已經有其他人提供了可穩定工作的驅動程序,那麼請不要期 - 望「我是供應商」會成爲內核改用你的驅動程序的理由。理想的情 - 況是:供應商與現有驅動程序的作者合作,構建一個統一完美的 - 驅動程序。 - -作者: 驅動程序是由大的 Linux 公司研發還是由你個人編寫,並不影 - 響其是否能被內核接受。沒有人對內核源碼樹享有特權。只要你 - 充分了解內核社區,你就會發現這一點。 - - -資源列表 --------- - -Linux 內核主源碼樹: - ftp.??.kernel.org:/pub/linux/kernel/... - ?? == 你的國家代碼,例如 "cn"、"us"、"uk"、"fr" 等等 - -Linux 內核郵件列表: - linux-kernel@vger.kernel.org - [可通過向majordomo@vger.kernel.org發郵件來訂閱] - -Linux 設備驅動程序,第三版(探討 2.6.10 版內核): - https://lwn.net/Kernel/LDD3/ (免費版) - -LWN.net: - 每周內核開發活動摘要 - https://lwn.net/ - - 2.6 版中 API 的變更: - - https://lwn.net/Articles/2.6-kernel-api/ - - 將舊版內核的驅動程序移植到 2.6 版: - - https://lwn.net/Articles/driver-porting/ - -內核新手(KernelNewbies): - 爲新的內核開發者提供文檔和幫助 - https://kernelnewbies.org/ - -Linux USB項目: - http://www.linux-usb.org/ - -寫內核驅動的「不要」(Arjan van de Ven著): - http://www.fenrus.org/how-to-not-write-a-device-driver-paper.pdf - -內核清潔工 (Kernel Janitor): - https://kernelnewbies.org/KernelJanitors - -- cgit v1.2.3 From 0582591cc454e48b027d23c84bc768198d6a82e4 Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Thu, 14 Jul 2022 13:40:13 +0800 Subject: doc/zh_CN: remove submitting-driver reference from docs The doc is removed, so related reference should be removed too. Signed-off-by: Alex Shi Cc: Yanteng Si Cc: Hu Haowen Link: https://lore.kernel.org/r/20220714054013.214031-1-alexs@kernel.org Signed-off-by: Jonathan Corbet --- Documentation/translations/zh_CN/process/8.Conclusion.rst | 1 - Documentation/translations/zh_CN/process/submitting-patches.rst | 4 +--- Documentation/translations/zh_TW/process/8.Conclusion.rst | 1 - Documentation/translations/zh_TW/process/submitting-patches.rst | 4 +--- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Documentation/translations/zh_CN/process/8.Conclusion.rst b/Documentation/translations/zh_CN/process/8.Conclusion.rst index 4707f0101964..643b88af97bb 100644 --- a/Documentation/translations/zh_CN/process/8.Conclusion.rst +++ b/Documentation/translations/zh_CN/process/8.Conclusion.rst @@ -19,7 +19,6 @@ :ref:`Documentation/translations/zh_CN/process/howto.rst ` 文件是一个重要的起点; :ref:`Documentation/translations/zh_CN/process/submitting-patches.rst ` -和 :ref:`Documentation/translations/zh_CN/process/submitting-drivers.rst ` 也是所有内核开发人员都应该阅读的内容。许多内部内核API都是使用kerneldoc机制 记录的;“make htmldocs”或“make pdfdocs”可用于以HTML或PDF格式生成这些文档 (尽管某些发行版提供的tex版本会遇到内部限制,无法正确处理文档)。 diff --git a/Documentation/translations/zh_CN/process/submitting-patches.rst b/Documentation/translations/zh_CN/process/submitting-patches.rst index a9570165582a..ebb7f37575c1 100644 --- a/Documentation/translations/zh_CN/process/submitting-patches.rst +++ b/Documentation/translations/zh_CN/process/submitting-patches.rst @@ -23,9 +23,7 @@ 以下文档含有大量简洁的建议, 具体请见: :ref:`Documentation/process ` 同样,:ref:`Documentation/translations/zh_CN/process/submit-checklist.rst ` -给出在提交代码前需要检查的项目的列表。如果你在提交一个驱动程序,那么 -同时阅读一下: -:ref:`Documentation/process/submitting-drivers.rst ` +给出在提交代码前需要检查的项目的列表。 其中许多步骤描述了Git版本控制系统的默认行为;如果您使用Git来准备补丁, 您将发现它为您完成的大部分机械工作,尽管您仍然需要准备和记录一组合理的 diff --git a/Documentation/translations/zh_TW/process/8.Conclusion.rst b/Documentation/translations/zh_TW/process/8.Conclusion.rst index 7572b17667d9..044fcc118bef 100644 --- a/Documentation/translations/zh_TW/process/8.Conclusion.rst +++ b/Documentation/translations/zh_TW/process/8.Conclusion.rst @@ -22,7 +22,6 @@ :ref:`Documentation/translations/zh_TW/process/howto.rst ` 文件是一個重要的起點; :ref:`Documentation/translations/zh_TW/process/submitting-patches.rst ` -和 :ref:`Documentation/translations/zh_TW/process/submitting-drivers.rst ` 也是所有內核開發人員都應該閱讀的內容。許多內部內核API都是使用kerneldoc機制 記錄的;「make htmldocs」或「make pdfdocs」可用於以HTML或PDF格式生成這些文檔 (儘管某些發行版提供的tex版本會遇到內部限制,無法正確處理文檔)。 diff --git a/Documentation/translations/zh_TW/process/submitting-patches.rst b/Documentation/translations/zh_TW/process/submitting-patches.rst index c4fd48f5bd8b..3f77ef5d48a0 100644 --- a/Documentation/translations/zh_TW/process/submitting-patches.rst +++ b/Documentation/translations/zh_TW/process/submitting-patches.rst @@ -26,9 +26,7 @@ 以下文檔含有大量簡潔的建議, 具體請見: :ref:`Documentation/process ` 同樣,:ref:`Documentation/translations/zh_TW/process/submit-checklist.rst ` -給出在提交代碼前需要檢查的項目的列表。如果你在提交一個驅動程序,那麼 -同時閱讀一下: -:ref:`Documentation/process/submitting-drivers.rst ` +給出在提交代碼前需要檢查的項目的列表。 其中許多步驟描述了Git版本控制系統的默認行爲;如果您使用Git來準備補丁, 您將發現它爲您完成的大部分機械工作,儘管您仍然需要準備和記錄一組合理的 -- cgit v1.2.3