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:	Sat, 5 Nov 2011 00:08:24 +0000
From:	Tabi Timur-B04825 <B04825@...escale.com>
To:	Zhao Chenhui-B35336 <B35336@...escale.com>
CC:	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	Li Yang-R58472 <r58472@...escale.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 6/7] fsl_pmc: Add API to enable device as wakeup event
 source

On Fri, Nov 4, 2011 at 7:39 AM, Zhao Chenhui <chenhui.zhao@...escale.com> wrote:

> +       if (!pmc_regs) {
> +               printk(KERN_WARNING "PMC is unavailable\n");

Use pr_warn() and the other pr_xxx functions.

> +       pmcdr_mask = (u32 *)of_get_property(clk_np, "fsl,pmcdr-mask", NULL);

The typecast is unnecessary here.

> +       /* clear to enable clock in low power mode */
> +       if (enable)
> +               clrbits32(&pmc_regs->pmcdr, *pmcdr_mask);
> +       else
> +               setbits32(&pmc_regs->pmcdr, *pmcdr_mask);

You need to use be32_to_cpup() when dereferencing a pointer to a
device tree property.

-- 
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