public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Brian King <brking@us.ibm.com>, Andrew Morton <akpm@osdl.org>,
	greg@kroah.com
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] fix more ipr kref problems
Date: 29 Aug 2004 17:51:03 -0400	[thread overview]
Message-ID: <1093816265.1708.45.camel@mulgrave> (raw)

This was caused by

KREF: make kref_get() return void as it makes sense to do so.
  
drivers/scsi/ipr.c: In function `ipr_worker_thread':
drivers/scsi/ipr.c:1825: error: wrong type argument to unary exclamation
mark
make[2]: *** [drivers/scsi/ipr.o] Error 1

The fix is fairly simple.

James

===== drivers/scsi/ipr.c 1.25 vs edited =====
--- 1.25/drivers/scsi/ipr.c	2004-08-16 01:40:17 -05:00
+++ edited/drivers/scsi/ipr.c	2004-08-29 16:25:31 -05:00
@@ -1822,10 +1822,11 @@
 
 	if (ioa_cfg->sdt_state == GET_DUMP) {
 		dump = ioa_cfg->dump;
-		if (!dump || !kref_get(&dump->kref)) {
+		if (!dump) {
 			spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 			return;
 		}
+		kref_get(&dump->kref);
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		ipr_get_ioa_dump(ioa_cfg, dump);
 		kref_put(&dump->kref, ipr_release_dump);
@@ -2423,11 +2424,11 @@
 	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
 	dump = ioa_cfg->dump;
 
-	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump || !kref_get(&dump->kref)) {
+	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump) {
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		return 0;
 	}
-
+	kref_get(&dump->kref);
 	spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 
 	if (off > dump->driver_dump.hdr.len) {


             reply	other threads:[~2004-08-29 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29 21:51 James Bottomley [this message]
2004-08-30 14:01 ` [PATCH] fix more ipr kref problems Brian King
2004-08-30 17:07   ` syslog message Vladimir G. Ivanovic

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=1093816265.1708.45.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=brking@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=linux-scsi@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox