Hi,

especially to wbx and tg: due to some stricter code requirements
(i.e. lvalue casting is not allowed anymore), I have to do some source
code patches. The following are critical:

Modified: branches/freewrt_gcc4/target/linux/brcm-2.4/patches/001-bcm47xx.patch
===================================================================
--- branches/freewrt_gcc4/target/linux/brcm-2.4/patches/001-bcm47xx.patch
+2006-10-08 14:02:46 UTC (rev 867)
+++ branches/freewrt_gcc4/target/linux/brcm-2.4/patches/001-bcm47xx.patch
+2006-10-09 10:51:15 UTC (rev 868)
@@ -10784,7 +10784,8 @@
 +    /* handle bulk of data as 32-bit words */
 +    pend = pdata + (nbytes & 0xfffffffc);
 +    while (pdata < pend) {
-+      *tptr = *((ulong *)pdata)++;
++      *tptr = *((ulong *)pdata);
++      pdata++;
 +        CRC_INNER_LOOP(32, crc, tmp[0]);
 +        CRC_INNER_LOOP(32, crc, tmp[1]);
 +        CRC_INNER_LOOP(32, crc, tmp[2]);
@@ -12610,7 +12611,7 @@
 +              INTR_OFF(si, intr_val);
 +              tmp = 1;
 +              OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1);
-+              (uintptr)sbr &= ~(1 << 11);     /* mask out bit 11*/
++              sbr = (uint)sbr & ~(1 << 11);   /* mask out bit 11*/
 +      }
 +
 +      val = R_REG(sbr);
@@ -12644,7 +12645,7 @@
 +              INTR_OFF(si, intr_val);
 +              tmp = 1;
 +              OSL_PCMCIA_WRITE_ATTR(si->osh, MEM_SEG, &tmp, 1);
-+              (uintptr)sbr &= ~(1 << 11);     /* mask out bit 11 */
++              sbr = (uint)sbr & ~(1 << 11);   /* mask out bit 11 */
 +      }
 +
 +      if (BUSTYPE(si->bustype) == PCMCIA_BUS) {


Are these changes correct? I do not like pointer casting at all...

Dirk
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to