public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: jejb@steeleye.com
Subject: kmalloc argument switcheroo in recent 53c700 change.
Date: Thu, 22 Jun 2006 15:46:15 -0400	[thread overview]
Message-ID: <20060622194615.GA15895@redhat.com> (raw)
In-Reply-To: <200606211900.k5LJ0Yqq028827@hera.kernel.org>

On Wed, Jun 21, 2006 at 07:00:34PM +0000, Linux Kernel wrote:
 > commit 67d59dfdeb21df2c16dcd478b66177e91178ecd0
 > tree ae85703651d81740f4a6cd398f9dd4d6aabe6a2f
 > parent 6db874fbdbedba5e15e76cc03b42f52ea70338c0
 > author James Bottomley <James.Bottomley@steeleye.com> Wed, 14 Jun 2006 07:31:19 -0500
 > committer James Bottomley <jejb@mulgrave.il.steeleye.com> Tue, 20 Jun 2006 05:34:01 -0500
 > 
 > [SCSI] 53c700: remove reliance on deprecated cmnd fields
 >  ...
 >  
 > +	SDp->hostdata = kmalloc(GFP_KERNEL, sizeof(struct NCR_700_sense));
 > +
 > +	if (!SDp->hostdata)
 > +		return -ENOMEM;

"I'll take reversed arguments for $100 please Alex".

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6/drivers/scsi/53c700.c~	2006-06-22 15:43:42.000000000 -0400
+++ linux-2.6/drivers/scsi/53c700.c	2006-06-22 15:44:14.000000000 -0400
@@ -2044,7 +2044,7 @@ NCR_700_slave_configure(struct scsi_devi
 	struct NCR_700_Host_Parameters *hostdata = 
 		(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
 
-	SDp->hostdata = kmalloc(GFP_KERNEL, sizeof(struct NCR_700_sense));
+	SDp->hostdata = kmalloc(sizeof(struct NCR_700_sense), GFP_KERNEL);
 
 	if (!SDp->hostdata)
 		return -ENOMEM;

-- 
http://www.codemonkey.org.uk

           reply	other threads:[~2006-06-22 19:46 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <200606211900.k5LJ0Yqq028827@hera.kernel.org>]

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=20060622194615.GA15895@redhat.com \
    --to=davej@redhat.com \
    --cc=jejb@steeleye.com \
    --cc=linux-kernel@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