Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2927860rwb; Mon, 15 Aug 2022 14:13:21 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gAfTKnEmtPytJgGREmTPVumG2s2uuwQYwYlM7/1qni/LYVjCbWOS50TU6Mn7rYp5aIpAV X-Received: by 2002:a63:8a42:0:b0:41b:dddd:b81f with SMTP id y63-20020a638a42000000b0041bddddb81fmr15246810pgd.229.1660598000925; Mon, 15 Aug 2022 14:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598000; cv=none; d=google.com; s=arc-20160816; b=PZxnw4nq10ONXlDvIjpUkJlR+Ps5u5Q/KELe69RGeLuvEHlaDP7v4L75gdT6mX5lTS HDPB3M7HEyAnYNcZ6F8RlzLR+V5ALygZmiq/HWyopO3BiMXaHkR7w0tVwl1DF6e31nXI 3V1gnht62IwphfEF83U1qA0IBtqSJZ44gbTAjNS1kEwhXzc6crpXxiECQMrD845nLTJl zcyUVFRwb1sOYmQJEMEhjwJPsYS9F2y0M6DNTbiE1h14QNak/NLCPpsqkEWrHJLOH0XW LwgAlNvmEUFSmLrF3qd5I6D52qCXhiIGx9fgVa+9V3eUamyOKstOFbv6U2G4RcOKA7Ba Azpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xTjWJOPfT3CRJXU9svNBaI+lKScbX0XyLu3I2z5e/fE=; b=kFX7om6QJszesMspmKcz+6ZX+dVTeo6tpLweIqb4qMswxVedxdvN5M+JV3SfbvMRrH 9St95o/kY0yD4wEW8VKh0AvH3Z+mHroprlIoK2hyc9jG1yx2r+HN1bdsCS/724SPQZCK BkP63N3u93UCroJVkIYOkhkiKrr4+3cOoetgTuYKeyLPH/av0rGffi7W5ac6t5zU+nAf aekF4UJRFX3Ybnb2+mgnhHtj6/BY57JzD8ukGDb1LklPcKvVBTnPYmLd1UFuUY3TINCW VGcj8pXAZyZZQc9PYkFGbDbl6QT1TgexP502lkn6hHBSrGj1OSujQLp3FKmMFbC1XwMb JLlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1l9b9tKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020a170902ba8100b0016f90276117si10938912pls.25.2022.08.15.14.13.09; Mon, 15 Aug 2022 14:13:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1l9b9tKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345602AbiHOUjp (ORCPT + 99 others); Mon, 15 Aug 2022 16:39:45 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@stud.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-buffer.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 == NULL) return -EINVAL; } else { - scan_mask = compound_mask; + scan_mask = compound_mask; } config->scan_bytes = iio_compute_scan_bytes(indio_dev, @@ -1649,7 +1649,7 @@ static int __iio_buffer_alloc_sysfs_and_mask(struct iio_buffer *buffer, } attrn = buffer_attrcount + scan_el_attrcount + ARRAY_SIZE(iio_buffer_attrs); - attr = kcalloc(attrn + 1, sizeof(* attr), GFP_KERNEL); + attr = kcalloc(attrn + 1, sizeof(*attr), GFP_KERNEL); if (!attr) { ret = -ENOMEM; goto error_free_scan_mask; diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.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 fract_mult, } else if (*str == '\n') { if (*(str + 1) == '\0') break; - else - return -EINVAL; + return -EINVAL; } else if (!strncmp(str, " dB", sizeof(" dB") - 1) && scale_db) { /* Ignore the dB suffix */ str += sizeof(" dB") - 1; -- 2.35.1