Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp357527ybi; Fri, 26 Jul 2019 10:55:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0kSdHwV8QIgsJTaqj0A35gOxyyCG4KljAeOzQ5DDtrILFlcSOThAY1I317vSK4STB76Ga X-Received: by 2002:a65:6284:: with SMTP id f4mr35020309pgv.416.1564163746149; Fri, 26 Jul 2019 10:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564163746; cv=none; d=google.com; s=arc-20160816; b=T908bxh7yhLlxBYhTVDVuCqmt6NEutbD0ge7vSNx2q694yp9bgCfTDS/u+paVjgSjn ve577UNDUPVeFUspfweg9VhwQY6HdS7qxydRh0GXOqH2a7dy+26X7JRscuopgpmsFX6u EqulDIPJYOpDmFTYUGVEnd5k/XSmaGr/b5ryCdF28uXfRRBRa2c2fKpDsdHxIibps+q8 mAi4nCqfQGKeobDJ66ULauxIJY1zSUVIm/PjxocJB7Cu/k6ujJyiOHJotbkPI3K6RLff /MQx75NHtlseOqWzxIGRsBNyrBa7FEVHktgYMQbwMRh2J6MPZ6c3zu04em5RUGuwZW14 JaOw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1pYUNETyd0sGXrsGmHDDbUzAu3H/KkdCyDPT5JXpqgs=; b=wdYeNN/QmG4g9IX8+5hQLlNDTarSKmh23MIN/7/dK9TracOLWOm705sxCR2mGaEorw h+gUxqZlhy7CgfRA+KADYwIKt+mWVkJ8w/BgP3Ncw7WQGdQTubMOjsXVP/lTym2D20aU M0315h+wj8/ebuHAR/5fvvk4h5MuqwZQ5eT1aAXRmT0fDtgfU7ZFY9B3VNQNBDUPzMUb gIRJBLWkLAgBadw6ci5BX0azMJwOCfwO3VzI67/hR+d5zmmJ8Ef6qblpBcaWQnVMhYDK +FF9DdlUje7GDhR/10EylvnfWRda2FeJB/d2qSh3uvaTEfEnaXSPA8k93dNxMjVvXNLy 8wMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DrFGCFGe; 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 bg2si18116765plb.263.2019.07.26.10.55.30; Fri, 26 Jul 2019 10:55:46 -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=DrFGCFGe; 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 S1728367AbfGZOL2 (ORCPT + 99 others); Fri, 26 Jul 2019 10:11:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:45918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727397AbfGZOL2 (ORCPT ); Fri, 26 Jul 2019 10:11:28 -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 93652218D3; Fri, 26 Jul 2019 14:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564150287; bh=hF4P0NSUt1UMtwss/k6Y5M453YUX4ips7z7TFzgxoWM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DrFGCFGe3nGdvNVEPC5e3DkB9dB6UtwpR8gwlmRgYlQ3ZWfmuMCk9mxghyq8A3IuD I+lFzw7xoDMMoRuMIlLkEoJKHdOqXl9EWqnvXCI7PBH46iBa1g8M8eKMio/QnVBXK+ fz2UijrKpVM0sQUlhZmxdnZUOSIGSbQjVFO2SK/Q= Date: Fri, 26 Jul 2019 16:11:24 +0200 From: Greg KH To: Pierre-Louis Bossart Cc: Cezary Rojewski , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale Subject: Re: [alsa-devel] [RFC PATCH 04/40] soundwire: intel: add debugfs register dump Message-ID: <20190726141124.GA4253@kroah.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-5-pierre-louis.bossart@linux.intel.com> <9d5bc940-eadd-4f82-0bac-6a731369436d@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 26, 2019 at 09:00:28AM -0500, Pierre-Louis Bossart wrote: > > > On 7/26/19 4:35 AM, Cezary Rojewski wrote: > > On 2019-07-26 01:39, Pierre-Louis Bossart wrote: > > > +static void intel_debugfs_init(struct sdw_intel *sdw) > > > +{ > > > +??? struct dentry *root = sdw->cdns.bus.debugfs; > > > + > > > +??? if (!root) > > > +??????? return; > > > + > > > +??? sdw->fs = debugfs_create_dir("intel-sdw", root); > > > +??? if (IS_ERR_OR_NULL(sdw->fs)) { > > > +??????? dev_err(sdw->cdns.dev, "debugfs root creation failed\n"); > > > +??????? sdw->fs = NULL; > > > +??????? return; > > > +??? } > > > + > > > +??? debugfs_create_file("intel-registers", 0400, sdw->fs, sdw, > > > +??????????????? &intel_reg_fops); > > > + > > > +??? sdw_cdns_debugfs_init(&sdw->cdns, sdw->fs); > > > +} > > > > I believe there should be dummy equivalent of _init and _exit if debugfs > > is not enabled (if these are defined already and I've missed it, please > > ignore). > > I think the direction is just to keep going if there is an error or debufs > is not enabled. You should not care either way :)