summaryrefslogtreecommitdiff
path: root/Documentation/translations/zh_CN/power
AgeCommit message (Collapse)AuthorFilesLines
2024-01-23Documentation: power: Use kcalloc() instead of kzalloc()Erick Archer1-1/+1
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, in the example code use the purpose specific kcalloc() function instead of the argument size * count in the kzalloc() function. At the same time, modify the translations accordingly. Signed-off-by: Erick Archer <erick.archer@gmx.com> Reviewed-by: Hu Haowen <2023002089@link.tyut.edu.cn> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> Reviewed-by: Hu Haowen <2023002089@link.tyut.edu.cn> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2023-01-03docs/zh_CN: Update the translation of energy-model to 6.1-rc8Yanteng Si1-8/+28
Update to commit c5d39fae8992 ("Documentation: EM: Switch to micro-Watts scale") commit f48a0c475c2a ("Documentation: EM: Describe new registration method using DT") commit 75a3a99a5a98 ("PM: EM: Change the order of arguments in the .active_power() callback") commit 015f569c4649 ("Documentation: EM: Add artificial EM registration description") Signed-off-by: Yanteng Si <siyanteng@loongson.cn> Reviewed-by: Wu XiangCheng <bobwxc@email.cn> Link: https://lore.kernel.org/r/06df12357d64d602a4dfb10a025a7520daeb3ba0.1670642548.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-02-16docs/zh_CN: Add energy-model Chinese translationTang Yizhou2-1/+191
Translate power/energy-model.rst into Chinese. Signed-off-by: Tang Yizhou <tangyizhou@huawei.com> Reviewed-by: Alex Shi <alexs@kernel.org> Link: https://lore.kernel.org/r/20220208133716.24070-1-tangyizhou@huawei.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-01-27docs/zh_CN: Add opp Chinese translationTang Yizhou2-1/+343
Translate power/opp.rst into Chinese. Signed-off-by: Tang Yizhou <tangyizhou@huawei.com> Reviewed-by: Alex Shi <alexs@kernel.org> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> Link: https://lore.kernel.org/r/20211229024212.32752-4-tangyizhou@huawei.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-01-27docs/zh_CN: Add power/index Chinese translationTang Yizhou1-0/+55
Translate power/index.rst into Chinese. Signed-off-by: Tang Yizhou <tangyizhou@huawei.com> Reviewed-by: Alex Shi <alexs@kernel.org> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> Link: https://lore.kernel.org/r/20211229024212.32752-3-tangyizhou@huawei.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>