From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5813AC4332F for ; Mon, 3 Oct 2022 09:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Cn8grtdY1HvjoiaJSVL9sZxqcXmYh2p2TW8MLJdrgMs=; b=qFmfJTGZz9G6TN zjeCqejrDUG/rAn9S8ib3cf8I5o4BqTDP8G04HsT6Hwxkw60zp9fv72waXBUrMzTpL9ahhC0IBq/E 55aUCMpqhSO5u9LijL/8isamrGTpRkuR5y1CGdmLAfjj1YFG091AMUErzQRJts/utDP2Z6m6p8R5m VudC+ag5Y2jkPGD499G/OLTUjJN+AQkZ7iRwY+Hm84N9W6p+LkwwzuqJHSFMFhGmbZhCtKNtOd7hp Mgsa2cDUNfT8Vdki0UoZtpGsrza1PWcyTe1wxbRx30/fKAEui+PxpQY9hK38whZVRVq48mbSpJREF 90ZONJInobYPQ4cMG2CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofHxz-0056nm-0s; Mon, 03 Oct 2022 09:42:27 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ofHxv-0056mW-HV for linux-arm-kernel@lists.infradead.org; Mon, 03 Oct 2022 09:42:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664790143; x=1696326143; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5g0KdDz+yWE3/smCFgpv/AmpQhtjfHFM8QG3/rIgCUE=; b=Bj6iacQ0ZyL4qpsjhjBIay4tqJgmbtBNGV9Egbk1jY3qR22XLYdqFv1Z Cvfdr7u0KMzwXNIRYBFXiGgCFgbwzrMSXWSovfy/i/tch9R7Z015M7SFa yl+nFac07KjIx41wNEmLUeovWU91at1GSCHII3HBTW9CtRgJpcZXyENCB 08CVW7kmdZzjuEPFdUG6UHvui3EjDCPO2PNgS3F75yEOeHT8te/HMt9gA O/+cqN7fZasLGo+hPc1UnIGgEXATHRj9PFVXSnlW9UkkL2SsW7kwGTDMg kNJ/PgvdUk8OmzeIqBl4ophv5Qclw+qWQJNZA6KS+cCM19XVrn+GV8/SW A==; X-IronPort-AV: E=McAfee;i="6500,9779,10488"; a="301312073" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="301312073" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2022 02:42:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10488"; a="574567543" X-IronPort-AV: E=Sophos;i="5.93,365,1654585200"; d="scan'208";a="574567543" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003.jf.intel.com with ESMTP; 03 Oct 2022 02:42:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1ofHxd-001Rjr-12; Mon, 03 Oct 2022 12:42:05 +0300 Date: Mon, 3 Oct 2022 12:42:05 +0300 From: Andy Shevchenko To: Matti Vaittinen Subject: Re: [RFT PATCH v3 10/10] iio: Don't silently expect attribute types Message-ID: References: <63f54787a684eb1232f1c5d275a09c786987fe4a.1664782676.git.mazziesaccount@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221003_024223_616428_E61D139F X-CRM114-Status: GOOD ( 14.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , linux-iio@vger.kernel.org, Gwendal Grignou , linux-kernel@vger.kernel.org, Paul Cercueil , Miquel Raynal , Guenter Roeck , chrome-platform@lists.linux.dev, Lars-Peter Clausen , Miaoqian Lin , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Alexandru Ardelean , Mihail Chindris , Michael Hennerich , Cosmin Tanislav , Nathan Chancellor , Benson Leung , linux-arm-kernel@lists.infradead.org, Matti Vaittinen , Eugen Hristev , Claudiu Beznea , Jonathan Cameron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 03, 2022 at 11:58:35AM +0300, Matti Vaittinen wrote: > On 10/3/22 11:43, Andy Shevchenko wrote: > > On Mon, Oct 03, 2022 at 11:13:53AM +0300, Matti Vaittinen wrote: ... > > > + for (i = 0, id_attr = buffer->attrs[i]; > > > + (id_attr = buffer->attrs[i]); i++) > > > > Not sure why we have additional parentheses... > > Because gcc warns about the assignment and suggests adding parenthesis if we > don't. Ah, this is a condition, so that's why compiler wants to have a _result_ of the assignment and not the ambiguous thingy. Btw, have you considered to switch to in-loop iterator definitions as we do in many other places? Also, it might make sense to introduce for_each_... type of macro helper if the loop is used more than once. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel