linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH -mm] updated megaraid gcc 4.1 warning fix
@ 2006-05-11 13:17 Ju, Seokmann
  0 siblings, 0 replies; 3+ messages in thread
From: Ju, Seokmann @ 2006-05-11 13:17 UTC (permalink / raw)
  To: Daniel Walker, akpm; +Cc: alan, linux-kernel

Hi,
Wednesday, May 10, 2006 1:27 PM, Daniel Walker wrote:
> drivers/scsi/megaraid.c: In function âEUR~megadev_ioctlâEUR(tm):
> drivers/scsi/megaraid.c:3665: warning: ignoring return value 
> of âEUR~copy_to_userâEUR(tm), declared with attribute warn_unused_result
Thank you for the patch. 
I accept the patch.

> -----Original Message-----
> From: Daniel Walker [mailto:dwalker@mvista.com] 
> Sent: Wednesday, May 10, 2006 1:27 PM
> To: akpm@osdl.org
> Cc: Ju, Seokmann; alan@lxorguk.ukuu.org.uk; 
> linux-kernel@vger.kernel.org
> Subject: [PATCH -mm] updated megaraid gcc 4.1 warning fix
> 
> Hows that Alan?
> 
> Fixes the following warning,
> 
> drivers/scsi/megaraid.c: In function âEUR~megadev_ioctlâEUR(tm):
> drivers/scsi/megaraid.c:3665: warning: ignoring return value 
> of âEUR~copy_to_userâEUR(tm), declared with attribute warn_unused_result
> 
> Signed-Off-By: Daniel Walker <dwalker@mvista.com>
> 
> Index: linux-2.6.16/drivers/scsi/megaraid.c
> ===================================================================
> --- linux-2.6.16.orig/drivers/scsi/megaraid.c
> +++ linux-2.6.16/drivers/scsi/megaraid.c
> @@ -3662,8 +3662,9 @@ megadev_ioctl(struct inode *inode, struc
>  			 * Send the request sense data also, 
> irrespective of
>  			 * whether the user has asked for it or not.
>  			 */
> -			copy_to_user(upthru->reqsensearea,
> -					pthru->reqsensearea, 14);
> +			if (copy_to_user(upthru->reqsensearea,
> +					pthru->reqsensearea, 14))
> +				rval = (-EFAULT);
>  
>  freemem_and_return:
>  			if( pthru->dataxferlen ) {
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -mm] updated megaraid gcc 4.1 warning fix
  2006-05-10 17:26 Daniel Walker
@ 2006-05-11 13:12 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2006-05-11 13:12 UTC (permalink / raw)
  To: Daniel Walker; +Cc: akpm, Seokmann.Ju, linux-kernel

On Mer, 2006-05-10 at 10:26 -0700, Daniel Walker wrote:
> Hows that Alan?
> 
> Fixes the following warning,
> 
> drivers/scsi/megaraid.c: In function ‘megadev_ioctl’:
> drivers/scsi/megaraid.c:3665: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result
> 
> Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Looks ok to me


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -mm] updated megaraid gcc 4.1 warning fix
@ 2006-05-10 17:26 Daniel Walker
  2006-05-11 13:12 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Walker @ 2006-05-10 17:26 UTC (permalink / raw)
  To: akpm; +Cc: Seokmann.Ju, alan, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

Hows that Alan?

Fixes the following warning,

drivers/scsi/megaraid.c: In function ‘megadev_ioctl’:
drivers/scsi/megaraid.c:3665: warning: ignoring return value of ‘copy_to_user’, declared with attribute warn_unused_result

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.16/drivers/scsi/megaraid.c
===================================================================
--- linux-2.6.16.orig/drivers/scsi/megaraid.c
+++ linux-2.6.16/drivers/scsi/megaraid.c
@@ -3662,8 +3662,9 @@ megadev_ioctl(struct inode *inode, struc
 			 * Send the request sense data also, irrespective of
 			 * whether the user has asked for it or not.
 			 */
-			copy_to_user(upthru->reqsensearea,
-					pthru->reqsensearea, 14);
+			if (copy_to_user(upthru->reqsensearea,
+					pthru->reqsensearea, 14))
+				rval = (-EFAULT);
 
 freemem_and_return:
 			if( pthru->dataxferlen ) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-11 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 13:17 [PATCH -mm] updated megaraid gcc 4.1 warning fix Ju, Seokmann
  -- strict thread matches above, loose matches on Subject: below --
2006-05-10 17:26 Daniel Walker
2006-05-11 13:12 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).