From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH 03/14] soundwire: Add Master registration Date: Fri, 20 Oct 2017 21:35:56 +0530 Message-ID: <20171020160556.GU30097@localhost> References: <1508382211-3154-1-git-send-email-vinod.koul@intel.com> <1508382211-3154-4-git-send-email-vinod.koul@intel.com> <20171020104726.GD3210@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20171020104726.GD3210@kroah.com> Sender: linux-kernel-owner@vger.kernel.org To: Greg Kroah-Hartman Cc: LKML , ALSA , Mark , Takashi , Pierre , Sanyog Kale , Shreyas NC , patches.audio@intel.com, alan@linux.intel.com, Charles Keepax , Sagar Dharia , srinivas.kandagatla@linaro.org, plai@codeaurora.org, Sudheer Papothi List-Id: alsa-devel@alsa-project.org On Fri, Oct 20, 2017 at 12:47:26PM +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 19, 2017 at 08:33:19AM +0530, Vinod Koul wrote: > > +void sdw_extract_slave_id(struct sdw_bus *bus, > > + unsigned long long addr, struct sdw_slave_id *id) > > +{ > > + dev_dbg(bus->dev, "SDW Slave Addr: %llx", addr); > > + > > + /* > > + * Spec definition > > + * Register Bit Contents > > + * DevId_0 [7:4] 47:44 sdw_version > > + * DevId_0 [3:0] 43:40 unique_id > > + * DevId_1 39:32 mfg_id [15:8] > > + * DevId_2 31:24 mfg_id [7:0] > > + * DevId_3 23:16 part_id [15:8] > > + * DevId_4 15:08 part_id [7:0] > > + * DevId_5 07:00 class_id > > + */ > > + id->sdw_version = (addr >> 44) & GENMASK(3, 0); > > + id->unique_id = (addr >> 40) & GENMASK(3, 0); > > + id->mfg_id = (addr >> 24) & GENMASK(15, 0); > > + id->part_id = (addr >> 8) & GENMASK(15, 0); > > + id->class_id = addr & GENMASK(7, 0); > > + > > + dev_info(bus->dev, > > + "SDW Slave class_id %x, part_id %x, mfg_id %x, unique_id %x, version %x", > > + id->class_id, id->part_id, id->mfg_id, > > + id->unique_id, id->sdw_version); > > + > > Why are you so noisy? Shouldn't this be dev_dbg()? Sure, Takashi had same comment so this is fixed. > > +static void sdw_slave_release(struct device *dev) > > +{ > > + struct sdw_slave *slave = dev_to_sdw_dev(dev); > > + > > + kfree(slave); > > +} > > Ah, finally a release function, nice. But that's all you need to do for > it? The only pending thing is to release the memory. The bus reference and related cleanup is done when device is unregistered. -- ~Vinod