Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2418034pxb; Sun, 28 Feb 2021 00:10:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJybe/I7x1jiTLERghLnvD5T1UxdVMSep6eRpO2ulrVzpy94qUckLBb964Pl2amhFqiGS0ub X-Received: by 2002:a17:906:d19b:: with SMTP id c27mr10533571ejz.304.1614499824219; Sun, 28 Feb 2021 00:10:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614499824; cv=none; d=google.com; s=arc-20160816; b=XNMZPgidJzmvv0NGbVg1tNup6Zvte6rVkxeWWp7zKAHq/sOelwBwAxz/PB6RTx3zsc vGOOv3Ei9KGZlgUKHseeOtTkxoFbvC1Dwzwuz8rhsNil2cUcpXqbEl4oWu9QoMVo1MDY r8xL5xk5oKFpyIiiPPpC4zSndF5p7xYV/UKRoKHwzOLx+yTFI2JJkGJKZnHTiVXfQZz7 6D6p7wyVdv4g0GNwmQrVx1H5kqY1Pgd382SGPWYEKiIYPps5b65JCloLHX8E6KZ0TgJj UNIK2h6H2ONHkfz7Rv0fMcmP4FRptsD4Bugz16NNZ8VpjFn+eh5rh740vWjYefnzmo0c pWww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=B9OZjisZDX8Qs3+RcaljLhAAmht/cIkc7wgQ3CQ34vk=; b=l3fe8Bt2ScoIXfkLrHvB5LQiIxIMaqwgkR6uegqbFKPcWdAoix2EHqv25OXAuqmJO+ +uKyd6vNtmj+17AgZ4WhF0IxXdJC8JkwGUu03+GZoFCTrHYPmxzLcT0vyPdNm2GXNriv fi4+VSKBBiaoJML7HUX6gFBlwvRL7VkQ8z0pXY8R2u6MOEMRdiLhloe98kdK7+lW4FbP rvWcimFfaP511hWad9e9+Q2aXtcIY9srW/uwOW5n7wzUNaR+CoUwytI+PKHlfOEhPF6k U8Zrpl/eeFlKwFLhinhddMVkaSEqpZMvDyU1oHrUe/QnOWl+Tmrw2oEYx/VEgq4WXtJO 5wwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b="lrmBZ59/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bl4si8929345ejb.691.2021.02.28.00.10.00; Sun, 28 Feb 2021 00:10:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@metafoo.de header.s=default2002 header.b="lrmBZ59/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metafoo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230214AbhB1IHT (ORCPT + 99 others); Sun, 28 Feb 2021 03:07:19 -0500 Received: from www381.your-server.de ([78.46.137.84]:44590 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230061AbhB1IHS (ORCPT ); Sun, 28 Feb 2021 03:07:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metafoo.de; s=default2002; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=B9OZjisZDX8Qs3+RcaljLhAAmht/cIkc7wgQ3CQ34vk=; b=lrmBZ59/aJRAz+zhb0ZzsAO4v3 778WWCIoczKHKyUdNz16swEWFL84Qs+Geluwf3cc4I9HKpUokXZfvORsFVxFCk0weiFPK52k3Pz12 zM4iE+2+EdA9yFR/IFXNBOpUwWN9yXzV8mbdxyX7SzeJRJo7ABZnFO7APuZOSLe1/IXY+YAEXzpQT grH9w7reqOm1ElvJgE1dHPgxnbm4WwANtEXTtKuEdtS29wKkMAytU41COFNh43BWZK5IPAq90REtl stpdymIetO/1Cnq1GdnGCBkJro44cSE4ymPcQDfL2otueMwR+FT6B+AEgYRED/qJZC5cC+66QTIVh OxDS7d1Q==; Received: from sslproxy02.your-server.de ([78.47.166.47]) by www381.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lGH5c-0002Nc-Dh; Sun, 28 Feb 2021 09:06:08 +0100 Received: from [62.216.202.180] (helo=[192.168.178.20]) by sslproxy02.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGH5c-0009HL-8Q; Sun, 28 Feb 2021 09:06:08 +0100 Subject: Re: [PATCH v6 02/24] iio: kfifo: add devm_iio_kfifo_buffer_setup() helper To: Alexandru Ardelean , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Cc: Michael.Hennerich@analog.com, jic23@kernel.org, nuno.sa@analog.com, dragos.bogdan@analog.com References: <20210215104043.91251-1-alexandru.ardelean@analog.com> <20210215104043.91251-3-alexandru.ardelean@analog.com> From: Lars-Peter Clausen Message-ID: <2e6f90be-5dbf-1356-d1ac-22a4273c87ee@metafoo.de> Date: Sun, 28 Feb 2021 09:06:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210215104043.91251-3-alexandru.ardelean@analog.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.102.4/26093/Sat Feb 27 13:05:31 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/15/21 11:40 AM, Alexandru Ardelean wrote: > +int devm_iio_kfifo_buffer_setup(struct device *dev, > + struct iio_dev *indio_dev, > + int mode_flags, > + const struct iio_buffer_setup_ops *setup_ops) > +{ > + struct iio_buffer *buffer; > + > + if (mode_flags) > + mode_flags &= kfifo_access_funcs.modes; The if seems unnecessary. If it is 0 and we AND it with something it is still 0.