Skip to content

Commit

Permalink
Staging: brcm80211: remove FALSE #define
Browse files Browse the repository at this point in the history
use the kernel provided 'false' value instead, especially
as we are using a 'bool' for these variables.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Oct 12, 2010
1 parent 0f0881b commit 0965ae8
Show file tree
Hide file tree
Showing 45 changed files with 682 additions and 686 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool bcmsdh_intr_query(void *sdh)
ASSERT(bcmsdh);
status = sdioh_interrupt_query(bcmsdh->sdioh, &on);
if (SDIOH_API_SUCCESS(status))
return FALSE;
return false;
else
return on;
}
Expand All @@ -139,7 +139,7 @@ int bcmsdh_intr_disable(void *sdh)
SDIOH_API_RC status;
ASSERT(bcmsdh);

status = sdioh_interrupt_set(bcmsdh->sdioh, FALSE);
status = sdioh_interrupt_set(bcmsdh->sdioh, false);
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
}

Expand Down
12 changes: 6 additions & 6 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ bool bcmsdh_chipmatch(u16 vendor, u16 device)
}
#endif /* BCMSDIOH_SPI */

return FALSE;
return false;
}

#if defined(BCMPLATFORM_BUS)
Expand Down Expand Up @@ -190,7 +190,7 @@ int bcmsdh_probe(struct device *dev)
}
#endif /* defined(OOB_INTR_ONLY) */
/* allocate SDIO Host Controller state info */
osh = osl_attach(dev, PCI_BUS, FALSE);
osh = osl_attach(dev, PCI_BUS, false);
if (!osh) {
SDLX_MSG(("%s: osl_attach failed\n", __func__));
goto err;
Expand Down Expand Up @@ -222,7 +222,7 @@ int bcmsdh_probe(struct device *dev)
sdhc->sdh = sdh;
sdhc->oob_irq = irq;
sdhc->oob_flags = irq_flags;
sdhc->oob_irq_registered = FALSE; /* to make sure.. */
sdhc->oob_irq_registered = false; /* to make sure.. */
#if defined(OOB_INTR_ONLY)
spin_lock_init(&sdhc->irq_lock);
#endif
Expand Down Expand Up @@ -388,7 +388,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)

SDLX_MSG(("%s: Disabling TI FlashMedia Controller.\n",
__func__));
osh = osl_attach(pdev, PCI_BUS, FALSE);
osh = osl_attach(pdev, PCI_BUS, false);
if (!osh) {
SDLX_MSG(("%s: osl_attach failed\n", __func__));
goto err;
Expand Down Expand Up @@ -423,7 +423,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/

/* allocate SDIO Host Controller state info */
osh = osl_attach(pdev, PCI_BUS, FALSE);
osh = osl_attach(pdev, PCI_BUS, false);
if (!osh) {
SDLX_MSG(("%s: osl_attach failed\n", __func__));
goto err;
Expand Down Expand Up @@ -634,7 +634,7 @@ void bcmsdh_unregister_oob_intr(void)
set_irq_wake(sdhcinfo->oob_irq, 0);
disable_irq(sdhcinfo->oob_irq); /* just in case.. */
free_irq(sdhcinfo->oob_irq, NULL);
sdhcinfo->oob_irq_registered = FALSE;
sdhcinfo->oob_irq_registered = false;
}
#endif /* defined(OOB_INTR_ONLY) */
/* Module parameters specific to each host-controller driver */
Expand Down
26 changes: 13 additions & 13 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ uint sd_divisor = 2; /* Default 48MHz/2 = 24MHz */

uint sd_power = 1; /* Default to SD Slot powered ON */
uint sd_clock = 1; /* Default to SD Clock turned ON */
uint sd_hiok = FALSE; /* Don't use hi-speed mode by default */
uint sd_hiok = false; /* Don't use hi-speed mode by default */
uint sd_msglevel = 0x01;
uint sd_use_dma = true;
DHD_PM_RESUME_WAIT_INIT(sdioh_request_byte_wait);
Expand Down Expand Up @@ -105,7 +105,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
err_ret));
}

return FALSE;
return false;
}

