From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751009AbdEaElY (ORCPT ); Wed, 31 May 2017 00:41:24 -0400 Received: from mga11.intel.com ([192.55.52.93]:41578 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911AbdEaElX (ORCPT ); Wed, 31 May 2017 00:41:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,421,1491289200"; d="scan'208";a="974942892" Date: Wed, 31 May 2017 10:13:43 +0530 From: Vinod Koul To: Andy Shevchenko Cc: Douglas Anderson , Mark Brown , Matthias Kaehlcke , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Colin King , sebastien.guiriec@intel.com, =?utf-8?B?5Z2C5pys6LK05Y+y?= , Pierre-Louis Bossart , naveen.m@intel.com, ALSA Development Mailing List , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v2] ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used Message-ID: <20170531044342.GQ15061@localhost> References: <20170530165130.15011-1-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 30, 2017 at 08:06:38PM +0300, Andy Shevchenko wrote: > On Tue, May 30, 2017 at 7:51 PM, Douglas Anderson 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 Acked-by: Vinod Koul > P.S. Perhaps there are more leftovers or dead code? Hope not :) This was due to restore not required eventually. Somehow save was left pending. -- ~Vinod