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] [day] [month] [year] [list]
Message-Id: <20091130142320.01f0c212.akpm@linux-foundation.org>
Date:	Mon, 30 Nov 2009 14:23:20 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Wan ZongShun <mcuos.com@...il.com>
Cc:	Alessandro Zummo <a.zummo@...ertech.it>,
	linux-rtc <rtc-linux@...glegroups.com>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V4]ARM: NUC900: add RTC driver support for nuc910 and
 nuc920

On Sun, 29 Nov 2009 20:37:23 +0800
Wan ZongShun <mcuos.com@...il.com> wrote:

> Dear Alessandro,
> 
> I fixed this patch and submitted it again.
> 
> thanks!
> 
> signed-off-by: Wan ZongShun <mcuos.com@...il.com>

That's not a terribly useful changelog.

>
> ...
>
> +static void check_rtc_power(struct nuc900_rtc *nuc900_rtc)
> +{
> +	unsigned int i;
> +	__raw_writel(INIRRESET, nuc900_rtc->rtc_reg + REG_RTC_INIR);
> +
> +	mdelay(10);
> +
> +	__raw_writel(AERPOWERON, nuc900_rtc->rtc_reg + REG_RTC_AER);
> +
> +	for (i = 0; i < 1000000; i++) {
> +		if (__raw_readl(nuc900_rtc->rtc_reg + REG_RTC_AER) & AERRWENB)
> +			break;
> +	}
> +}

I don't like that function much.

- It's not obvious what it actually does (I don't know), so it should
  have some comment explaining this.

- It's called "check_rtc_power", but it doesn't actually "check"
  anything.

- If that enormously expensive loop times out, the function will not
  inform the caller of this, so it will be called again and again and
  will continue to be enormously expensive.

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