[Yaffs] ignoring return value of `inode_setattr'

Todd Poynor tpoynor at mvista.com
Wed Jul 13 01:46:45 BST 2005


inode_setattr was marked __must_check in linux 2.6.7 or so...

fs/yaffs/yaffs_fs.c: In function `yaffs_setattr':
fs/yaffs/yaffs_fs.c:1218: warning: ignoring return value of `inode_setattr', declared with attribute warn_unused_result

The following patch is suggested, thanks -- Todd

Return error from inode_setattr(), avoid compile warning.

Signed-off-by: Todd Poynor <tpoynor at mvista.com>

Index: linux-2.6.10/fs/yaffs/yaffs_fs.c
===================================================================
--- linux-2.6.10.orig/fs/yaffs/yaffs_fs.c	2005-07-13 00:40:25.000000000 +0000
+++ linux-2.6.10/fs/yaffs/yaffs_fs.c	2005-07-13 00:40:50.000000000 +0000
@@ -1220,7 +1220,7 @@
 			error = -EPERM;
 		}
 		yaffs_GrossUnlock(dev);
-		inode_setattr(inode,attr);
+		error = inode_setattr(inode,attr);
 	}
 	return error;
 }



More information about the yaffs mailing list