power->flags &=
                                    ~(WL_TX_POWER_F_HW | WL_TX_POWER_F_ENABLED);
 
-                       wlc_lcnphy_get_tssi(pi, (int8 *) & power->est_Pout[0],
-                                           (int8 *) & power->est_Pout_cck);
+                       wlc_lcnphy_get_tssi(pi, (int8 *) &power->est_Pout[0],
+                                           (int8 *) &power->est_Pout_cck);
                }
                wlc_phyreg_exit(ppi);
        }
 
 
        if (iqcalmode) {
 
-               and_phy_reg(pi, 0x453, (uint16) ~ (0x1 << 15));
+               and_phy_reg(pi, 0x453, (uint16) ~(0x1 << 15));
                or_phy_reg(pi, 0x453, (0x1 << 15));
        } else {
                write_phy_reg(pi, 0x63f, 1);
 static void wlc_lcnphy_clear_trsw_override(phy_info_t *pi)
 {
 
-       and_phy_reg(pi, 0x44c, (uint16) ~ ((0x1 << 1) | (0x1 << 0)));
+       and_phy_reg(pi, 0x44c, (uint16) ~((0x1 << 1) | (0x1 << 0)));
 }
 
 void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, uint16 *a, uint16 *b)
 
                                                   (0x1 << 10));
 
                                        and_phy_reg(pi, 0x2ff, (uint16)
-                                                   ~ (0x3 << 14));
+                                                   ~(0x3 << 14));
                                        or_phy_reg(pi, 0x2ff, (0x1 << 13));
                                        or_phy_reg(pi, 0x2ff, (0x1 << 0));
                                } else {
        } else if (playback_status & 0x2) {
 
                and_phy_reg(pi, 0xc2,
-                           (uint16) ~ NPHY_iqloCalCmdGctl_IQLO_CAL_EN);
+                           (uint16) ~NPHY_iqloCalCmdGctl_IQLO_CAL_EN);
        }
 
