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]
Message-ID: <alpine.LNX.2.00.1312021453490.24931@pobox.suse.cz>
Date:	Mon, 2 Dec 2013 14:54:09 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Daniel Tang <dt.tangr@...il.com>
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: Re: [PATCH 1/2] clocksource: zevio-timer: fix incorrect function
 definition so the correct function pointer is passed to
 CLOCKSOURCE_OF_DECLARE

On Mon, 25 Nov 2013, dt.tangr@...il.com wrote:

> From: Daniel Tang <dt.tangr@...il.com>
> 

This really needs a proper changelog.

> 
> Signed-off-by: Daniel Tang <dt.tangr@...il.com>
> ---
>  drivers/clocksource/zevio-timer.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/clocksource/zevio-timer.c b/drivers/clocksource/zevio-timer.c
> index ca81809..a1bd107 100644
> --- a/drivers/clocksource/zevio-timer.c
> +++ b/drivers/clocksource/zevio-timer.c
> @@ -122,28 +122,27 @@ static irqreturn_t zevio_timer_interrupt(int irq, void *dev_id)
>  	return IRQ_HANDLED;
>  }
> 
> -static int __init zevio_timer_add(struct device_node *node)
> +static void __init zevio_timer_add(struct device_node *node)
>  {
>  	struct zevio_timer *timer;
>  	struct resource res;
> -	int irqnr, ret;
> +	int irqnr;
> 
>  	timer = kzalloc(sizeof(*timer), GFP_KERNEL);
>  	if (!timer)
> -		return -ENOMEM;
> +		return;
> 
>  	timer->base = of_iomap(node, 0);
> -	if (!timer->base) {
> -		ret = -EINVAL;
> +	if (!timer->base)
>  		goto error_free;
> -	}
> +
>  	timer->timer1 = timer->base + IO_TIMER1;
>  	timer->timer2 = timer->base + IO_TIMER2;
> 
>  	timer->clk = of_clk_get(node, 0);
>  	if (IS_ERR(timer->clk)) {
> -		ret = PTR_ERR(timer->clk);
> -		pr_err("Timer clock not found! (error %d)\n", ret);
> +		pr_err("Timer clock not found! (error %d)\n",
> +				(int)PTR_ERR(timer->clk));
>  		goto error_unmap;
>  	}
> 
> @@ -204,12 +203,12 @@ static int __init zevio_timer_add(struct device_node *node)
> 
>  	pr_info("Added %s as clocksource\n", timer->clocksource_name);
> 
> -	return 0;
> +	return;
>  error_unmap:
>  	iounmap(timer->base);
>  error_free:
>  	kfree(timer);
> -	return ret;
> +	return;
>  }
> 
>  CLOCKSOURCE_OF_DECLARE(zevio_timer, "lsi,zevio-timer", zevio_timer_add);
> --
> 1.8.1.3
> 

-- 
Jiri Kosina
SUSE Labs
--
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