Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1899193rdb; Wed, 31 Jan 2024 12:32:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFouQ4WblZHCDnWnfUkkd8SDP4fRtE4QCyFJ3z9slRWMNM+vRYFO2J5XHoaBD7/4TBanW4e X-Received: by 2002:a50:c05b:0:b0:55e:eb81:2db0 with SMTP id u27-20020a50c05b000000b0055eeb812db0mr1994748edd.38.1706733153497; Wed, 31 Jan 2024 12:32:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706733153; cv=pass; d=google.com; s=arc-20160816; b=k8HztVe3mZJlK6uCTPQGAr9ruvUs6+LHjelOhttlE9Bkk0kJ1Es12jkD2jJliOahZ1 L8bEUB1BJKg+l05+cA6KL3Z36/Vo9x5CXTB+4byZ0Bkw6AvCg27atAR+4JbGkafu9nL9 HxkwcUOCstr3WPpR73PHPdryp6+Df0eGkF/woP632REClWKn82PwyceFFPPiJUAMuTze MP8Vdemh0MAnuCGBcg326KP6eudJMZCI4TOj512q4E+DKaYHRZZw4Wj23xmDNHhCZhzf uVs/QDtJ7vKXcxsN21/Yt8qx1SdyfN26ekwP6LQZw1jBDau7mpC0Z1n+B+sAJ3nfOY9G q/zQ== ARC-Message-Signature: i=2; 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:dkim-signature; bh=spN9TBa6qBx2kyRaq6eSnqrhMGMjpqGEYwt6RZlDYoU=; fh=CmLwI8AHqx8xcCnbv+G+B9HIJXXP1m4AuZ5FTzaXeFw=; b=aYP10Bu915nvEnRDzoXGWyhSGKew20TcATL19ZTxUnOVn8D7Q7LbAHJ9mLXe4+KiXX +5NvH/gWm3zKRqapGOyFmepcUsJ9iGzq5S67TrqzNsaqg9E90Ih8lOMO0ImWs4KkAk7V ZzwPFNCYzRqqVr3AZgielnOzC+UsLijh4znpldL+QjJQrSNf9gMSz5OMu0ArdQJQUzrM uj6vMy+4TSrkptY7oXSa5C7GxHvpxfvCJxB+pIMMJ+gxWXA2hdUzwPueBUkD5Ru2JHU8 i9FXrYyKu+cjKDWLWuNRS1Y1ninteiPPNCKZ7shJNI8i7b9bUZpWae+9tpFOZRKeYLLc 22sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AO5Ew1RO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXjuZ7ZAVjfD3jIt+qoQoquUO6N3R5LExZCIHk+HHWivE/0xnyqFaxXTPsZ8fXj/ikSa25mJcKFLQmxdn0Mxs8coN/bk1L/650kCDdexw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t23-20020a056402241700b0055a16a90026si6353690eda.273.2024.01.31.12.32.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:32:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AO5Ew1RO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 D03AA1F235A0 for ; Wed, 31 Jan 2024 20:32:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACDB840C1F; Wed, 31 Jan 2024 20:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AO5Ew1RO" 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 D49CA3F8F6; Wed, 31 Jan 2024 20:29:52 +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=1706732992; cv=none; b=R4VPty/DwVE//8JHEH8In4IlF3u/VmLaZp4C3dEFwQprpZoSBLFunRwkMO0+kgNmAYG0FxyBuy/HemcvH6Hobrnrjin1FEROSGqyltMgaUVle5YzIa0ocPnH9mfZeUBCE9HwahRl8uViRgzshGj0ZEGdOvDES34JpufmB5FPHLc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732992; c=relaxed/simple; bh=+oIaKj0uu+ADRh2s+OddhjF3NwLApuM4GIEj8UPzt4Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=E/QQwhOASUr2yfclImTMVeqpICP87lbmyaP+7tbRHTRvdNBkCTfaIbS/Y39rYu1a1fCvgGouvpse6FqXFtt+bd3VAPg1AvjUm+Kd7q+Ljh5OtHO8QE6x4aJsbeR1icTehayF6ICpiL6tP/AOo6clT5niSA/HDaKtnsjXK3PrGDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AO5Ew1RO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18E58C433C7; Wed, 31 Jan 2024 20:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706732992; bh=+oIaKj0uu+ADRh2s+OddhjF3NwLApuM4GIEj8UPzt4Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AO5Ew1RONycTRKELWM95CdNeWthAG4j0CjgWBVUByOfqFF1qlFrCD1Th4M++9dkfG r6V1ysJc98sd+VcQyyvdsS92UXEAWzaBYEXRIlcqo9wY/D+1dmYSxaIPVBl51Cf4W2 9pBtEyZkYeYPfXouUm73RQp0DfDL+Sc+k9XdhSJ1ygsAB+jA4/e6QJhNwqnvNzme+5 buXkxIKOMLidPDaPCvIuQtyV1I8D68NMbS+lA4DSUK5xvfx845A+CjAnrknbzUAlVQ YzLDbcqg8X3E7oB7qjFsTARNYPKxChE2FAqbRR4vNyqNkWuT1viYU3ToJL/tLPohmb Pi852MJEuYXdQ== Date: Wed, 31 Jan 2024 14:29:50 -0600 From: Rob Herring To: "Christian A. Ehrhardt" Cc: Rob Herring , kernel test robot , Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] of: unittest: Fix compile in the non-dynamic case Message-ID: <170673298869.2247741.13347851675269431650.robh@kernel.org> References: <20240129192556.403271-1-lk@c--e.de> 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: <20240129192556.403271-1-lk@c--e.de> On Mon, 29 Jan 2024 20:25:56 +0100, Christian A. Ehrhardt wrote: > If CONFIG_OF_KOBJ is not set, a device_node does not contain a > kobj and attempts to access the embedded kobj via kref_read break > the compile. > > Replace affected kref_read calls with a macro that reads the > refcount if it exists and returns 1 if there is no embedded kobj. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202401291740.VP219WIz-lkp@intel.com/ > Fixes: 4dde83569832 ("of: Fix double free in of_parse_phandle_with_args_map") > Signed-off-by: Christian A. Ehrhardt > --- > drivers/of/unittest.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > Applied, thanks!