From: Doug Anderson <dianders@chromium.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>,
"Vinod Koul" <vinod.koul@intel.com>,
"Matthias Kaehlcke" <mka@chromium.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Colin King" <colin.king@canonical.com>,
sebastien.guiriec@intel.com, 坂本貴史 <o-takashi@sakamocchi.jp>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
naveen.m@intel.com,
"ALSA Development Mailing List" <alsa-devel@alsa-project.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used
Date: Tue, 30 May 2017 10:18:46 -0700 [thread overview]
Message-ID: <CAD=FV=Ve5qs_GV52Qxr2MD8O8uO6eHTdwYUXcv6TddZnqzzjGQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Ve2nRf5SdFUTcAPwpYSKWvG4fyHKMJUzoVcg73NQp0xYQ@mail.gmail.com>
Hi,
On Tue, May 30, 2017 at 10:06 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, May 30, 2017 at 7:51 PM, Douglas Anderson <dianders@chromium.org> wrote:
>> In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function
>> sst_restore_shim64()"), we deleted the sst_restore_shim64() since it
>> was never used. ...but a quick look at the code shows that we should
>> also be able to remove the sst_save_shim64() function and the
>> structure members we were storing data in.
>>
>> Once we delete sst_save_shim64() there are no longer any users of the
>> 'sst_shim_regs64' structure. That means we can delete it completely
>> and also avoid allocating memory for it. This saves a whopping 136
>> bytes of devm allocated memory. We also get the nice benefit of
>> avoiding an error path in the init code.
>>
>> Note that the saving code that we're removing (and the comments
>> talking about how important it is to do the save) has been around
>> since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module").
>
> I like it!
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> P.S. Perhaps there are more leftovers or dead code?
Thanks!
It's very possible that there is more dead code lingering, but since I
can't do much more than compile test this it probably makes sense for
someone more familiar with the driver to keep digging?
-Doug
WARNING: multiple messages have this Message-ID (diff)
From: Doug Anderson <dianders@chromium.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"ALSA Development Mailing List" <alsa-devel@alsa-project.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Vinod Koul" <vinod.koul@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Takashi Iwai" <tiwai@suse.com>,
"Mark Brown" <broonie@kernel.org>,
naveen.m@intel.com, "Colin King" <colin.king@canonical.com>,
坂本貴史 <o-takashi@sakamocchi.jp>,
sebastien.guiriec@intel.com,
"Matthias Kaehlcke" <mka@chromium.org>
Subject: Re: [RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used
Date: Tue, 30 May 2017 10:18:46 -0700 [thread overview]
Message-ID: <CAD=FV=Ve5qs_GV52Qxr2MD8O8uO6eHTdwYUXcv6TddZnqzzjGQ@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Ve2nRf5SdFUTcAPwpYSKWvG4fyHKMJUzoVcg73NQp0xYQ@mail.gmail.com>
Hi,
On Tue, May 30, 2017 at 10:06 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, May 30, 2017 at 7:51 PM, Douglas Anderson <dianders@chromium.org> wrote:
>> In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function
>> sst_restore_shim64()"), we deleted the sst_restore_shim64() since it
>> was never used. ...but a quick look at the code shows that we should
>> also be able to remove the sst_save_shim64() function and the
>> structure members we were storing data in.
>>
>> Once we delete sst_save_shim64() there are no longer any users of the
>> 'sst_shim_regs64' structure. That means we can delete it completely
>> and also avoid allocating memory for it. This saves a whopping 136
>> bytes of devm allocated memory. We also get the nice benefit of
>> avoiding an error path in the init code.
>>
>> Note that the saving code that we're removing (and the comments
>> talking about how important it is to do the save) has been around
>> since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module").
>
> I like it!
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> P.S. Perhaps there are more leftovers or dead code?
Thanks!
It's very possible that there is more dead code lingering, but since I
can't do much more than compile test this it probably makes sense for
someone more familiar with the driver to keep digging?
-Doug
next prev parent reply other threads:[~2017-05-30 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 16:51 [RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used Douglas Anderson
2017-05-30 17:06 ` Andy Shevchenko
2017-05-30 17:06 ` Andy Shevchenko
2017-05-30 17:18 ` Doug Anderson [this message]
2017-05-30 17:18 ` Doug Anderson
2017-05-31 4:43 ` Vinod Koul
2017-05-31 4:43 ` Vinod Koul
2017-06-06 19:05 ` Applied "ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used" to the asoc tree Mark Brown
2017-06-06 19:05 ` Mark Brown
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='CAD=FV=Ve5qs_GV52Qxr2MD8O8uO6eHTdwYUXcv6TddZnqzzjGQ@mail.gmail.com' \
--to=dianders@chromium.org \
--cc=alsa-devel@alsa-project.org \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=colin.king@canonical.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=naveen.m@intel.com \
--cc=o-takashi@sakamocchi.jp \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sebastien.guiriec@intel.com \
--cc=tiwai@suse.com \
--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.