Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp675878lqj; Sun, 2 Jun 2024 17:34:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVP5ZZPCzaLHPFDpGTsix3whpXRLQwr/JQ/dC0k5kBu1u3h2veQYBK4MccbJsKcKp0sBEzootNamEKgDBsieAU3kDCIOUjV4gYx76OATA== X-Google-Smtp-Source: AGHT+IFVii67ZBgidiODtqEKJGjQ/ANLsCh5BDUuSclV/IGokQqu9zp2hdQo7aSqdazinqOw5/Qz X-Received: by 2002:a05:6214:3f85:b0:6ae:1055:9873 with SMTP id 6a1803df08f44-6aecd69ff0amr115411556d6.21.1717374849872; Sun, 02 Jun 2024 17:34:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717374849; cv=pass; d=google.com; s=arc-20160816; b=sgNS2JYjOXgVKGTsWv0tB86Z8lGyB0M7LOw6j0MyyERFhT5oXhxNMY+iIF24YFFmdm c1K2Y8k/EM8Ecg1R0AKvcMPXggGV7dwglCgt8Hk+x0kIjprgUrzoZTr4HkPIobTT2cu0 b5r/9S2pQCBiCgaUyEJtFIDwHuFgKH5d6QPt9Q/Kil1JliDqtEZOu8h/myZ92rH4S5TM YEE7jxrwvK4nQRbEiL6OJrItg8HmTeHUh0K595V63C5rBk69mfXks3L2HdIcaVjmGjJ/ ERENyxbenqSmSGyxu5O9zQ5COgMCqrMpgCfcqzaorYekXynPQnPN7p7wYgpcsCuHInGG l1Zw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+9i05LKO2QA/lK7UY488kffvxZI78NDDMmynN4RHjDY=; fh=zHmvfkjdNfBuJ8M3ivq9Vd8L3gqi7cNjIbsvZkBSDEk=; b=dI0riELABBzOEWc23RAiEIN1QKUPy5F4yWPHo3vlYSTftROvmV/wTdd7hxoOTQa2tX RpBwqBHHC4GwZJTHWU6SR1cbL/pkgvQ7SDJrKHkuJVkFTjYmvpP0VhKOaV9N28l8MgU1 +oTn9zd1oFwnboLQ88ovMtDhpGymM2clVq+RVCdbFAwk89KmD/ZQmqynx45hP3WOQdh/ tLXyVatoyX2/xIpgxh6eKx8yNgTpTyaLvekRLBafOpji3+oxyt1WaUwciDf1Rbm6TaBz QicXw6Hk63HuUnIhvXxu4CAvQeFNeU4R/DQEMamTVbUo/1HpBjlbFA9BdWWXGiduXyQk Cq7g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=cxshFyB9; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-198502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a733c43si57294406d6.82.2024.06.02.17.34.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 17:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=cxshFyB9; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-198502-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198502-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 964371C20922 for ; Mon, 3 Jun 2024 00:34:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA2CCAD4E; Mon, 3 Jun 2024 00:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="cxshFyB9" Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 583C6625 for ; Mon, 3 Jun 2024 00:33:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717374804; cv=none; b=YipKvFPFLiU4102KPE0cfktLyX54oB+RSALQ2E/0ZgLTJS8ORzwR4FqEY5/75k5RHXTORpnGKI3cv9KuegVZlP74mivOMKQYS490yJCSPoQZYLl8mDZmGHOVRjlfqR0tTf9N+AIrqKEKukUCDCc8Cb+7D9rEBNRU+ZSVh0vCp10= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717374804; c=relaxed/simple; bh=v6FQDpTvBgPP6UY0yZcioa8V0uGC7CDfX5pgDoWI7zQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dKPYsPmDVDbbnuEQF3l63sOp9E0DiLb8Dg9XYefwVjSv8sXi95bD9URXxIUKv1cphYmalriOMz3V+TwySEe+t/+RWUHyghzJidju+9HIVXGHZhkYtXhHTtyXbBvfSnDuh9ivmkz31RjmxdJnbkK6JW+5xuUPiJ7hQemgmSmPVDg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=cxshFyB9; arc=none smtp.client-ip=91.218.175.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: linux-fsdevel@vger.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717374798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+9i05LKO2QA/lK7UY488kffvxZI78NDDMmynN4RHjDY=; b=cxshFyB9JKCAKNznr6OdQp2IxW5GvjHiPt+QwcO6E7Tff7SKkiTnAbxNBlh6rLc1BPyINF oAsbyEBatHM043qRZtq+a8/5fz3Bt4YMJ4266ftivXpjgOu+sVkinKDFD6wTXyCe+0IeR1 kS1/2wqUZqwufTFCro/A+IvTJdlst2M= X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: axboe@kernel.dk X-Envelope-To: kent.overstreet@linux.dev X-Envelope-To: brauner@kernel.org X-Envelope-To: viro@zeniv.linux.org.uk X-Envelope-To: bernd.schubert@fastmail.fm X-Envelope-To: linux-mm@kvack.org X-Envelope-To: josef@toxicpanda.com X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jens Axboe , Kent Overstreet , brauner@kernel.org, viro@zeniv.linux.org.uk, Bernd Schubert , linux-mm@kvack.org, Josef Bacik Subject: [PATCH 2/5] darray: Fix darray_for_each_reverse() when darray is empty Date: Sun, 2 Jun 2024 20:32:59 -0400 Message-ID: <20240603003306.2030491-3-kent.overstreet@linux.dev> In-Reply-To: <20240603003306.2030491-1-kent.overstreet@linux.dev> References: <20240603003306.2030491-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Signed-off-by: Kent Overstreet --- include/linux/darray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/darray.h b/include/linux/darray.h index ff167eb795f2..603d6762c29a 100644 --- a/include/linux/darray.h +++ b/include/linux/darray.h @@ -108,7 +108,7 @@ do { \ for (typeof(&(_d).data[0]) _i = (_d).data; _i < (_d).data + (_d).nr; _i++) #define darray_for_each_reverse(_d, _i) \ - for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; _i >= (_d).data; --_i) + for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; (_d).data && _i >= (_d).data; --_i) #define darray_init(_d) \ do { \ -- 2.45.1