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]
Message-Id: <20060927154208.149069e3.akpm@osdl.org>
Date:	Wed, 27 Sep 2006 15:42:08 -0700
From:	Andrew Morton <akpm@...l.org>
To:	"Miguel Ojeda" <maxextreme@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.18 real-V5] drivers: add lcd display support

On Wed, 27 Sep 2006 20:58:24 +0000
"Miguel Ojeda" <maxextreme@...il.com> wrote:

> On 9/26/06, Andrew Morton <akpm@...l.org> wrote:
> > It's also probably-incorrect on big-endian CPUs.
> > Perhaps you should not
> > use bitops at all for this driver, use open-coded |
> > and &/~ instead?
> 
> Uhm, someone told me that they shouldn't be used because the kernel
> has generic functions for that.

You can't believe everything you read on the internet ;)

set_bit() and friends are a) atomic wrt other CPUs on SMP and b) only to be
performed on unsigned longs.

> I researched the kernel sources, and looking at bitops.h I found
> setbit(), so I tried to use it in the driver, althought I prefer
> standard |= and &=.

Those are the appropriate operations to use in this driver.

-
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