Re: [PATCH v4 2/9] w1: ds2438: fixed a coding style issue in iad_read

2021-04-05 Thread Greg KH
On Mon, Apr 05, 2021 at 07:50:02AM -0300, Luiz Sampaio wrote:
> Since there is only one statement inside the if clause, no brackets
> are required.
> 
> Signed-off-by: Luiz Sampaio 
> ---
>  drivers/w1/slaves/w1_ds2438.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

As this does the same type of fix as the next 3 patches, to the same
file, they should be all merged together into 1 patch.

thanks,

greg k-h


[PATCH v4 2/9] w1: ds2438: fixed a coding style issue in iad_read

2021-04-05 Thread Luiz Sampaio
Since there is only one statement inside the if clause, no brackets
are required.

Signed-off-by: Luiz Sampaio 
---
 drivers/w1/slaves/w1_ds2438.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/w1/slaves/w1_ds2438.c b/drivers/w1/slaves/w1_ds2438.c
index 148921fb9702..a5bb53042c93 100644
--- a/drivers/w1/slaves/w1_ds2438.c
+++ b/drivers/w1/slaves/w1_ds2438.c
@@ -287,9 +287,9 @@ static ssize_t iad_read(struct file *filp, struct kobject 
*kobj,
if (!buf)
return -EINVAL;
 
-   if (w1_ds2438_get_current(sl, ) == 0) {
+   if (w1_ds2438_get_current(sl, ) == 0)
ret = snprintf(buf, count, "%i\n", voltage);
-   } else
+   else
ret = -EIO;
 
return ret;
-- 
2.30.1