Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3232820yba; Tue, 16 Apr 2019 07:20:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZ6Ev1szcX4vRJAv7iOxEnx0BtMaNSy3c1sEwWH+mPVmdncEFuysE/ptKADKBvu8qFagop X-Received: by 2002:a65:62cc:: with SMTP id m12mr75995619pgv.118.1555424456689; Tue, 16 Apr 2019 07:20:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555424456; cv=none; d=google.com; s=arc-20160816; b=TlomtXMvqj6bTz7oOul7IhywFinNdq6Yn6F2BDc2DlKz5V87JDCFOwR/0vQzs4XJMp KxCTK8xUuwKkZg5wGihy5ot/HcYV4Vg5lF1YGTPQVhIvP8yq6HzNcuNQRaY5V769RNlU nhGul4h/dh5oxPcRFvaSqgypfF9C6Buigbx8KRBCQtj0Wn1TLbHxaYk+5oU2GDGP2f63 SyzCS8FZVMiY8ImDDkoWNKjlvxPHUf7ejsMvH7qiZgb9QqPdYd74f0tsQ7PhGYMzHHgq FrSg5Rn0uw4uLn2AX1XOIw64AFSgG9943XWAtFnF5ZvcSE4HrQTopv/3LlmFv/L8jDuR 1pHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+99lhskzLWjVtNn+tZlGY0u/ByhM9HMDXqIoLLKtHF0=; b=ngvs4dK0LcYd9TrojfvX4k+IGEQIEDOqkQ/RIxyzyGh3wxN+OO3TWZM1OkzoZF42go g8b9uZpIF9CMpEMK2RR6bI9ygBnVb0VjgKSK0vxX5Ie3enTkTV4uubSDKX/VpCdtKgVn DXupX8tEBq/Y5J6qH/RzkS5K9jNWg97RlJ/e8QyC61zEQ+ODegq+43LxpxoRvBM1w8+6 o/rXMHirZcXe+Xa/1BHFjg+EVkJcb6SFxkSf+DEL53afK47qVy/hyA/YbJCjQtVS+N2O gnZv8yNwFFLhyBkRGuNYAAOt5MdfOI8MqSH5btT9raMeW4uoQwg7ib8w+2XGR87ttnxd 77Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0fMHZKqZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w7si41716322plp.341.2019.04.16.07.20.40; Tue, 16 Apr 2019 07:20:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0fMHZKqZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729510AbfDPOUB (ORCPT + 99 others); Tue, 16 Apr 2019 10:20:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:58812 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbfDPOUA (ORCPT ); Tue, 16 Apr 2019 10:20:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0232F223FA; Tue, 16 Apr 2019 14:19:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555424399; bh=g5E1OPmR8Gw2ZjHq1qSspGp28cWaC6FtpbE3LnYJRpg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0fMHZKqZgeTRDXPzXSsiViPFPxa5podP5HqZmgloc36TfStCzguY46HqMv/nrgtAC V6p8k6a0CJmj8KuW3NHY1ghutu4PfoJD17F2I5xJ8Ns8/s3tp7cqBRd72/mVgLiEmT sWZwSb87GQ98aOgQYRY6d7S0FRf0prOEV5nk8AQk= Date: Tue, 16 Apr 2019 15:29:55 +0200 From: Greg Kroah-Hartman To: Stephen Boyd Cc: Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Miquel Raynal , Jerome Brunet , Russell King , Jeffrey Hugo , Chen-Yu Tsai , Rob Herring Subject: Re: [PATCH v4 4/9] driver core: Let dev_of_node() accept a NULL dev Message-ID: <20190416132955.GB17483@kroah.com> References: <20190412183150.102131-1-sboyd@kernel.org> <20190412183150.102131-5-sboyd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412183150.102131-5-sboyd@kernel.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 11:31:45AM -0700, Stephen Boyd wrote: > We'd like to chain this in places where the 'dev' argument might be > NULL. Let this function take a NULL 'dev' so this can work. > > Cc: Miquel Raynal > Cc: Jerome Brunet > Cc: Russell King > Cc: Michael Turquette > Cc: Jeffrey Hugo > Cc: Chen-Yu Tsai > Cc: Greg Kroah-Hartman > Cc: Rob Herring > Signed-off-by: Stephen Boyd > --- > > Please ack/review so I can take this through clk tree. > > include/linux/device.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/device.h b/include/linux/device.h > index b425a7ee04ce..0370dd0b3ae7 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -1231,7 +1231,7 @@ static inline void device_lock_assert(struct device *dev) > > static inline struct device_node *dev_of_node(struct device *dev) > { > - if (!IS_ENABLED(CONFIG_OF)) > + if (!IS_ENABLED(CONFIG_OF) || !dev) > return NULL; > return dev->of_node; > } Acked-by: Greg Kroah-Hartman