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: <20130717114639.3a348931@endymion.delvare>
Date:	Wed, 17 Jul 2013 11:46:39 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	Wei Ni <wni@...dia.com>
Cc:	Guenter Roeck <linux@...ck-us.net>, thierry.reding@...il.com,
	lm-sensors@...sensors.org, linux-kernel@...r.kernel.org,
	linux-tegra@...r.kernel.org
Subject: Re: [PATCH v3 2/4] hwmon: (lm90) use macro defines for the status 
 bit

Hi Wei,

On Wed, 17 Jul 2013 17:29:32 +0800, Wei Ni wrote:
> On 07/17/2013 04:28 PM, Jean Delvare wrote:
> > I do maintain the lm90 driver, so the decision is up to me. Guenter did
> > a preliminary review of your patches and I am grateful for that, but I
> > do not intend to wait for his return to continue with your patches.
> > Otherwise he will have to do the same when he returns and I am gone,
> > and this may end up delaying your patches by one kernel version.
> 
> I will send out patches soon :)

You may want to wait until I'm done reviewing the whole v3 patch set. I
hope to have the time to do that today.

> >> (...)
> >> Oh, yes, this is a problem, I didn't noticed it.
> >> How about to use this:
> >> bool lm90_alarms_tripped(*client, *status);
> >> bool lm90_alarms2_tripped(*client, *status2);
> >> So we can read the status only once and pass it.
> > 
> > This is a good idea but you only need status, not status2, so it can be
> > made simpler:
> > bool lm90_is_tripped(*client, *status);
> > (handling both status and status 2 as you already do.)
> 
> Yes this is simpler, but I think in the future we may need to handle the
> status2, how to handle it ? Or we can define the status as
> bit[0~7]->status and bit[8~15]->status2 .

I hope we will never have to. We need it to work around a hardware
implementation bug, and I hope that newer chips implementing status2
will not have this bug.

That being said, yes, returning status and status2 combined in a 16-bit
value would make sense. We end up comparing with data->alert_alarms
which has exactly this format anyway (and so does data->alarms too.)

-- 
Jean Delvare
--
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