From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
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 <sanyog.r.kale@intel.com>
Subject: Re: [alsa-devel] [PATCH 1/3] soundwire: add debugfs support
Date: Mon, 12 Aug 2019 08:24:57 -0500 [thread overview]
Message-ID: <89e456e7-35a6-c7e9-64bd-1b30f0f019cc@linux.intel.com> (raw)
In-Reply-To: <20190810070139.GA6896@kroah.com>
>> #Cadence Objs
>> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
>> index 49f64b2115b9..89d5f1537d9b 100644
>> --- a/drivers/soundwire/bus.c
>> +++ b/drivers/soundwire/bus.c
>> @@ -49,6 +49,8 @@ int sdw_add_bus_master(struct sdw_bus *bus)
>> }
>> }
>>
>> + bus->debugfs = sdw_bus_debugfs_init(bus);
>> +
>
> It's "nicer" to just put that assignment into sdw_bus_debugfs_init().
>
> That way you just call the function, no need to return anything.
ok, thanks for the suggestion.
>
>> /*
>> * Device numbers in SoundWire are 0 through 15. Enumeration device
>> * number (0), Broadcast device number (15), Group numbers (12 and
>> @@ -109,6 +111,8 @@ static int sdw_delete_slave(struct device *dev, void *data)
>> struct sdw_slave *slave = dev_to_sdw_dev(dev);
>> struct sdw_bus *bus = slave->bus;
>>
>> + sdw_slave_debugfs_exit(slave->debugfs);
>
> Same here, just pass in slave:
> sdw_slave_debugfs_exit(slave);
> and have that function remove the debugfs entry in the structure. That
> way, if you are really paranoid about size, you could even drop the
> debugfs structure member from non-debugfs builds without any changes to
> bus.c or other non-debugfs files.
ok makes sense. will fix in v2.
next prev parent reply other threads:[~2019-08-12 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 22:43 [PATCH 0/3] soundwire: debugfs support for 5.4 Pierre-Louis Bossart
2019-08-09 22:43 ` [PATCH 1/3] soundwire: add debugfs support Pierre-Louis Bossart
2019-08-10 7:01 ` Greg KH
2019-08-12 13:24 ` Pierre-Louis Bossart [this message]
2019-08-09 22:43 ` [PATCH 2/3] soundwire: cadence_master: add debugfs register dump Pierre-Louis Bossart
2019-08-10 7:03 ` Greg KH
2019-08-12 13:32 ` [alsa-devel] " Pierre-Louis Bossart
2019-08-09 22:43 ` [PATCH 3/3] soundwire: intel: " Pierre-Louis Bossart
2019-08-10 7:03 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89e456e7-35a6-c7e9-64bd-1b30f0f019cc@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jank@cadence.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sanyog.r.kale@intel.com \
--cc=slawomir.blauciak@intel.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®