From: Tilman Schmidt <tilman@imap.cc>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de,
linux-usb-devel@lists.sourceforge.net, hjlipp@web.de,
kkeil@suse.de, i4ldeveloper@listserv.isdn4linux.de
Subject: Re: [PATCH 3/4] bas_gigaset: suspend support (v2)
Date: Fri, 16 Nov 2007 00:51:45 +0100 [thread overview]
Message-ID: <473CDB91.8010808@imap.cc> (raw)
In-Reply-To: <20071115145022.99f9abbc.akpm@linux-foundation.org>
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Am 15.11.2007 23:50 schrieb Andrew Morton:
>> ...
>>
>> + if (atomic_read(&cs->hw.bas->basstate) & BS_SUSPEND) {
>
> that's pretty peculiar. We'd only expect to see atomics being used in
> conjunction with atomic_add/sub/inc/etc. Here the driver is using an
> atomic_t as a state variable. And here's the magic bit:
>
> spin_lock_irqsave(&ucs->lock, flags);
> state = atomic_read(&ucs->basstate);
> atomic_set(&ucs->basstate, (state & ~clear) | set);
> spin_unlock_irqrestore(&ucs->lock, flags);
>
> I'm suspecting that a plain old `int' would be more appropriate here.
You're right. That's a prehistoric leftover. That variable was
originally accessed using atomic_set_mask() and atomic_clear_mask()
which are unfortunately x86 platform specific.
I'll prepare a cleanup patch.
Thanks,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
prev parent reply other threads:[~2007-11-15 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071112-patch0@xenon.ts.pxnet.com>
[not found] ` <20071112-patch3@xenon.ts.pxnet.com>
2007-11-15 22:50 ` [PATCH 3/4] bas_gigaset: suspend support (v2) Andrew Morton
2007-11-15 23:51 ` Tilman Schmidt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473CDB91.8010808@imap.cc \
--to=tilman@imap.cc \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=hjlipp@web.de \
--cc=i4ldeveloper@listserv.isdn4linux.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox