Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp579721rdb; Thu, 21 Dec 2023 20:42:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaY01bTH6oRt9gw+F2fpb01Cibu7mHjSGHaHA8U0/3n/yBMd4YCajst+pkiBhBsKlIGv1H X-Received: by 2002:a17:906:ad8b:b0:a26:a445:829a with SMTP id la11-20020a170906ad8b00b00a26a445829amr413685ejb.63.1703220162719; Thu, 21 Dec 2023 20:42:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703220162; cv=none; d=google.com; s=arc-20160816; b=PUuXYwSXHnY9CFn4BUJnXJAWW4gC+rsSTLlVeNQcoZGhUsSEBitLNjqHiHJ7zffmtu hv/kleE5O0MlpXeJQPblzch5tpHK9dXy8HYWy0pGnt1cJGI9ztBIaYFlwhYdofeCHrfG BLBpSebGGk0b3Q4CuiGAuQqO75gT8rkaWgiFJbyoIbS3QzqqB9fHHkg8Ja12G3q6Bb5H tWG6Z6Ic7o1vYCN8lqcq4R8nyY93HKyOEtg4FW41OqFBMGZa/Ss7mrgQtUjsoDKH8eXZ 6ETpQHWZ0DNSP2ZiH2JHfVDdUumbfDgZhLjtgNAtQVRV29onZW+x6S7W/4G9oRXrI6pQ MDKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=CZb8U+W/Vks/VuPNnTxsPHpEIO9fXwUMk5mkfyy5ahA=; fh=2xkD25UsB/YjNMmHg7a/7N5Oiz9+8LnnzrWSjtln8DA=; b=HEnvXTKT173FbsKpbnf0E+XcKOHI/qm1v/O9GCp3X17TVyv0TvuOoeqN29Ml9MH8MK Jb5ikRISJ+duUTd8dOWPp7YOQD6T5kLDRhJA/la7s1oldu3lvEyEHADdR9YdNaa73NKY PpUOcJhlQJkz7jf+aVmwsE8y6dkvt7/ZYuXtbDnnQD8Nl3e+xhfSKpyaoxlJD+fpc9F7 CqpknZ3kl9+zVSiwbzcjq7is/r/9jMFJCitApSRZJSIwnJ7166gDNuXgC4wAAoaZLD4S oU0WnRUuZKgQgTtda5uUcHXHt7lrMRccEUW4sirJAhnFs62hfbT7NkRzpZ4G+i46Nxim SJNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9335-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id wg13-20020a1709078f0d00b00a2692bf0e1dsi1436625ejc.212.2023.12.21.20.42.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 20:42:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-9335-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9335-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 78BD51F25A29 for ; Fri, 22 Dec 2023 04:42:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AEBABB64A; Fri, 22 Dec 2023 04:42:12 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (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 44D279475; Fri, 22 Dec 2023 04:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rGXMB-00DhZz-PV; Fri, 22 Dec 2023 12:41:56 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 22 Dec 2023 12:42:06 +0800 Date: Fri, 22 Dec 2023 12:42:06 +0800 From: Herbert Xu To: Thomas Bourgoin Cc: "David S . Miller" , Maxime Coquelin , Alexandre Torgue , Dan Carpenter , linux-crypto@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH] crypto: stm32/crc32 - fix parsing list of devices Message-ID: References: <20231215111724.864051-1-thomas.bourgoin@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231215111724.864051-1-thomas.bourgoin@foss.st.com> On Fri, Dec 15, 2023 at 12:17:24PM +0100, Thomas Bourgoin wrote: > smatch warnings: > drivers/crypto/stm32/stm32-crc32.c:108 stm32_crc_get_next_crc() warn: > can 'crc' even be NULL? > > Use list_first_entry_or_null instead of list_first_entry to retrieve > the first device registered. > The function list_first_entry always return a non NULL pointer even if > the list is empty. Hence checking if the pointer returned is NULL does > not tell if the list is empty or not. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/r/202311281111.ou2oUL2i-lkp@intel.com/ > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/r/202311281111.ou2oUL2i-lkp@intel.com/ > Signed-off-by: Thomas Bourgoin > --- > drivers/crypto/stm32/stm32-crc32.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt