From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494AbdJTQBl (ORCPT ); Fri, 20 Oct 2017 12:01:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:6593 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751656AbdJTQBj (ORCPT ); Fri, 20 Oct 2017 12:01:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,405,1503385200"; d="scan'208";a="165047743" Date: Fri, 20 Oct 2017 21:35:56 +0530 From: Vinod Koul 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 Subject: Re: [PATCH 03/14] soundwire: Add Master registration 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 Content-Disposition: inline In-Reply-To: <20171020104726.GD3210@kroah.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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