From nobody Fri Oct 24 20:32:37 2025 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 3181CC00140 for ; Mon, 15 Aug 2022 20:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345651AbiHOUjq (ORCPT ); Mon, 15 Aug 2022 16:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345380AbiHOUfE (ORCPT ); Mon, 15 Aug 2022 16:35:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8134ABD5F; Mon, 15 Aug 2022 12:06:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 62476B81062; Mon, 15 Aug 2022 19:06:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4B20C433D6; Mon, 15 Aug 2022 19:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590381; bh=lroM00tmODnDQFpUqqoc3y+4ybOKRk44pC+oLOaX9v4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1l9b9tKZ5nOtY46Sv0rXvm0cMHWDvH7vkV43zVKDoFRj9nV3hxTe02LVbAV4+VjGV cp+YZ5ABBZotjod9HzEKEYsBTDZ2N/pb3FmZqUd75n/WOCOibRMY4VnscnM7NsyrY1 3PSzXg7j8PxGxcsESz9aBA+Y7wuNS25HBMaDebWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Vorwerk , Jonathan Cameron , Sasha Levin Subject: [PATCH 5.18 0242/1095] iio: core: fix a few code style issues Date: Mon, 15 Aug 2022 19:54:01 +0200 Message-Id: <20220815180439.791950834@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alexander Vorwerk [ Upstream commit f4decb4c6e374a4ded59a6a76b8236695e44d8bc ] * Fix indent in else statement * Remove unnecessary 'else' after 'break' * Remove space in '* attr' Signed-off-by: Alexander Vorwerk Link: https://lore.kernel.org/r/20220312180343.8935-1-alexander.vorwerk@stu= d.uni-goettingen.de Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- 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 b078eb2f3c9d..01369973329a 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 58d1180f4f61..b2d2b42614d3 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -908,8 +908,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.35.1