Received: by 10.192.165.148 with SMTP id m20csp4970293imm; Tue, 1 May 2018 07:04:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfORzcvyLyqv44MJ/r4goqtrKXhUiwrg2XKzpdJlDaNacZU3z+nFz4s3BkYLizK/8uHG45 X-Received: by 10.98.70.8 with SMTP id t8mr15810236pfa.185.1525183446486; Tue, 01 May 2018 07:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525183446; cv=none; d=google.com; s=arc-20160816; b=RX0Vx5SbROpjIAQ5eKRpdexnwM89Oyi4gungEc2cqt9iOSf7tdhmW6hEA4N/ALoHGw MoIjL0wVXqY28Zc7w/mA+aNwh7E2Szbx7kGBxPuPRFTrsheMx4711/ECDL+R2jo6gmgj LC/KWv1MPnJcqWxTwjzXng/bQ5RtrVs0LR3eub/5lpSW2zWh+g3h0//ZLcosb4maoBRD JpJI3UuFDcR6d4M2/CQIA3nUcsc4ELmCOWbk9d0U+ea7XYVt6XaadzQliEYxZBbTcQpV AAQYb/fiNWX2Autq10y84JHgDeFly/SCFHzOErcREHpTjkjeZHFe1BI+VpoCtzPoNfVQ uxkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=6KvBYrNRqmtwACLAPGQflxVyNNrOTTt5CeAjzDCXxKc=; b=UqqKrfKKzgizplsQvh0/UAAhoubIOcP2gkf9ZBOue/3Fl2io4f3OazoH9GO3PoKDAV 4yVvzF05RFuTB9mvh+XKilsC2+jHFVUHUG/1f6lLe4uIvKzHlJ+8q5Lla5ATJk1fhr4M BFmeOIP+WaG1MtyiO78GPLXGq0bc+vCAAHYf3NA9kgaVVIHTgc/cTuGrGcSNjiKUdF3H Izce/1kEtd+MYcf2g6SQ0x7Xtdt9RtVHYHSQU99sd1wDW9pp6qPGaaXWpaAERzwcaVWf 0/WqOe4o/Cku6x2Gq0q4lftYcv28l9Xk20px9lqkEE1ThekbIwScQH1h3ko8zpiCx30B Tx0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hsENjFcU; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25si1098652pfn.248.2018.05.01.07.03.51; Tue, 01 May 2018 07:04:06 -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=@ti.com header.s=ti-com-17Q1 header.b=hsENjFcU; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbeEAODk (ORCPT + 99 others); Tue, 1 May 2018 10:03:40 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:12060 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754798AbeEAODj (ORCPT ); Tue, 1 May 2018 10:03:39 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w41E2YEV031550; Tue, 1 May 2018 09:02:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1525183354; bh=Q+NStlRjfabAXFkqMmrh95tkmAgkEn5aIUs2YsZfmLs=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=hsENjFcUvB/8l6at/4zS9gkz1LInd3yGYUTDMmkit+bET3iKnh3yDa2KrVA8/o/RF PXJL7JKGAV33I4pTHsbkwTPd0j0mWCoQtq/j8nOyopxGcmvAChvOoykRer/W34Iiru ngD/Pi+eAx5QSjFBWzOcsyUE83+a/7TZENK1hPFk= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w41E2YCA019872; Tue, 1 May 2018 09:02:34 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 1 May 2018 09:02:33 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 1 May 2018 09:02:33 -0500 Received: from [172.24.190.172] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w41E2NVg011651; Tue, 1 May 2018 09:02:24 -0500 Subject: Re: [PATCH v9 03/27] clk: davinci: psc: allow for dev == NULL To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , References: <20180427001745.4116-1-david@lechnology.com> <20180427001745.4116-4-david@lechnology.com> From: Sekhar Nori Message-ID: <8940259b-5811-ce9f-8262-17d39ca0a46f@ti.com> Date: Tue, 1 May 2018 19:32:22 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180427001745.4116-4-david@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 27 April 2018 05:47 AM, David Lechner wrote: > +static inline void *_devm_kzalloc(struct device *dev, size_t size, gfp_t flags) > +{ > + if (dev) > + return devm_kzalloc(dev, size, flags); > + > + return kzalloc(size, flags); > +} I have the same question on the utility of this. A memory allocation error so early on is not going to result in a bootable system anyway. So, I wonder if its better to just BUG() in such cases. That will actually help faster debug than returning an error back. I know the push back on using BUG(), but clock drivers are special, and I think thats why its seems to be used quite a bit already. Thanks, Sekhar