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:	Thu, 12 Jun 2014 14:17:02 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Lan Tianyu <tianyu.lan@...el.com>
cc:	rjw@...ysocki.net, lenb@...nel.org, naszar@...ru,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] ACPI/Battery: Retry to get Battery information if failed
 during probing

On Thu, 12 Jun 2014, Lan Tianyu wrote:

> The retry time is set by randomly and not accurate because don't know
> when EC will work normally. Set the retry time to 5 just in order to
> make sure battery driver probing sucessfully every time,
> 

Ok, I was hoping to avoid the excessive wait if it will never actually 
succeed but I assume there's some evidence that it can succeed after 40ms, 
60ms, etc.  Please consider the following instead:

	for (i = 0; i < 5; i++) {
		/* Comment on why we need a delay in between retries */
		if (i)
			msleep(20);
		result = acpi_battery_update(battery, false);
		if (!result)
			break;
	}
--
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