Commit Graph

10 Commits

Author SHA1 Message Date
Thorsten Blum 932be49b71 Documentation: coding-style: Fix indentation in code-blocks
- Remove spaces in C code-blocks to align error labels consistently
- Replace tab characters with spaces in emacs-lisp code blocks

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240202231316.7606-1-thorsten.blum@toblux.com
2024-02-05 10:15:31 -07:00
Wu XiangCheng 5415673414 docs/zh_CN: Update zh_CN/process/coding-style.rst to 6.0-rc2
* update to commit c04639a7d2 ("coding-style.rst: trivial: fix
  location of driver model macros")

Signed-off-by: Wu XiangCheng <bobwxc@email.cn>
Reviewed-by: Yanteng Si <siyanteng@loongson.cn>
Reviewed-by: Alex Shi <alexs@kernel.org>
Link: https://lore.kernel.org/r/Yw2ewM4wfaDDLjTk@bobwxc.mipc
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-09-27 13:21:44 -06:00
Hu Jialun 341968c617 docs/zh_CN: Remove the Microsoft rhetoric
Update Chinese translation on par with original English coding-style.rst
Related commit b7592e5b82

Signed-off-by: Hu Jialun <hujialun@comp.nus.edu.sg>
Reviewed-by: Hu Haowen <src.res@email.cn>
Link: https://lore.kernel.org/r/20210703164834.460447-1-hujialun@comp.nus.edu.sg
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-07-15 06:33:44 -06:00
Wei Ming Chen cc3496bf86 docs: Use fallthrough pseudo-keyword
Replace /* fall through */ comment with fallthrough, make
it align with original process/coding-style.rst

Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
Link: https://lore.kernel.org/r/20210515155142.2490-1-jj251510319013@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2021-05-20 14:06:52 -06:00
Alexander A. Klimov cf37fc4a0c Replace HTTP links with HTTPS ones: Documentation/translations/zh_CN
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  For each line:
    If doesn't contain `\bxmlns\b`:
      For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
        If both the HTTP and HTTPS versions
        return 200 OK and serve the same content:
          Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Reviewed-by: Alex Shi <alex.shi@linux.alibaba.com>
Link: https://lore.kernel.org/r/20200608181649.74883-1-grandmaster@al2klimov.de
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-06-19 13:40:02 -06:00
Pankaj Bharadiya c593642c8b treewide: Use sizeof_field() macro
Replace all the occurrences of FIELD_SIZEOF() with sizeof_field() except
at places where these are defined. Later patches will remove the unused
definition of FIELD_SIZEOF().

This patch is generated using following script:

EXCLUDE_FILES="include/linux/stddef.h|include/linux/kernel.h"

git grep -l -e "\bFIELD_SIZEOF\b" | while read file;
do

	if [[ "$file" =~ $EXCLUDE_FILES ]]; then
		continue
	fi
	sed -i  -e 's/\bFIELD_SIZEOF\b/sizeof_field/g' $file;
done

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Link: https://lore.kernel.org/r/20190924105839.110713-3-pankaj.laxminarayan.bharadiya@intel.com
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: David Miller <davem@davemloft.net> # for net
2019-12-09 10:36:44 -08:00
Mauro Carvalho Chehab cd238effef docs: kbuild: convert docs to ReST and rename to *.rst
The kbuild documentation clearly shows that the documents
there are written at different times: some use markdown,
some use their own peculiar logic to split sections.

Convert everything to ReST without affecting too much
the author's style and avoiding adding uneeded markups.

The conversion is actually:
  - add blank lines and identation in order to identify paragraphs;
  - fix tables markups;
  - add some lists markups;
  - mark literal blocks;
  - adjust title markups.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-06-14 14:21:21 -06:00
Jonathan Corbet 5e3ec254e0 docs: Fix a build error in coding-style.rst
A reference typo caused an unsightly build error; fix it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-04-02 09:58:08 -06:00
Alex Shi efd298e4af docs/zh_CN: update coding-sytle.rst
Replace the disclaimer part and give the link name of this file:
cn_codingsytle.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Harry Wei <harryxiyou@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-04-02 09:53:57 -06:00
Alex Shi aa3b369050 docs/zh_CN: move process related docs into process dir
Much process documents spread here isn't neat. It's good to put them together
in their directory: process

So create 'process' directory and move docs:
	email-clients stable_kernel_rules stable_api_nosense
	submittingpatches submittingdrivers HOWTO
	volatile-considered-harmful
there.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Harry Wei <harryxiyou@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Coly Li <colyli@suse.de>
Signed-off-by: Weiwei Jia <harryxiyou@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2019-03-18 11:39:57 -06:00