/*
Expand Down Expand Up @@ -321,7 +321,7 @@ extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *sd)
sdio_release_host(gInstance->func[2]);
}

sd->intr_handler_valid = FALSE;
sd->intr_handler_valid = false;
sd->intr_handler = NULL;
sd->intr_handler_arg = NULL;
#elif defined(HW_OOB)
Expand Down Expand Up @@ -444,7 +444,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
if (plen >= (int)sizeof(int_val))
bcopy(params, &int_val, sizeof(int_val));

bool_val = (int_val != 0) ? true : FALSE;
bool_val = (int_val != 0) ? true : false;

actionid = set ? IOV_SVAL(vi->varid) : IOV_GVAL(vi->varid);
switch (actionid) {
Expand Down Expand Up @@ -514,7 +514,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
}

case IOV_GVAL(IOV_RXCHAIN):
int_val = FALSE;
int_val = false;
bcopy(&int_val, arg, val_size);
break;

Expand Down Expand Up @@ -1041,9 +1041,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
sd_data(("%s: Creating new %s Packet, len=%d\n",
__func__, write ? "TX" : "RX", buflen_u));
#ifdef DHD_USE_STATIC_BUF
mypkt = PKTGET_STATIC(sd->osh, buflen_u, write ? true : FALSE);
mypkt = PKTGET_STATIC(sd->osh, buflen_u, write ? true : false);
#else
mypkt = PKTGET(sd->osh, buflen_u, write ? true : FALSE);
mypkt = PKTGET(sd->osh, buflen_u, write ? true : false);
#endif /* DHD_USE_STATIC_BUF */
if (!mypkt) {
sd_err(("%s: PKTGET failed: len %d\n",
Expand All @@ -1063,9 +1063,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
bcopy(PKTDATA(mypkt), buffer, buflen_u);

#ifdef DHD_USE_STATIC_BUF
PKTFREE_STATIC(sd->osh, mypkt, write ? true : FALSE);
PKTFREE_STATIC(sd->osh, mypkt, write ? true : false);
#else
PKTFREE(sd->osh, mypkt, write ? true : FALSE);
PKTFREE(sd->osh, mypkt, write ? true : false);
#endif /* DHD_USE_STATIC_BUF */
} else if (((u32) (PKTDATA(pkt)) & DMA_ALIGN_MASK) != 0) {
/* Case 2: We have a packet, but it is unaligned. */
Expand All @@ -1077,9 +1077,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
__func__, write ? "TX" : "RX", PKTLEN(pkt)));
#ifdef DHD_USE_STATIC_BUF
mypkt = PKTGET_STATIC(sd->osh, PKTLEN(pkt),
write ? true : FALSE);
write ? true : false);
#else
mypkt = PKTGET(sd->osh, PKTLEN(pkt), write ? true : FALSE);
mypkt = PKTGET(sd->osh, PKTLEN(pkt), write ? true : false);
#endif /* DHD_USE_STATIC_BUF */
if (!mypkt) {
sd_err(("%s: PKTGET failed: len %d\n",
Expand All @@ -1099,9 +1099,9 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
bcopy(PKTDATA(mypkt), PKTDATA(pkt), PKTLEN(mypkt));

#ifdef DHD_USE_STATIC_BUF
PKTFREE_STATIC(sd->osh, mypkt, write ? true : FALSE);
PKTFREE_STATIC(sd->osh, mypkt, write ? true : false);
#else
PKTFREE(sd->osh, mypkt, write ? true : FALSE);
PKTFREE(sd->osh, mypkt, write ? true : false);
#endif /* DHD_USE_STATIC_BUF */
} else { /* case 3: We have a packet and
it is aligned. */
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ typedef struct dhd_pub {
#define _DHD_PM_RESUME_WAIT(a, b) do {\
int retry = 0; \
while (dhd_mmc_suspend && retry++ != b) { \
wait_event_timeout(a, FALSE, HZ/100); \
wait_event_timeout(a, false, HZ/100); \
} \
} while (0)
#define DHD_PM_RESUME_WAIT(a) _DHD_PM_RESUME_WAIT(a, 30)
Expand All @@ -171,7 +171,7 @@ typedef struct dhd_pub {
#define SPINWAIT_SLEEP(a, exp, us) do { \
uint countdown = (us) + 9999; \
while ((exp) && (countdown >= 10000)) { \
wait_event_timeout(a, FALSE, HZ/100); \
wait_event_timeout(a, false, HZ/100); \
countdown -= 10000; \
} \
} while (0)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ dhd_prot_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf, int len)
dhd->wme_dp = (u8) ltoh32(val);
}

prot->pending = FALSE;
prot->pending = false;

done:
dhd_os_proto_unblock(dhd);
Expand Down Expand Up @@ -351,7 +351,7 @@ bool dhd_proto_fcinfo(dhd_pub_t *dhd, void *pktbuf, u8 * fcbits)
if ((h->flags2 & BDC_FLAG2_FC_FLAG) == BDC_FLAG2_FC_FLAG)
return true;
#endif
return FALSE;
return false;
}

