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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jun 2012 23:35:15 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Ralf Baechle <ralf@...ux-mips.org>
CC:	Kelvin Cheung <keguang.zhang@...il.com>, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org, wuzhangjin@...il.com,
	zhzhl555@...il.com
Subject: Re: [PATCH V7 2/4] MIPS: Add board support for Loongson1B

Hello.

On 06/20/2012 11:25 PM, Ralf Baechle wrote:

>> +#include <linux/clk.h>

>> +static LIST_HEAD(clocks);
>> +static DEFINE_MUTEX(clocks_mutex);
>> +
>> +struct clk *clk_get(struct device *dev, const char *name)
>> +{
>> +	struct clk *c;
>> +	struct clk *ret = NULL;
>> +
>> +	mutex_lock(&clocks_mutex);
>> +	list_for_each_entry(c, &clocks, node) {
>> +		if (!strcmp(c->name, name)) {
>> +			ret = c;
>> +			break;
>> +		}
>> +	}
>> +	mutex_unlock(&clocks_mutex);
>> +
>> +	return ret;
>> +}
>> +EXPORT_SYMBOL(clk_get);

> This redefines a function that already is declared in <linux/clk.h> and
> defined in drivers/clk/clkdev.c.  Why?

    Because he doesn't support clkdev? clkdev support is optional.

>> +int clk_register(struct clk *clk)
>> +{
>> +	mutex_lock(&clocks_mutex);
>> +	list_add(&clk->node, &clocks);
>> +	if (clk->ops->init)
>> +		clk->ops->init(clk);
>> +	mutex_unlock(&clocks_mutex);
>> +
>> +	return 0;
>> +}
>> +EXPORT_SYMBOL(clk_register);

> Same here.

>    Ralf

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