diff mbox series

[11/29] hwmon: (scmi-hwmon): Avoid comma separated statements

Message ID 5e1ca60df261e3bfd0e6510e388581a1d1f52c77.1598331149.git.joe@perches.com (mailing list archive)
State Accepted
Headers show
Series treewide: Convert comma separated statements | expand

Commit Message

Joe Perches Aug. 25, 2020, 4:56 a.m. UTC
Use semicolons and braces.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/hwmon/scmi-hwmon.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Guenter Roeck Aug. 25, 2020, 11:33 p.m. UTC | #1
On Mon, Aug 24, 2020 at 09:56:08PM -0700, Joe Perches wrote:
> Use semicolons and braces.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/scmi-hwmon.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
> index d421e691318b..09ce30cba54b 100644
> --- a/drivers/hwmon/scmi-hwmon.c
> +++ b/drivers/hwmon/scmi-hwmon.c
> @@ -202,8 +202,10 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
>  		}
>  	}
>  
> -	if (nr_count[hwmon_temp])
> -		nr_count[hwmon_chip]++, nr_types++;
> +	if (nr_count[hwmon_temp]) {
> +		nr_count[hwmon_chip]++;
> +		nr_types++;
> +	}
>  
>  	scmi_hwmon_chan = devm_kcalloc(dev, nr_types, sizeof(*scmi_hwmon_chan),
>  				       GFP_KERNEL);
diff mbox series

Patch

diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
index d421e691318b..09ce30cba54b 100644
--- a/drivers/hwmon/scmi-hwmon.c
+++ b/drivers/hwmon/scmi-hwmon.c
@@ -202,8 +202,10 @@  static int scmi_hwmon_probe(struct scmi_device *sdev)
 		}
 	}
 
-	if (nr_count[hwmon_temp])
-		nr_count[hwmon_chip]++, nr_types++;
+	if (nr_count[hwmon_temp]) {
+		nr_count[hwmon_chip]++;
+		nr_types++;
+	}
 
 	scmi_hwmon_chan = devm_kcalloc(dev, nr_types, sizeof(*scmi_hwmon_chan),
 				       GFP_KERNEL);