Skip to contentSkip to conversation

errors with assignments in if

PATCH In review Roel Kluin 1 participant 2 messages Oct 21, 2007

Subsystems (5)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 errors with assignments in if

I am not entirely certain about the third one:

from fs/udf/udf_sb.h:

#define UDF_SB_VAT(X) ( UDF_SB(X)->s_vat )

if it's the desired behavior then I think this should at least be changed to

UDF_SB_VAT(sb) = udf_iget(sb, ino);
if (!(UDF_SB_VAT(sb)))

---
Errors with assignments in ifs

---

arch/arm/mach-omap2/clock.c +1 -1
index d9af436..e6e85b7 100644
@@ -651,7 +651,7 @@ static u32 omap2_get_clksel(u32 *div_sel, u32 *field_mask,
 		break;
 	case CM_SYSCLKOUT_SEL1:
 		div_addr = (u32)&PRCM_CLKOUT_CTRL;
-		if ((div_off == 3) || (div_off = 11))
+		if ((div_off == 3) || (div_off == 11))
 			mask= 0x3;
 		break;
 	case CM_CORE_SEL1:
drivers/isdn/hisax/elsa.c +1 -1
index 948a9b2..ed610ed 100644
@@ -883,7 +883,7 @@ setup_elsa_isa(struct IsdnCard *card)
 	val += 'A' - 3;
 	if (val == 'B' || val == 'C')
 		val ^= 1;
-	if ((cs->subtyp == ELSA_PCFPRO) && (val = 'G'))
+	if ((cs->subtyp == ELSA_PCFPRO) && (val == 'G'))
 		val = 'C';
 	printk(KERN_INFO
 	       "Elsa: %s found at %#lx Rev.:%c IRQ %d\n",
fs/udf/super.c +1 -1
index 4360c7a..353c9e8 100644
@@ -1308,7 +1308,7 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
 			if (j == UDF_SB_NUMPARTS(sb))
 				return 1;
 
-			if (!(UDF_SB_VAT(sb) = udf_iget(sb, ino)))
+			if (!(UDF_SB_VAT(sb) == udf_iget(sb, ino)))
 				return 1;
 
 			if (UDF_SB_PARTTYPE(sb, i) == UDF_VIRTUAL_MAP15) {
author
#1 lore raw
Quoted 10 lines · Roel Kluin

I am not entirely certain about the third one:

from fs/udf/udf_sb.h:

#define UDF_SB_VAT(X) ( UDF_SB(X)->s_vat )

if it's the desired behavior then I think this should at least be changed to

UDF_SB_VAT(sb) = udf_iget(sb, ino);
if (!(UDF_SB_VAT(sb)))

On a second glance, I think it's the desired behavior. Use this patch instead.
---
Errors with assignments in ifs

arch/arm/mach-omap2/clock.c +1 -1
index d9af436..e6e85b7 100644
@@ -651,7 +651,7 @@ static u32 omap2_get_clksel(u32 *div_sel, u32 *field_mask,
 		break;
 	case CM_SYSCLKOUT_SEL1:
 		div_addr = (u32)&PRCM_CLKOUT_CTRL;
-		if ((div_off == 3) || (div_off = 11))
+		if ((div_off == 3) || (div_off == 11))
 			mask= 0x3;
 		break;
 	case CM_CORE_SEL1:
drivers/isdn/hisax/elsa.c +1 -1
index 948a9b2..ed610ed 100644
@@ -883,7 +883,7 @@ setup_elsa_isa(struct IsdnCard *card)
 	val += 'A' - 3;
 	if (val == 'B' || val == 'C')
 		val ^= 1;
-	if ((cs->subtyp == ELSA_PCFPRO) && (val = 'G'))
+	if ((cs->subtyp == ELSA_PCFPRO) && (val == 'G'))
 		val = 'C';
 	printk(KERN_INFO
 	       "Elsa: %s found at %#lx Rev.:%c IRQ %d\n",