From nobody Tue Jun 23 02:20:47 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 575A9C433F5 for ; Sat, 12 Mar 2022 18:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbiCLSFR (ORCPT ); Sat, 12 Mar 2022 13:05:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiCLSFO (ORCPT ); Sat, 12 Mar 2022 13:05:14 -0500 Received: from tmailer.gwdg.de (tmailer.gwdg.de [134.76.10.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ABF246B30 for ; Sat, 12 Mar 2022 10:04:08 -0800 (PST) Received: from excmbx-17.um.gwdg.de ([134.76.9.228] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1nT662-000G61-G0; Sat, 12 Mar 2022 19:04:06 +0100 Received: from notebook.fritz.box (10.250.9.199) by excmbx-17.um.gwdg.de (134.76.9.228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.2375.24; Sat, 12 Mar 2022 19:04:05 +0100 From: Alexander Vorwerk To: CC: , , Alexander Vorwerk Subject: [PATCH] drivers: iio: fix a few code style issues Date: Sat, 12 Mar 2022 19:03:43 +0100 Message-ID: <20220312180343.8935-1-alexander.vorwerk@stud.uni-goettingen.de> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.250.9.199] X-ClientProxiedBy: EXCMBX-03.um.gwdg.de (134.76.9.218) To excmbx-17.um.gwdg.de (134.76.9.228) X-Virus-Scanned: (clean) by clamav Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" * Fix indent in else statement * Remove unnecessary 'else' after 'break' * Remove space in '* attr' Signed-off-by: Alexander Vorwerk --- drivers/iio/industrialio-buffer.c | 4 ++-- drivers/iio/industrialio-core.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-b= uffer.c index 208b5193c621..15c5405853d7 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -915,7 +915,7 @@ static int iio_verify_update(struct iio_dev *indio_dev, if (scan_mask =3D=3D NULL) return -EINVAL; } else { - scan_mask =3D compound_mask; + scan_mask =3D compound_mask; } =20 config->scan_bytes =3D iio_compute_scan_bytes(indio_dev, @@ -1649,7 +1649,7 @@ static int __iio_buffer_alloc_sysfs_and_mask(struct i= io_buffer *buffer, } =20 attrn =3D buffer_attrcount + scan_el_attrcount + ARRAY_SIZE(iio_buffer_at= trs); - attr =3D kcalloc(attrn + 1, sizeof(* attr), GFP_KERNEL); + attr =3D kcalloc(attrn + 1, sizeof(*attr), GFP_KERNEL); if (!attr) { ret =3D -ENOMEM; goto error_free_scan_mask; diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-cor= e.c index 409c278a4c2c..346c8fbf18a4 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -892,8 +892,7 @@ static int __iio_str_to_fixpoint(const char *str, int f= ract_mult, } else if (*str =3D=3D '\n') { if (*(str + 1) =3D=3D '\0') break; - else - return -EINVAL; + return -EINVAL; } else if (!strncmp(str, " dB", sizeof(" dB") - 1) && scale_db) { /* Ignore the dB suffix */ str +=3D sizeof(" dB") - 1; --=20 2.17.1