Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1160362rdb; Mon, 19 Feb 2024 06:17:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUWOoM34rsggSCXYD/KiYwGpwWlFpT0iK2SK0x/LeIvCZpjrlBmeUS/w03K/jxAzIAwIGidXuJrLpENUiIKFysQ4u0c6GyYpnaGaE1DdQ== X-Google-Smtp-Source: AGHT+IFucVxZMRAMrJ3uJVOfYmIFpHA82o1NBkCdMj2mJtu61qxJM/nkP2f9JaqiyQtOjQKDs41f X-Received: by 2002:a17:90b:a4c:b0:299:d79:b3e3 with SMTP id gw12-20020a17090b0a4c00b002990d79b3e3mr9797572pjb.0.1708352248934; Mon, 19 Feb 2024 06:17:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708352248; cv=pass; d=google.com; s=arc-20160816; b=TSsCIt8mgreo/c6QwP2PN/onXtwW6jC8dL6fI73oVBuLV2Y9ipDIMUwMtDJ+vTCpqE SIKsSei1iwXSXZrTPyb/18Tr5yqcrvM/EZm2Iic/h5EVW71dRfl+77qwKpzvoVfQZP16 lcZJWF3ZX8lzfqhp9P+3ERi7JMSxhdWQRN33GLSO7gL9nLX1wO3ekQl0QNl6ZR/kpwmE 5WVmxyQNRMzaGLsb+YOeuCXQTl/ldkH/lpFBvgWNvstrDNk55PBSM1OGy/IAtIb/75pN byOhViJdPLQxbYhU01l3ITSVxl9nGw0aQ2rFEfh0LFDJjbO7P19ZqZejt1GxuoWn0c7+ WX7w== 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:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=ZrEhadgcarWSoboKUlIaV5KpZramrM7a8/luxhsynnU=; fh=Ilo5fVKuoPfvBsb3on8UVL7VnJJxRcMZ5i1FBItOr48=; b=ixHo4Nbm4uy3k4jlfHm6MzWgG8WmjDmTFwSsR/i/ZONh0Cj4L/IguvbAY9Y9Qzpahk ZW7/tOf9vQmh/lD+7MWOXC2Fn9XPaHew0dQq/113SWN9TSVaqRqRYg5aCjZbdat8PSyp PlIl9XAsH7s/5n8Kx2GAsog5D2WF9ycrdcLi9ATVxII3FgdMkoruirW+B0NbGHgQ2xqc SDn3jTMFoMsmRDx2+RAYkGOz7AfvPD1fE45F7AWzExuEDK3LpRbtfGC13QlwXpOj2MW7 xUYXaqGA2orv8Yxn8AfziTGOX84z/PSIBh/DFA/b9ZG1n4mh9b8/ypvxnHOPPrjh9dpT MNqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=g3058xB3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-71458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gv22-20020a17090b11d600b0029929e66a2fsi4582296pjb.147.2024.02.19.06.17.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 06:17:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=g3058xB3; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-71458-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71458-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A7E7282445 for ; Mon, 19 Feb 2024 14:15:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C94F374C6; Mon, 19 Feb 2024 14:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="g3058xB3"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dmkN+fQY" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 AF2D336B16 for ; Mon, 19 Feb 2024 14:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708352114; cv=none; b=UnMFNNPibtzuNTkp7FATbkILC7nF2Yk6rZjitvyDATyZq18NiyOo3NN2+XdZ18b6ZwKFQ++0McesIs1dYTaAMhjimb7Rd6B0gDydVcnXnvCFYWc/Zd5TpvmbgaDA0VEE4DSFb6phQ5kPSSTFRVToT9hKovMHvrhAzPRMcZkTjII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708352114; c=relaxed/simple; bh=Opm59fu5aL0vnD0vEzI9XMh5NvLNjVb0OWvnK+EGUS4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tiiedvHQAf8DLDPa+kLXpmh0lXJuanz1KjgSEBqUxjdXzc96A0pPDA0f20h4D83fQ/fODxt/pK+9XpOyAN9+qiVsvh9HMqkcspVHEiiU8gaxHImJXkg+EWqoWFdKKsbgHsjBNM9RyKFOt9ZgIlwoDilWjTCkg7nxAiTjYP6/F2E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=g3058xB3; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dmkN+fQY; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708352111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZrEhadgcarWSoboKUlIaV5KpZramrM7a8/luxhsynnU=; b=g3058xB3g2D4ge8VPLG8xJJ3ubQNmczc5lMx3eRC9WML6Bn/n0R5HS0TcXkrIgDVDQomhd rbnZUipWCWWAzdvk/d1MOG4iHLzpoMgdZ2g402d5w/dTLlmvpSfWjjV6/Dat7xHNcFkfIo bC9y89arVJKk27Slk53SatrqpgaMQP7pch7FxEohuNwCTop/zq7OEYu6LvQoYgqTr22fWf s5dpXaDcfDQU80tz/MVJseYuV3pvKICgy/DmX3YKFxv26Web5onwm1jNQNlZSzEreA0xuL vZZRlGDAWyriJtGoMc0tT6Uk+Lshtjfyv4HILPMVaNjKLfCmwZKLyLzsMiFdtA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708352111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZrEhadgcarWSoboKUlIaV5KpZramrM7a8/luxhsynnU=; b=dmkN+fQYmwf5MGotNyOZpxemzkw3iNXSBhUamQxxRwjaHM8CUQ2jtRjg0+f+nymsU9UH6B SqNXrOuWxewjAjAg== To: =?utf-8?B?6ZmI6aqP?= , gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: xuqiang36@huawei.com, chenjun102@huawei.com Subject: Re: [PATCH v2] irqchip/mbigen: Fix incorrect null pointer check In-Reply-To: <20240219085314.85363-1-chenjun102@huawei.com> References: <20240219085314.85363-1-chenjun102@huawei.com> Date: Mon, 19 Feb 2024 15:15:10 +0100 Message-ID: <87il2ka6c1.ffs@tglx> 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=utf-8 Content-Transfer-Encoding: quoted-printable Chen! On Mon, Feb 19 2024 at 16:53, =E9=99=88=E9=AA=8F wrote: > From: Chen Jun As I said before, the subject line does not make sense. This is not about an incorrect NULL pointer check. It's about using a function which is guaranteed to return NULL on your platform. Something like: irqchip/mbigen: Don't use bus_get_dev_root() to find the parent makes it pretty clear what this is about. > bus_get_dev_root returns sp->dev_root set in subsys_register. > And subsys_register is not called by platform_bus_init. Please use '()' when referencing functions. See: https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#function= -references-in-changelogs > For platform_bus_type, bus_get_dev_root always returns NULL. > This makes mbigen_of_create_domain always return -ENODEV. This lacks an information how the above problem is solved, i.e. something like: Don't try to retrieve the parent via bus_get_dev_root() and unconditionally hand a NULL pointer to of_platform_device_create() to fix this. Hmm? > Fixes: fea087fc291b ("irqchip/mbigen: move to use bus_get_dev_root()") > Signed-off-by: Chen Jun Needs a Cc: stable@vger.kernel.org under the Signed-off-by tag. Thanks, tglx