Skip to contentSkip to conversation

qnx6fs: silence a Sparse warning

PATCH In review Dan Carpenter 2 participants 2 messages Mar 8, 2012 – Mar 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qnx6fs: silence a Sparse warning

Add a __force to silence a sparse warning:

	fs/qnx6/inode.c:88:22: warning: cast to restricted __fs32
fs/qnx6/inode.c +1 -1
index e44012d..acf9241 100644
@@ -85,7 +85,7 @@ static int qnx6_get_block(struct inode *inode, sector_t iblock,
 
 static int qnx6_check_blockptr(__fs32 ptr)
 {
-	if (ptr = ~(__fs32)0) {
+	if (ptr = ~(__force __fs32)0) {
 		printk(KERN_ERR "qnx6: hit unused blockpointer.\n");
 		return 0;
 	}
#1 lore raw

Hi Dan,

thank you very much for the provided fix.
I've successfully applied and tested it. (well, did not expect much to happen, but just to be on the safe side)
I will include it in my next version.

Thanks,

Kai

Quoted 20 lines

Add a __force to silence a sparse warning:

	fs/qnx6/inode.c:88:22: warning: cast to restricted __fs32
fs/qnx6/inode.c +1 -1
index e44012d..acf9241 100644
@@ -85,7 +85,7 @@ static int qnx6_get_block(struct inode *inode, sector_t
 iblock,
 
 static int qnx6_check_blockptr(__fs32 ptr)
 {
-	if (ptr = ~(__fs32)0) {
+	if (ptr = ~(__force __fs32)0) {
 		printk(KERN_ERR "qnx6: hit unused blockpointer.\n");
 		return 0;

}