int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf)
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, void *pkt, int prec)
p = pktq_peek_tail(q, &eprec);
ASSERT(p);
if (eprec > prec)
return FALSE;
return false;
}

/* Evict if needed */
Expand All @@ -356,7 +356,7 @@ bool dhd_prec_enq(dhd_pub_t *dhdp, struct pktq *q, void *pkt, int prec)
ASSERT(!pktq_pempty(q, eprec));
discard_oldest = AC_BITMAP_TST(dhdp->wme_dp, eprec);
if (eprec == prec && !discard_oldest)
return FALSE; /* refuse newer (incoming) packet */
return false; /* refuse newer (incoming) packet */
/* Evict packet according to discard policy */
p = discard_oldest ? pktq_pdeq(q, eprec) : pktq_pdeq_tail(q,
eprec);
Expand Down Expand Up @@ -523,7 +523,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
static void wl_show_host_event(wl_event_msg_t *event, void *event_data)
{
uint i, status, reason;
bool group = FALSE, flush_txq = FALSE, link = FALSE;
bool group = false, flush_txq = false, link = false;
char *auth_str, *event_name;
unsigned char *buf;
char err_msg[256], eabuf[ETHER_ADDR_STR_LEN];
Expand Down
38 changes: 19 additions & 19 deletions drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void wifi_del_dev(void)

#if defined(CONFIG_PM_SLEEP)
#include <linux/suspend.h>
volatile bool dhd_mmc_suspend = FALSE;
volatile bool dhd_mmc_suspend = false;
DECLARE_WAIT_QUEUE_HEAD(dhd_dpc_wait);
#endif /* defined(CONFIG_PM_SLEEP) */

Expand Down Expand Up @@ -343,7 +343,7 @@ int dhd_idletime = DHD_IDLETIME_TICKS;
module_param(dhd_idletime, int, 0);

/* Use polling */
uint dhd_poll = FALSE;
uint dhd_poll = false;
module_param(dhd_poll, uint, 0);

/* Use cfg80211 */
Expand Down Expand Up @@ -426,7 +426,7 @@ static int dhd_sleep_pm_callback(struct notifier_block *nfb,
return NOTIFY_OK;
case PM_POST_HIBERNATION:
case PM_POST_SUSPEND:
dhd_mmc_suspend = FALSE;
dhd_mmc_suspend = false;
return NOTIFY_OK;
}
return 0;
Expand Down Expand Up @@ -707,7 +707,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
cnt = netdev_mc_count(dev);

/* Determine initial value of allmulti flag */
allmulti = (dev->flags & IFF_ALLMULTI) ? true : FALSE;
allmulti = (dev->flags & IFF_ALLMULTI) ? true : false;

/* Send down the multicast list first. */

Expand Down Expand Up @@ -789,7 +789,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
/* Finally, pick up the PROMISC flag as well, like the NIC
driver does */

allmulti = (dev->flags & IFF_PROMISC) ? true : FALSE;
allmulti = (dev->flags & IFF_PROMISC) ? true : false;
allmulti = htol32(allmulti);

memset(&ioc, 0, sizeof(ioc));
Expand Down Expand Up @@ -935,7 +935,7 @@ static int _dhd_sysioc_thread(void *data)
dhd_info_t *dhd = (dhd_info_t *) data;
int i;
#ifdef SOFTAP
bool in_ap = FALSE;
bool in_ap = false;
#endif

while (down_interruptible(&dhd->sysioc_sem) == 0) {
Expand All @@ -959,23 +959,23 @@ static int _dhd_sysioc_thread(void *data)
DHD_TRACE(("attempt to set MAC for %s "
"in AP Mode," "blocked. \n",
dhd->iflist[i]->net->name));
dhd->set_macaddress = FALSE;
dhd->set_macaddress = false;
continue;
}

if (in_ap && dhd->set_multicast) {
DHD_TRACE(("attempt to set MULTICAST list for %s" "in AP Mode, blocked. \n",
dhd->iflist[i]->net->name));
dhd->set_multicast = FALSE;
dhd->set_multicast = false;
continue;
}
#endif /* SOFTAP */
if (dhd->set_multicast) {
dhd->set_multicast = FALSE;
dhd->set_multicast = false;
_dhd_set_multicast_list(dhd, i);
}
if (dhd->set_macaddress) {
dhd->set_macaddress = FALSE;
dhd->set_macaddress = false;
_dhd_set_mac_address(dhd, i,
&dhd->macvalue);
}
Expand Down Expand Up @@ -1041,7 +1041,7 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, void *pktbuf)

