From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: ALSA <alsa-devel@alsa-project.org>,
Vinod Koul <vinod.koul@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
patches.audio@intel.com, liam.r.girdwood@linux.intel.com,
tiwai@suse.de, broonie@kernel.org,
Shreyas NC <shreyas.nc@intel.com>
Subject: Re: [PATCH 08/13] ASoC: Add SoundWire stream programming interface
Date: Mon, 2 Apr 2018 15:26:35 +0900 [thread overview]
Message-ID: <f8f97f3a-3447-5d6d-eeb6-9140ce299e06@sakamocchi.jp> (raw)
In-Reply-To: <20180330060325.GA9729@kroah.com>
Hi Greg,
I'm sorry for delay but I had a short trip.
On Mar 30 2018 15:03, Greg KH wrote:
> On Fri, Mar 30, 2018 at 12:05:00PM +0900, Takashi Sakamoto wrote:
>> Hi,
>>
>> On Mar 28 2018 18:38, Vinod Koul wrote:
>>> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
>>> index c0edac80df34..690e56a35237 100644
>>> --- a/sound/soc/soc-core.c
>>> +++ b/sound/soc/soc-core.c
>>> @@ -2882,6 +2882,26 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
>>> EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
>>> /**
>>> + * snd_soc_dai_set_sdw_stream() - Configures a DAI for SDW stream operation
>>> + * @dai: DAI
>>> + * @stream: STREAM
>>> + * @direction: Stream direction(Playback/Capture)
>>> + * SoundWire subsystem doesn't have a notion of direction and we reuse
>>> + * the ASoC stream direction to configure sink/source ports.
>>> + *
>>> + * Returns 0 on success, a negative error code otherwise.
>>> + */
>>> +int snd_soc_dai_set_sdw_stream(struct snd_soc_dai *dai,
>>> + void *stream, int direction)
>>> +{
>>> + if (dai->driver->ops->set_sdw_stream)
>>> + return dai->driver->ops->set_sdw_stream(dai, stream, direction);
>>> + else
>>> + return -ENOTSUPP;
>>> +}
>>> +EXPORT_SYMBOL_GPL(snd_soc_dai_set_sdw_stream);
>>
>> It's better for this kind of code to be incline function in any header. In
>> general, new symbols increase maintenance cost of binary of kernel-related
>> stuffs. It's preferable to avoid the addition if possible, IMO.
>
> I don't understand, functionally it's the same, there should not be any
> increased maintenance either way. Please explain how this makes things
> "harder"?
Hm, if so it might be my misunderstanding to reasons for typical usage
of inline functions in kernel source, sorry.
In my understanding, exported symbols are put into some sections of ELF
binary. Addition of new symbols increases size of the section.
Additionally, after linking vmlinux, kbuild scans built-in symbols and
make a file with entries of them. The addition increases time of this
step. Furthermore, at the end of building kernel, kmod is called to
generate some map files for exported symbols in loadable module. In a
view of distributors, these files are maintained by binary packages of
any type carefully because some incompatibilities can be delivered such
as version mismatch.
For these reasons, I think thing goes harder when people carelessly add
new symbols for functions with a few codes; e.g. accessing to a member
of structure, then simply check an return it. Actually I can see some
examples in upstreamed headers.
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2018-04-02 6:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 9:38 [PATCH 00/13] soundwire: Add stream support Vinod Koul
2018-03-28 9:38 ` [PATCH 01/13] soundwire: Add more documentation Vinod Koul
2018-03-30 1:47 ` Pierre-Louis Bossart
2018-03-30 6:38 ` Vinod Koul
2018-03-28 9:38 ` [PATCH 02/13] soundwire: Add support for SoundWire stream management Vinod Koul
2018-03-30 1:57 ` Pierre-Louis Bossart
2018-03-30 6:42 ` Vinod Koul
2018-03-30 6:44 ` Vinod Koul
2018-03-28 9:38 ` [PATCH 03/13] soundwire: Add support for port management Vinod Koul
2018-03-28 9:38 ` [PATCH 04/13] soundwire: Add Master and Slave port programming Vinod Koul
2018-03-28 9:38 ` [PATCH 05/13] soundwire: Add helpers for ports operations Vinod Koul
2018-03-28 9:38 ` [PATCH 06/13] soundwire: Add bank switch routine Vinod Koul
2018-03-28 9:38 ` [PATCH 07/13] soundwire: Add stream configuration APIs Vinod Koul
2018-03-28 9:38 ` [PATCH 08/13] ASoC: Add SoundWire stream programming interface Vinod Koul
2018-03-30 3:05 ` Takashi Sakamoto
2018-03-30 6:03 ` Greg KH
2018-04-02 6:26 ` Takashi Sakamoto [this message]
2018-04-03 12:03 ` Takashi Iwai
2018-04-05 5:03 ` Takashi Sakamoto
2018-04-05 6:38 ` Vinod Koul
2018-03-28 9:38 ` [PATCH 09/13] soundwire: Remove cdns_master_ops Vinod Koul
2018-03-28 9:38 ` [PATCH 10/13] soundwire: cdns: Add port routines Vinod Koul
2018-03-28 9:38 ` [PATCH 11/13] soundwire: cdns: Add stream routines Vinod Koul
2018-03-28 9:38 ` [PATCH 12/13] soundwire: intel: Add stream initialization Vinod Koul
2018-03-28 9:38 ` [PATCH 13/13] soundwire: intel: Add audio DAI ops Vinod Koul
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=f8f97f3a-3447-5d6d-eeb6-9140ce299e06@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=shreyas.nc@intel.com \
--cc=tiwai@suse.de \
--cc=vinod.koul@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.