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]
Date:	Wed, 25 Nov 2015 14:39:44 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	linux-arm-kernel@...ts.infradead.org
Cc:	Geliang Tang <geliangtang@....com>, Sekhar Nori <nsekhar@...com>,
	Kevin Hilman <khilman@...prootsystems.com>,
	Russell King <linux@....linux.org.uk>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/7] ARM: davinci: fix a problematic usage of WARN()

On Wednesday 25 November 2015 21:12:19 Geliang Tang wrote:
> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
> @@ -385,7 +385,7 @@ static __init void dm355_evm_init(void)
>  
>         aemif = clk_get(&dm355evm_dm9000.dev, "aemif");
>         if (IS_ERR(aemif))
> -               WARN("%s: unable to get AEMIF clock\n", __func__);
> +               WARN(1, "%s: unable to get AEMIF clock\n", __func__);
>         else
>                 clk_prepare_enable(aemif);
>  
> 

How about writing this as 

	if (!WARN(IS_ERR(aemif)), "unable to get AEMIF clock\n"))
		clk_prepare_enable(aemif);

Note that WARN() already contains file and line, so you don't really
need the __func__ here either.

	Arnd
--
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