/* Look into the packet and update the packet priority */
if ((PKTPRIO(pktbuf) == 0))
pktsetprio(pktbuf, FALSE);
pktsetprio(pktbuf, false);

/* If the protocol uses a data header, apply it */
dhd_prot_hdrpush(dhdp, ifidx, pktbuf);
Expand Down Expand Up @@ -1300,7 +1300,7 @@ static int dhd_watchdog_thread(void *data)
if (kthread_should_stop())
break;
if (down_interruptible(&dhd->watchdog_sem) == 0) {
if (dhd->pub.dongle_reset == FALSE) {
if (dhd->pub.dongle_reset == false) {
WAKE_LOCK(&dhd->pub, WAKE_LOCK_WATCHDOG);
/* Call the bus module watchdog */
dhd_bus_watchdog(&dhd->pub);
Expand Down Expand Up @@ -1427,7 +1427,7 @@ static int dhd_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol)
ioc.cmd = WLC_GET_VAR;
ioc.buf = buf;
ioc.len = (uint) sizeof(buf);
ioc.set = FALSE;
ioc.set = false;

strcpy(buf, "toe_ol");
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
Expand Down Expand Up @@ -1987,7 +1987,7 @@ dhd_pub_t *dhd_attach(osl_t *osh, struct dhd_bus *bus, uint bus_hdrlen)
if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0))
dhd->threads_only = true;
else
dhd->threads_only = FALSE;
dhd->threads_only = false;

if (dhd_dpc_prio >= 0) {
/* Initialize watchdog thread */
Expand Down Expand Up @@ -2111,7 +2111,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
/* Host registration for OOB interrupt */
if (bcmsdh_register_oob_intr(dhdp)) {
del_timer_sync(&dhd->timer);
dhd->wd_timer_valid = FALSE;
dhd->wd_timer_valid = false;
DHD_ERROR(("%s Host failed to resgister for OOB\n", __func__));
return -ENODEV;
}
Expand All @@ -2123,7 +2123,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
/* If bus is not ready, can't come up */
if (dhd->pub.busstate != DHD_BUS_DATA) {
del_timer_sync(&dhd->timer);
dhd->wd_timer_valid = FALSE;
dhd->wd_timer_valid = false;
DHD_ERROR(("%s failed bus is not ready\n", __func__));
return -ENODEV;
}
Expand Down Expand Up @@ -2302,7 +2302,7 @@ void dhd_bus_detach(dhd_pub_t *dhdp)

/* Clear the watchdog timer */
del_timer_sync(&dhd->timer);
dhd->wd_timer_valid = FALSE;
dhd->wd_timer_valid = false;
}
}
}
Expand Down Expand Up @@ -2535,7 +2535,7 @@ void dhd_os_wd_timer(void *bus, uint wdtick)
/* Totally stop the timer */
if (!wdtick && dhd->wd_timer_valid == true) {
del_timer_sync(&dhd->timer);
dhd->wd_timer_valid = FALSE;
dhd->wd_timer_valid = false;
save_dhd_watchdog_ms = wdtick;
return;
}
Expand Down Expand Up @@ -2757,7 +2757,7 @@ void dhd_wait_for_event(dhd_pub_t *dhd, bool *lockvar)
struct dhd_info *dhdinfo = dhd->info;
dhd_os_sdunlock(dhd);
wait_event_interruptible_timeout(dhdinfo->ctrl_wait,
(*lockvar == FALSE), HZ * 2);
(*lockvar == false), HZ * 2);
dhd_os_sdlock(dhd);
return;
}
Expand Down
Loading

0 comments on commit 0965ae8

Please sign in to comment.