From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 23DA3357A3E; Wed, 13 May 2026 13:31:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778679116; cv=none; b=ieOxhUZSHv7wGrZMv1iupo1saoJc4kahWbmyGTnfHQrO9n6rnNXcuGoG+V7uKTnX19HD3FmNaWdom96HaLpRzzXVSQWWlrQg22U0jVDO84ZGGxd9meX80Wz/gMnOfuPZuKkiJJbNWN99qe9Cwd/lxg57DOIEdpBXDolr/QgFnC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778679116; c=relaxed/simple; bh=xarcToYSD8OZNTRk5cuihVSaWuEjfYe3mjW1TtprUC8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qug9z/O7p//9P1aGKMKlzJrmRHH0GF1G+hwgf1GO4fwslRV2IlNvXyq0FqhdtAFdZeEKWJ3qGaaWknLDNPwID7gBAuTyDL5ccM4rWYqQDf+r++lHDQgswWFTTZYyjN7qinkwSEx7zSA2NR4Mc4pZJsU1oQI008edNnLBGPMTAsc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HjVu/Ru1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HjVu/Ru1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D0A3C2BCB7; Wed, 13 May 2026 13:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778679115; bh=xarcToYSD8OZNTRk5cuihVSaWuEjfYe3mjW1TtprUC8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HjVu/Ru1ld6VYiNkdtbZ6GWVmp2w2RQn1zci8vHfFKGf25Zlrv4QJY0t5ZCkFeHJl biHLJjhVXeX/QQgzruoI92s2bc1TFMBMPnhe8aGdjM7DgBwlHpjLkxCLonoH6jDlGk NF9I8tJIjbSnLraIhzaSCCyIu7LPa3lA0j75Kl28hJEFiQJxbPVKh+bFmgbjdhgKWY /zC1CWFpIpcuwEzpEtQWdYIcXc8DJe+YflfxMb8UQnS8O1liskd14nQPUNXP07zuzj pQQGL096ZEcr4H66zssqRgnU5EIJ8lHG7UTg8qyaYayIoIhIGt0cEgnhxw3ao67cJ5 RVM9hHir6v97g== Message-ID: Date: Wed, 13 May 2026 16:31:49 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 02/17] dmaengine: sh: rz-dmac: Fix incorrect NULL check on list_first_entry() To: Frank Li , Claudiu Beznea Cc: vkoul@kernel.org, Frank.Li@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, biju.das.jz@bp.renesas.com, prabhakar.mahadev-lad.rj@bp.renesas.com, p.zabel@pengutronix.de, geert+renesas@glider.be, fabrizio.castro.jz@renesas.com, kuninori.morimoto.gx@renesas.com, long.luu.ur@renesas.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org References: <20260512121219.216159-1-claudiu.beznea.uj@bp.renesas.com> <20260512121219.216159-3-claudiu.beznea.uj@bp.renesas.com> Content-Language: en-US From: Claudiu Beznea In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Frank, On 5/12/26 23:35, Frank Li wrote: > On Tue, May 12, 2026 at 03:12:03PM +0300, Claudiu Beznea wrote: >> The list passed as argument to list_first_entry() is expected to be not >> empty. > > Little confused, > > #define list_first_entry_or_null(ptr, type, member) ({ \ > struct list_head *head__ = (ptr); \ > struct list_head *pos__ = READ_ONCE(head__->next); \ > pos__ != head__ ? list_entry(pos__, type, member) : NULL; \ > }) > > > both list passed to list_first_entry() or list_first_entry_or_null() must > be not NULL. The intention was to to express that checking the pointer returned by list_first_entry() may lead to problems. I'll adjust the description to be more clear. -- Thank you, Claudiu