All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jody McIntyre <scjody@modernduck.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, willy@debian.org, nathans@sgi.com
Subject: Re: [PATCH, RFC 4/4] Use sem_getcount in ieee1394
Date: Wed, 16 Mar 2005 14:31:00 -0500	[thread overview]
Message-ID: <20050316193100.GC1111@conscoop.ottawa.on.ca> (raw)
In-Reply-To: <20050316192709.GZ1111@conscoop.ottawa.on.ca>

Convert 1394's node manager to use sem_getcount instead of nasty hack.

Tested on parisc (where it eliminates a warning), ia64, i386.

Signed-off-by: Jody McIntyre <scjody@modernduck.com>

Index: 1394-dev/drivers/ieee1394/nodemgr.c
===================================================================
--- 1394-dev.orig/drivers/ieee1394/nodemgr.c	2005-03-15 18:23:35.000000000 -0500
+++ 1394-dev/drivers/ieee1394/nodemgr.c	2005-03-15 18:23:35.000000000 -0500
@@ -284,7 +284,7 @@ static DEVICE_ATTR(bus_options,S_IRUGO,f
 static ssize_t fw_show_ne_tlabels_free(struct device *dev, char *buf)
 {
 	struct node_entry *ne = container_of(dev, struct node_entry, device);
-	return sprintf(buf, "%d\n", atomic_read(&ne->tpool->count.count) + 1);
+	return sprintf(buf, "%d\n", sem_getcount(&ne->tpool->count) + 1);
 }
 static DEVICE_ATTR(tlabels_free,S_IRUGO,fw_show_ne_tlabels_free,NULL);
 

      parent reply	other threads:[~2005-03-16 19:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11  0:06 [PATCH, RFC 1/3] Add sem_getcount() to arches that lack it Jody McIntyre
2005-03-11  0:08 ` [PATCH, RFC 2/3] Use sem_getcount in ieee1394 Jody McIntyre
2005-03-11  0:10 ` [PATCH, RFC 3/3] Use sem_getcount in xfs Jody McIntyre
2005-03-11  4:55 ` [PATCH, RFC 1/3] Add sem_getcount() to arches that lack it Andrew Morton
2005-03-11  5:10   ` Roland Dreier
2005-03-11  5:18     ` Nathan Scott
2005-03-11  5:31   ` Jody McIntyre
2005-03-11  5:56     ` Andrew Morton
2005-03-11 12:27       ` Matthew Wilcox
2005-03-11 17:04         ` Jody McIntyre
2005-03-16 19:27           ` [PATCH, RFC 1/4] Rename semaphore count variable to be arch specific Jody McIntyre
2005-03-16 19:28             ` [PATCH, RFC 2/4] Add sem_getcount on arches that lack it Jody McIntyre
2005-03-16 19:28             ` [PATCH, RFC 3/4] Use sem_getcount in XFS Jody McIntyre
2005-03-16 19:31             ` Jody McIntyre [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=20050316193100.GC1111@conscoop.ottawa.on.ca \
    --to=scjody@modernduck.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=nathans@sgi.com \
    --cc=willy@debian.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.