mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: bo yang <bo.yang@lsi.com>
Cc: linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
	akpm@osdl.org, linux-kernel@vger.kernel.org, Bo.yang@lsi.com,
	Sumant.patro@lsi.com
Subject: Re: [PATCH 5/8] scsi: megaraid_sas - using unsigned long for sense_buff ptr
Date: Fri, 28 Sep 2007 13:45:39 -0700	[thread overview]
Message-ID: <20070928134539.56640570.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1190821267.5955.20.camel@dhcp-75-534.se.lsil.com>

On Wed, 26 Sep 2007 11:41:07 -0400 bo yang wrote:

> MegaRAID utilities expect sense_buff to be of type unsigned long.
> 
> Signed-off-by: Bo Yang <bo.yang@lsi.com>
> 
> ---
>  drivers/scsi/megaraid/megaraid_sas.c |   13 ++++++++-----
>  1 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff -uprN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c
> --- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c	2007-09-27 04:41:39.000000000 -0700
> +++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c	2007-09-27 04:50:14.000000000 -0700
> @@ -2969,6 +2969,7 @@ megasas_mgmt_fw_ioctl(struct megasas_ins
>  	void *sense = NULL;
>  	dma_addr_t sense_handle;
>  	u32 *sense_ptr;
> +	unsigned long *sense_buff;
>  
>  	memset(kbuff_arr, 0, sizeof(kbuff_arr));
>  
> @@ -3073,14 +3074,16 @@ megasas_mgmt_fw_ioctl(struct megasas_ins
>  	 */
>  	if (ioc->sense_len) {
>  		/*
> -		 * sense_ptr points to the location that has the user
> +		 * sense_buff points to the location that has the user
>  		 * sense buffer address
>  		 */
> -		sense_ptr = (u32 *) ((unsigned long)ioc->frame.raw +
> -				     ioc->sense_off);
> +		sense_buff = (unsigned long *) ((unsigned long)ioc->frame.raw +
> +								ioc->sense_off);
>  
> -		if (copy_to_user((void __user *)((unsigned long)(*sense_ptr)),
> -				 sense, ioc->sense_len)) {
> +		if (copy_to_user((void __user *)(unsigned long)(*sense_buff),
> +				sense, ioc->sense_len)) {
> +			printk(KERN_ERR "megasas: Failed to copy out to user"
> +					"sense data\n");

					" sense data\n");

>  			error = -EFAULT;
>  			goto out;
>  		}


---
~Randy
Phaedrus says that Quality is about caring.

  reply	other threads:[~2007-09-28 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 15:41 bo yang
2007-09-28 20:45 ` Randy Dunlap [this message]
2007-10-01 16:02 bo yang

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=20070928134539.56640570.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=Sumant.patro@lsi.com \
    --cc=akpm@osdl.org \
    --cc=bo.yang@lsi.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®