-       and_phy_reg(pi, 0xc3, (uint16) ~ (0x1 << 2));
+       and_phy_reg(pi, 0xc3, (uint16) ~(0x1 << 2));
 
        if ((pi->nphy_bb_mult_save & BB_MULT_VALID_MASK) != 0) {
 
 
                acp_shm.status |= WME_STATUS_NEWAC;
 
                /* Fill in shm acparam table */
-               shm_entry = (uint16 *) & acp_shm;
+               shm_entry = (uint16 *) &acp_shm;
                for (i = 0; i < (int)sizeof(shm_acparams_t); i += 2)
                        wlc_write_shm(wlc,
                                      M_EDCF_QINFO +
         * STA uses AC params from wme_param_ie.
         */
 
-       edcf_acp = (edcf_acparam_t *) & wlc->wme_param_ie.acparam[0];
+       edcf_acp = (edcf_acparam_t *) &wlc->wme_param_ie.acparam[0];
 
        wlc->wme_admctl = 0;
 
                acp_shm.status |= WME_STATUS_NEWAC;
 
                /* Fill in shm acparam table */
-               shm_entry = (uint16 *) & acp_shm;
+               shm_entry = (uint16 *) &acp_shm;
                for (j = 0; j < (int)sizeof(shm_acparams_t); j += 2)
                        wlc_write_shm(wlc,
                                      M_EDCF_QINFO +
                        }
 
                        rxstatus = R_REG(wlc->osh, &wlc->regs->phyrxstatus0);
-                       if (rxstatus == 0xdead || rxstatus == (uint16) - 1) {
+                       if (rxstatus == 0xdead || rxstatus == (uint16) -1) {
                                bcmerror = BCME_ERROR;
                                break;
                        }
                        wl_rateset_t *ret_rs = (wl_rateset_t *) arg;
 
                        bzero(&rs, sizeof(wlc_rateset_t));
-                       wlc_default_rateset(wlc, (wlc_rateset_t *) & rs);
+                       wlc_default_rateset(wlc, (wlc_rateset_t *) &rs);
 
                        if (len < (int)(rs.count + sizeof(rs.count))) {
                                bcmerror = BCME_BUFTOOSHORT;
 
        bcm_format_hex(hexbuf, rtsph, sizeof(txh->RTSPhyHeader));
        printf("RTS PLCP: %s ", hexbuf);
-       bcm_format_hex(hexbuf, (uint8 *) & rts, sizeof(txh->rts_frame));
+       bcm_format_hex(hexbuf, (uint8 *) &rts, sizeof(txh->rts_frame));
        printf("RTS Frame: %s", hexbuf);
        printf("\n");
 
        if (mtcl & TXC_SENDRTS) {
-               wlc_print_dot11_mac_hdr((uint8 *) & rts,
+               wlc_print_dot11_mac_hdr((uint8 *) &rts,
                                        sizeof(txh->rts_frame));
        }
 }
 
                        cur = OSL_SYSUPTIME();
                        delta = cur > wlc->WDlast ? cur - wlc->WDlast :
-                           (uint32) ~ 0 - wlc->WDlast + cur + 1;
+                           (uint32) ~0 - wlc->WDlast + cur + 1;
                        if (delta >= TIMER_INTERVAL_WATCHDOG) {
                                wlc_watchdog((void *)wlc);
                                wlc->WDlast = cur;
 
        *ss_algo_channel = 0;
 
        if (!wlc->pub->up) {
-               *ss_algo_channel = (uint16) - 1;
+               *ss_algo_channel = (uint16) -1;
                return;
        }
 
        /* NOTE: opmode can only be SISO or CDD as STBC is decided on a per-packet basis */
        if (WLC_STBC_CAP_PHY(wlc) &&
            wlc->stf->ss_algosel_auto
-           && (wlc->stf->ss_algo_channel != (uint16) - 1)) {
+           && (wlc->stf->ss_algo_channel != (uint16) -1)) {
                ASSERT(isset(&wlc->stf->ss_algo_channel, PHY_TXC1_MODE_CDD)
                       || isset(&wlc->stf->ss_algo_channel,
                                PHY_TXC1_MODE_SISO));
 
        if (WLC_STBC_CAP_PHY(wlc)) {
                wlc->stf->ss_algosel_auto = TRUE;
-               wlc->stf->ss_algo_channel = (uint16) - 1;       /* Init the default value */
+               wlc->stf->ss_algo_channel = (uint16) -1;        /* Init the default value */
        }
        return 0;
 }
 
                        /* Bad length, try to find another chunk anyway */
                        rsz = 6;
                }
-               if (hndcrc16((uint8 *) & rawotp[i], rsz,
+               if (hndcrc16((uint8 *) &rawotp[i], rsz,
                             CRC16_INIT_VALUE) == CRC16_GOOD_VALUE) {
                        /* Good crc, copy the vars */
                        gchunks++;
 
                result = result * base + value;
                /* Detected overflow */
                if (result < last_result && !minus)
-                       return (ulong) - 1;
+                       return (ulong) -1;
                last_result = result;
                cp++;
        }
 
 static uintptr _dma_getvar(dma_info_t *di, const char *name)
 {
        if (!strcmp(name, "&txavail"))
-               return (uintptr) & (di->hnddma.txavail);
+               return (uintptr) &(di->hnddma.txavail);
        else {
                ASSERT(0);
        }
 
 
        switch (SDIOD_DRVSTR_KEY(sih->chip, sih->pmurev)) {
        case SDIOD_DRVSTR_KEY(BCM4336_CHIP_ID, 8):
-               str_tab = (sdiod_drive_str_t *) & sdiod_drive_strength_tab3;
+               str_tab = (sdiod_drive_str_t *) &sdiod_drive_strength_tab3;
                str_mask = 0x00003800;
                str_shift = 11;
                break;
 
        /* adjust for the qformat of the N as
         * log2(mag * 2^x) = log2(mag) + x
         */
-       s32log = qm_add32(s32log, ((int32) - qN) << 15);        /* q.15 format */
+       s32log = qm_add32(s32log, ((int32) -qN) << 15); /* q.15 format */
 
        /* normalize the result. */
        s16norm = qm_norm32(s32log);