b332af53 | 12-May-2023 |
Jakob Koschel <jkl820.git@gmail.com> |
w1: Replace usage of found with dedicated list iterator variable
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator
w1: Replace usage of found with dedicated list iterator variable
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body.
To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boolean [1].
This removes the need to use a found variable and simply checking if the variable was set, can determine if the break/goto was hit.
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1] Signed-off-by: Jakob Koschel <jkl820.git@gmail.com> Link: https://lore.kernel.org/r/20230509-w1-replace-usage-of-found-with-tmp-list-iterator-variable-v3-1-e07c9603fd9d@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
0df2a5e9 | 07-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: therm: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made const for safety.
Link: https://lore.kernel.org/r/20230407150121.79887-1-k
w1: therm: constify pointers to hwmon_channel_info
Statically allocated array of pointed to hwmon_channel_info can be made const for safety.
Link: https://lore.kernel.org/r/20230407150121.79887-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
51cbbcd6 | 15-Jun-2022 |
Liang He <windhl@126.com> |
w1: Add missing of_node_put() in w1.c
In __w1_attach_slave_device, we really need not to use of_node_put in normal path as the reference is escaped by sl. However, we need of_node_put in the fail pa
w1: Add missing of_node_put() in w1.c
In __w1_attach_slave_device, we really need not to use of_node_put in normal path as the reference is escaped by sl. However, we need of_node_put in the fail path before put_device.
Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220615125105.3966317-1-windhl@126.com [krzysztof: fix whitespace / checkpatch] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
ecaed1a2 | 07-May-2022 |
Jason Wang <wangborong@cdjrlc.com> |
w1: no need to initialise statics to 0
Static variables do not need to be initialised to 0, because compiler will initialise all uninitialised statics to 0. Thus, remove the unneeded initializations
w1: no need to initialise statics to 0
Static variables do not need to be initialised to 0, because compiler will initialise all uninitialised statics to 0. Thus, remove the unneeded initializations.
Signed-off-by: Jason Wang <wangborong@cdjrlc.com> Link: https://lore.kernel.org/r/20220508023400.102244-1-wangborong@cdjrlc.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
ee896c5b | 22-May-2022 |
Colin Ian King <colin.i.king@gmail.com> |
w1: ds2438: remove redundant initialization of variable crc
Variable crc is being initialized with a value that is never read, it is being re-assigned later on. The initialization is redundant and c
w1: ds2438: remove redundant initialization of variable crc
Variable crc is being initialized with a value that is never read, it is being re-assigned later on. The initialization is redundant and can be removed.
Cleans up clang scan build warning: warning: Value stored to 'crc' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220522194622.13277-1-colin.i.king@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
7f25058c | 21-May-2022 |
Julia Lawall <Julia.Lawall@inria.fr> |
w1: w1_therm: fix typo in comment
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.o
w1: w1_therm: fix typo in comment
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-6-Julia.Lawall@inria.fr Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
1aa75bf5 | 10-Mar-2022 |
Haowen Bai <baihaowen@meizu.com> |
w1: w1_therm: Use max() instead of doing it manually
Fix following coccicheck warning: drivers/w1/slaves/w1_therm.c:1452:18-19: WARNING opportunity for max()
Signed-off-by: Haowen Bai <baihaowen@me
w1: w1_therm: Use max() instead of doing it manually
Fix following coccicheck warning: drivers/w1/slaves/w1_therm.c:1452:18-19: WARNING opportunity for max()
Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1646908169-8050-1-git-send-email-baihaowen@meizu.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
83f3fcf9 | 19-May-2021 |
Dan Carpenter <dan.carpenter@oracle.com> |
w1: fix loop in w1_fini()
The __w1_remove_master_device() function calls:
list_del(&dev->w1_master_entry);
So presumably this can cause an endless loop.
Fixes: 7785925dd8e0 ("[PATCH] w1: cleanup
w1: fix loop in w1_fini()
The __w1_remove_master_device() function calls:
list_del(&dev->w1_master_entry);
So presumably this can cause an endless loop.
Fixes: 7785925dd8e0 ("[PATCH] w1: cleanups.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
9033ff4c | 21-Jul-2021 |
Colin Ian King <colin.king@canonical.com> |
w1: remove redundant initialization to variable result
The variable result is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be
w1: remove redundant initialization to variable result
The variable result is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210721103451.43026-1-colin.king@canonical.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
a8c4dda9 | 18-Jun-2021 |
zuoqilin <zuoqilin@yulong.com> |
w1: Simplify the atribute show
There is no necessary to define variable assignment, return directly.
Signed-off-by: zuoqilin <zuoqilin@yulong.com> Link: https://lore.kernel.org/r/20210618092418.142
w1: Simplify the atribute show
There is no necessary to define variable assignment, return directly.
Signed-off-by: zuoqilin <zuoqilin@yulong.com> Link: https://lore.kernel.org/r/20210618092418.1424-1-zuoqilin1@163.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
4f5a5bad | 20-Nov-2019 |
Krzysztof Kozlowski <krzk@kernel.org> |
w1: Fix Kconfig indentation
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig
Signed-off-by: Krzysztof Kozl
w1: Fix Kconfig indentation
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20191120133826.12964-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
5dfd3c73 | 18-Aug-2022 |
Wolfram Sang <wsa+renesas@sang-engineering.com> |
w1: sgi: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated
w1: sgi: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script.
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220818210121.7589-1-wsa+renesas@sang-engineering.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
388f22fe | 18-Mar-2023 |
Lizhe <sensor1010@163.com> |
w1: Remove driver match function
If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device().
Drop the bus's match fun
w1: Remove driver match function
If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device().
Drop the bus's match function that always returned 1 and so implements the same behaviour as when there is no match function
Signed-off-by: Lizhe <sensor1010@163.com> Link: https://lore.kernel.org/r/20230319044107.311555-1-sensor1010@163.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
show more ...
|
4ccb0fc2 | 15-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: gpio: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzy
w1: gpio: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-16-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
1e5d6652 | 15-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: omap-hdq: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <
w1: omap-hdq: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-15-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
752144d8 | 15-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: omap-hdq: add SPDX tag
Replace GPLv2 license text with SPDX and drop unnecessary file name in comment to fix checkpatch warnings:
WARNING: Missing or malformed SPDX-License-Identifier tag in
w1: omap-hdq: add SPDX tag
Replace GPLv2 license text with SPDX and drop unnecessary file name in comment to fix checkpatch warnings:
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 WARNING: It's generally not useful to have the filename in the file
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-14-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
0cb90771 | 15-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: omap-hdq: allow compile testing
omap-hdq does not depend on anything from ARCH_OMAP for building.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.o
w1: omap-hdq: allow compile testing
omap-hdq does not depend on anything from ARCH_OMAP for building.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-13-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
4f4129e4 | 15-Apr-2023 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
w1: matrox: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <kr
w1: matrox: remove unnecessary ENOMEM messages
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230415104304.104134-12-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|