[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=Ve5qs_GV52Qxr2MD8O8uO6eHTdwYUXcv6TddZnqzzjGQ@mail.gmail.com>
Date: Tue, 30 May 2017 10:18:46 -0700
From: Doug Anderson <dianders@...omium.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Vinod Koul <vinod.koul@...el.com>,
Matthias Kaehlcke <mka@...omium.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Colin King <colin.king@...onical.com>,
sebastien.guiriec@...el.com,
坂本貴史 <o-takashi@...amocchi.jp>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
naveen.m@...el.com,
ALSA Development Mailing List <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved
regs are never used
Hi,
On Tue, May 30, 2017 at 10:06 AM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Tue, May 30, 2017 at 7:51 PM, Douglas Anderson <dianders@...omium.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@...il.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
Powered by blists - more mailing lists