lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89e456e7-35a6-c7e9-64bd-1b30f0f019cc@linux.intel.com>
Date:   Mon, 12 Aug 2019 08:24:57 -0500
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     alsa-devel@...a-project.org, tiwai@...e.de,
        linux-kernel@...r.kernel.org, vkoul@...nel.org, broonie@...nel.org,
        srinivas.kandagatla@...aro.org, jank@...ence.com,
        slawomir.blauciak@...el.com, Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [PATCH 1/3] soundwire: add debugfs support


>>   #Cadence Objs
>> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
>> index 49f64b2115b9..89d5f1537d9b 100644
>> --- a/drivers/soundwire/bus.c
>> +++ b/drivers/soundwire/bus.c
>> @@ -49,6 +49,8 @@ int sdw_add_bus_master(struct sdw_bus *bus)
>>   		}
>>   	}
>>   
>> +	bus->debugfs = sdw_bus_debugfs_init(bus);
>> +
> 
> It's "nicer" to just put that assignment into sdw_bus_debugfs_init().
> 
> That way you just call the function, no need to return anything.

ok, thanks for the suggestion.

> 
>>   	/*
>>   	 * Device numbers in SoundWire are 0 through 15. Enumeration device
>>   	 * number (0), Broadcast device number (15), Group numbers (12 and
>> @@ -109,6 +111,8 @@ static int sdw_delete_slave(struct device *dev, void *data)
>>   	struct sdw_slave *slave = dev_to_sdw_dev(dev);
>>   	struct sdw_bus *bus = slave->bus;
>>   
>> +	sdw_slave_debugfs_exit(slave->debugfs);
> 
> Same here, just pass in slave:
> 	sdw_slave_debugfs_exit(slave);
> and have that function remove the debugfs entry in the structure.  That
> way, if you are really paranoid about size, you could even drop the
> debugfs structure member from non-debugfs builds without any changes to
> bus.c or other non-debugfs files.

ok makes sense. will fix in v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