Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp386909ybi; Fri, 26 Jul 2019 11:24:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTni6UW9s1JAKbWFNRjWtOJdoxfgIerrBShyZodlWUvqKE1VrplM6wD1XDLbm8HKYZHY6C X-Received: by 2002:a17:90a:9488:: with SMTP id s8mr102015023pjo.2.1564165484872; Fri, 26 Jul 2019 11:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564165484; cv=none; d=google.com; s=arc-20160816; b=PDD+CMKADtArxKcLShgMJOY96HVw71SDFy2oF5OkHJ9AC7kR9moXGp1RG1c8gQjYGl XEyxeeHHrJyHYPpwIQGSESi2j3uu2JnfHWR9Hh//rOn/QPsvmAjUw7vxB5B+gcriR4QB Qc4YlV7LK/PWn7BJhb6B6WyFLqI10+61OR9yryKBF73ecjCVeyjlLOjDqcrgcp605fWk aXOwiO04iC0D6g3X8WL4Lh9U5BA+BTASFHd6kjz3yVqe8wTsYBY/4G3Ndy/90WBFQ9Ik ZfVep3mKyr44wGI2SuRZbqxs6TwIwzYCu8breGBWwwCkwqZJscHW0BaZHnBLbMOkYYJp 9Lsg== 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; bh=lnTZhCp7auM/FTXT3KBcHx9xd9+qAvHnu7HXrLCODNc=; b=jAmj4rioDhkXpvjTw08754o9c3Ku0N2icl53xWvQMWHzsIkXyCsFAyrtepprElMJM1 qR/pOQLLnA9eNS1Z3sjVrTfrptfqwlYAdNBsXTb5dP3l1lCpYQxY1uqYZGF7AGnVODr2 EQBCWoeEfTuNFCo04TEc1Kvkzgoj6BvSzYP6J7ySQZPymus4ZfF6WpgrZLgBt/h837rY nUXLWLgxTd/42YWGV8pbx4qrSLTao4Vo8Kepb+Rs5/5AkRFFr6p7j61tEb5PHZ0i+lt2 zaFUya26JIbOA4aU5ecwoWth4R5kjtlx9YNbTy6p5Vph/J/L9eb/i6D2yP5S7o2v8FGH Ff/w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si20973077pgm.413.2019.07.26.11.24.30; Fri, 26 Jul 2019 11:24:44 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387659AbfGZPB4 (ORCPT + 99 others); Fri, 26 Jul 2019 11:01:56 -0400 Received: from mga17.intel.com ([192.55.52.151]:30486 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387569AbfGZPB4 (ORCPT ); Fri, 26 Jul 2019 11:01:56 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 08:01:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,311,1559545200"; d="scan'208";a="322059365" Received: from msmall-mobl.amr.corp.intel.com (HELO [10.251.154.62]) ([10.251.154.62]) by orsmga004.jf.intel.com with ESMTP; 26 Jul 2019 08:01:54 -0700 Subject: Re: [alsa-devel] [RFC PATCH 37/40] soundwire: cadence_master: add hw_reset capability in debugfs To: Greg KH Cc: alsa-devel@alsa-project.org, tiwai@suse.de, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-38-pierre-louis.bossart@linux.intel.com> <20190726140749.GC8767@kroah.com> From: Pierre-Louis Bossart Message-ID: <81637203-4a8d-5d6b-26c8-524b8868b015@linux.intel.com> Date: Fri, 26 Jul 2019 10:01:54 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190726140749.GC8767@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for the review Greg. >> +static int cdns_hw_reset(void *data, u64 value) >> +{ >> + struct sdw_cdns *cdns = data; >> + int ret; >> + >> + if (value != 1) >> + return 0; >> + >> + dev_info(cdns->dev, "starting link hw_reset\n"); >> + >> + ret = sdw_cdns_exit_reset(cdns); >> + >> + dev_info(cdns->dev, "link hw_reset done\n"); > > Do not be noisy for when things always go right. This looks like > debuggging code, please remove. yes, missed this in the cleanup, will remove. >> +DEFINE_DEBUGFS_ATTRIBUTE(cdns_hw_reset_fops, NULL, cdns_hw_reset, "%llu\n"); >> + >> /** >> * sdw_cdns_debugfs_init() - Cadence debugfs init >> * @cdns: Cadence instance >> @@ -339,6 +358,9 @@ static const struct file_operations cdns_reg_fops = { >> void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root) >> { >> debugfs_create_file("cdns-registers", 0400, root, cdns, &cdns_reg_fops); >> + >> + debugfs_create_file_unsafe("cdns-hw-reset", 0200, root, cdns, >> + &cdns_hw_reset_fops); > > Why unsafe? Dunno. I followed the documentation and my take-away, along with a number of examples, was to use _unsafe. I really have no idea if this is correct or not, I can remove this qualifier if that's not needed.