Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp386158rwa; Sat, 20 Aug 2022 05:52:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR64EhiQNkjloWbavbrBDwItQTzK90H7kIPxmNWbIu0qG/e4UW8IVnFvYNE9efkvJkTWDTvq X-Received: by 2002:a05:6402:2691:b0:43d:ba10:854b with SMTP id w17-20020a056402269100b0043dba10854bmr9229316edd.158.1660999950611; Sat, 20 Aug 2022 05:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660999950; cv=none; d=google.com; s=arc-20160816; b=hILXlMFFAQvM7snU4bLOF3YOKherAlcX17L2NRBILDgvZPK0UTsfPnFJQ/rKM8l0MZ 1pTyYQ7VuJeGIuWrZJiYr89A1P8xy3deASweZ8Lf5EWG72koWBMSEe/B6KnjlfeJIgsv ey2WrCG+fwmyLeis2Jpy1aGepcR3wBnGi8ESyRrIce7TjXOdTxgzwHm+DXxEGLr2Gs2o h+2OpBj961ApPe6ACjt+fNRwMEan0gpJqBJ3ddDNQN+UUhJVv0krfh3h76Y7yHzod1xA RT4WTPL+Rv0SdUaom5ZU0/BkP4UnMnpziviGl53hMse6sm3PYd9XkLwmnatIGgqGNo2Y 0PYQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=NsIaOlR/FBaNiCMcHr6LudxdHGKDttHoEL/rrjuOvPk=; b=MoP+nae+ySFOXWxl9XuSr33Cr7eBprRvc5GeiwVwxHMn9b7bQbBQf5pvTnWLCYcrpS Z+T77EbHRbUrbny7b9C5r1cdaSN6Iwqd3RkC0BLgt42cgxUzM5pUpsNGoT0KONtdqnam NEDAMwO6Lvs230PTM7S6XVvj+SiVnUji4Y/U9xMuoM2OHxr7Gd8Fnb+J4/kzgNgzP1B3 uz08qNmB9ir8q+NIeE1AbCnZLtZbRlzIbRg3DPKVN0Zp8CiCk0dPJ/PgZxlmJDTBk7wi xrplPoyP6RAvmUq00per+LHlJFW7jo1F2qlL04TOcvf3w6OzuY2jFeDANjIl5YCjXGvm 1RNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Mu0IER8M; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr11-20020a056402222b00b0043bdf9b0ff5si4266566edb.443.2022.08.20.05.52.04; Sat, 20 Aug 2022 05:52:30 -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=@kernel.org header.s=k20201202 header.b=Mu0IER8M; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345843AbiHTMH0 (ORCPT + 99 others); Sat, 20 Aug 2022 08:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346075AbiHTMHW (ORCPT ); Sat, 20 Aug 2022 08:07:22 -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 C83F39D126; Sat, 20 Aug 2022 05:07:20 -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 82859B80B8B; Sat, 20 Aug 2022 12:07:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12FFFC433C1; Sat, 20 Aug 2022 12:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660997238; bh=ET+Eoevr87hUV2gzJcF2VdzryEshL8SZbQM1YaN7lUc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Mu0IER8MeSaURN+xVaCZP5DTyTFbAjgJUHn8FU4EvDvbCnTbGh5mZjZpS6EaOUTWj /+7+KV1mOaWpPRvtZBJsv11uEO6Hi7ZCq/3qWAv4yxEyM+ZQYzAIMjSYI0sXxiNBBF hhB/nE0KZtNqwLp3RomqB/knThT3xUknX693mhevrna0oXgwxRYqvqNJ9vCVLeSFvp GIqPsY09eiJhCZy6bT7sD9UaCQuHy55Mli5LTxiWeMvXAyaUPECma0oICqpYyHeg7n ajPBOwuUWT4twuhtyLj23v1j4pTi1ScHzrHXOu+wx0//fIqraS8Zkb7ZqQsjZxJASf GxRtIytoZylMA== Date: Sat, 20 Aug 2022 13:17:54 +0100 From: Jonathan Cameron To: Joe Simmons-Talbott Cc: Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] iio: Avoid multiple line dereference for mask Message-ID: <20220820131754.729d59a9@jic23-huawei> In-Reply-To: <20220819182012.219523-1-joetalbott@gmail.com> References: <20220819182012.219523-1-joetalbott@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 19 Aug 2022 14:20:12 -0400 Joe Simmons-Talbott wrote: > Prefer lines > 80 characters over splitting dereferences across multiple > lines. Reported by checkpatch.pl. > > Signed-off-by: Joe Simmons-Talbott Applied to the togreg branch of iio.git which will get pushed out initially as testing for all the normal reasons... Jonathan > --- > changes in v2: > * Don't use a temporary variable. > > drivers/iio/industrialio-core.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c > index 67d3d01d2dac..d38623c046cc 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -1303,8 +1303,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev, > > ret = iio_device_add_info_mask_type_avail(indio_dev, chan, > IIO_SEPARATE, > - &chan-> > - info_mask_separate_available); > + &chan->info_mask_separate_available); > if (ret < 0) > return ret; > attrcount += ret; > @@ -1318,8 +1317,7 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev, > > ret = iio_device_add_info_mask_type_avail(indio_dev, chan, > IIO_SHARED_BY_TYPE, > - &chan-> > - info_mask_shared_by_type_available); > + &chan->info_mask_shared_by_type_available); > if (ret < 0) > return ret; > attrcount += ret;