Re: [Cocci] Re: [PATCH] scripts/coccinelle/misc/boolinit.cocci:semantic patch for bool issues

From: Artem Bityutskiy
Date: Fri Feb 10 2012 - 13:58:36 EST


On Fri, 2012-02-10 at 09:45 -0800, Joe Perches wrote:
> On Fri, 2012-02-10 at 18:11 +0100, Julia Lawall wrote:
> > From: Julia Lawall <Julia.Lawall@xxxxxxx>
>
> Thanks Julia. It seems to work well.
>
> Someone could run this with:
>
> $ make coccicheck COCCI=scripts/coccinelle/misc/boolinit.cocci

Just FYI, here is what I got (I do not plan to submit this upstream):

arch/arm/mach-cns3xxx/pcie.c | 2 +-
arch/arm/mach-omap2/cm2xxx_3xxx.c | 2 +-
arch/arm/plat-spear/padmux.c | 2 +-
arch/powerpc/kvm/booke.c | 4 +-
arch/um/kernel/process.c | 4 +-
arch/x86/kernel/apm_32.c | 4 +-
arch/x86/kernel/cpu/common.c | 2 +-
arch/x86/kernel/cpu/topology.c | 2 +-
arch/x86/kvm/mmu.c | 2 +-
arch/x86/kvm/vmx.c | 42 ++++----
arch/x86/kvm/x86.c | 4 +-
arch/x86/platform/geode/alix.c | 2 +-
arch/x86/platform/iris/iris.c | 2 +-
arch/x86/platform/olpc/olpc-xo1-sci.c | 2 +-
crypto/algif_hash.c | 8 +-
crypto/algif_skcipher.c | 16 ++--
drivers/acpi/apei/hest.c | 4 +-
drivers/acpi/dock.c | 2 +-
drivers/acpi/processor_core.c | 2 +-
drivers/acpi/video.c | 4 +-
drivers/acpi/video_detect.c | 2 +-
drivers/ata/sata_nv.c | 2 +-
drivers/atm/he.c | 6 +-
drivers/block/cciss.c | 2 +-
drivers/block/paride/pd.c | 2 +-
drivers/block/paride/pf.c | 2 +-
drivers/block/paride/pg.c | 2 +-
drivers/block/paride/pt.c | 2 +-
drivers/block/xd.c | 2 +-
drivers/bluetooth/btusb.c | 2 +-
drivers/bluetooth/hci_bcsp.c | 4 +-
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/cdrom/cdrom.c | 18 ++--
drivers/char/agp/amd64-agp.c | 2 +-
drivers/char/agp/sis-agp.c | 2 +-
drivers/char/ipmi/ipmi_si_intf.c | 2 +-
drivers/char/lp.c | 2 +-
drivers/char/pcmcia/synclink_cs.c | 2 +-
drivers/char/tpm/tpm_tis.c | 10 +-
drivers/char/xilinx_hwicap/buffer_icap.c | 6 +-
drivers/char/xilinx_hwicap/xilinx_hwicap.c | 12 +-
drivers/crypto/caam/caamalg.c | 8 +-
drivers/dma/dw_dmac.c | 2 +-
drivers/dma/shdma.c | 2 +-
drivers/dma/sirf-dma.c | 4 +-
drivers/firewire/sbp2.c | 2 +-
drivers/gpu/drm/drm_edid.c | 2 +-
drivers/gpu/drm/drm_fb_helper.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 2 +-
drivers/gpu/drm/gma500/oaktrail_lvds.c | 2 +-
drivers/gpu/drm/gma500/power.c | 4 +-
drivers/gpu/drm/gma500/psb_intel_sdvo.c | 3 +-
drivers/gpu/drm/i915/i915_drv.c | 4 +-
drivers/gpu/drm/i915/intel_bios.c | 4 +-
drivers/gpu/drm/i915/intel_crt.c | 8 +-
drivers/gpu/drm/i915/intel_display.c | 4 +-
drivers/gpu/drm/i915/intel_lvds.c | 6 +-
drivers/gpu/drm/i915/intel_sdvo.c | 3 +-
drivers/gpu/drm/i915/intel_tv.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_bios.c | 4 +-
drivers/gpu/drm/nouveau/nouveau_state.c | 2 +-
drivers/gpu/drm/radeon/r100.c | 12 +-
drivers/gpu/drm/radeon/r300.c | 2 +-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/radeon_atpx_handler.c | 2 +-
drivers/gpu/drm/radeon/radeon_bios.c | 8 +-
drivers/gpu/drm/radeon/radeon_connectors.c | 4 +-
drivers/gpu/drm/radeon/radeon_display.c | 4 +-
drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 4 +-
drivers/gpu/drm/radeon/radeon_object.c | 2 +-
drivers/gpu/drm/radeon/radeon_pm.c | 2 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
drivers/gpu/drm/radeon/rs600.c | 2 +-
drivers/gpu/vga/vga_switcheroo.c | 16 ++--
drivers/hid/hid-lg4ff.c | 6 +-
drivers/hid/hid-ntrig.c | 12 +-
drivers/hwmon/abituguru3.c | 2 +-
drivers/hwmon/ads7828.c | 4 +-
drivers/hwmon/coretemp.c | 4 +-
drivers/hwmon/lineage-pem.c | 2 +-
drivers/hwmon/lm75.c | 4 +-
drivers/hwmon/lm95245.c | 10 +-
drivers/hwmon/ltc4151.c | 2 +-
drivers/hwmon/ltc4215.c | 2 +-
drivers/hwmon/ltc4245.c | 2 +-
drivers/hwmon/ltc4261.c | 4 +-
drivers/hwmon/max16065.c | 2 +-
drivers/hwmon/max6642.c | 2 +-
drivers/hwmon/pmbus/pmbus_core.c | 2 +-
drivers/hwmon/smm665.c | 2 +-
drivers/hwmon/w83627hf.c | 2 +-
drivers/hwmon/w83781d.c | 2 +-
drivers/i2c/busses/i2c-tegra.c | 4 +-
drivers/i2c/busses/i2c-viapro.c | 2 +-
drivers/ide/ali14xx.c | 2 +-
drivers/ide/cmd640.c | 2 +-
drivers/ide/dtc2278.c | 2 +-
drivers/ide/ht6560b.c | 2 +-
drivers/ide/ide-4drives.c | 2 +-
drivers/ide/ide-acpi.c | 4 +-
drivers/ide/ide-pci-generic.c | 2 +-
drivers/ide/qd65xx.c | 2 +-
drivers/ide/umc8672.c | 2 +-
drivers/infiniband/hw/ehca/ehca_main.c | 18 ++--
drivers/input/misc/wistron_btns.c | 2 +-
drivers/input/mouse/appletouch.c | 6 +-
drivers/input/mouse/elantech.c | 2 +-
drivers/input/mouse/hgpk.c | 2 +-
drivers/input/mouse/psmouse-base.c | 2 +-
drivers/input/mouse/synaptics_i2c.c | 2 +-
drivers/input/tablet/wacom_wac.c | 2 +-
drivers/input/touchscreen/auo-pixcir-ts.c | 2 +-
drivers/isdn/hardware/avm/b1dma.c | 2 +-
drivers/isdn/sc/init.c | 2 +-
drivers/macintosh/ams/ams-input.c | 4 +-
drivers/media/dvb/dvb-usb/af9005.c | 2 +-
drivers/media/dvb/frontends/af9013.c | 24 ++--
drivers/media/dvb/frontends/drxk_hard.c | 26 +++---
drivers/media/radio/radio-gemtek.c | 8 +-
drivers/media/radio/radio-sf16fmi.c | 2 +-
drivers/media/radio/si470x/radio-si470x-common.c | 4 +-
drivers/media/rc/ene_ir.c | 2 +-
drivers/media/rc/mceusb.c | 2 +-
drivers/media/rc/streamzap.c | 2 +-
drivers/media/video/cx18/cx18-driver.c | 2 +-
drivers/media/video/ivtv/ivtv-driver.c | 2 +-
drivers/media/video/marvell-ccic/mcam-core.c | 2 +-
drivers/media/video/omap/omap_vout.c | 8 +-
drivers/media/video/omap/omap_vout_vrfb.c | 10 +-
drivers/media/video/ov9740.c | 4 +-
drivers/media/video/s5p-fimc/fimc-mdevice.c | 4 +-
drivers/media/video/stk-webcam.c | 4 +-
drivers/media/video/tuner-core.c | 2 +-
drivers/media/video/via-camera.c | 2 +-
drivers/media/video/zoran/zoran_device.c | 2 +-
drivers/memstick/host/r592.c | 2 +-
drivers/misc/apds990x.c | 4 +-
drivers/misc/iwmc3200top/main.c | 8 +-
drivers/mmc/core/core.c | 4 +-
drivers/mmc/host/atmel-mci.c | 28 +++---
drivers/mmc/host/davinci_mmc.c | 8 +-
drivers/mmc/host/pxamci.c | 4 +-
drivers/mmc/host/tifm_sd.c | 4 +-
drivers/mmc/host/vub300.c | 42 ++++----
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 2 +-
drivers/mtd/nand/pxa3xx_nand.c | 4 +-
drivers/mtd/nand/r852.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 6 +-
drivers/net/ethernet/brocade/bna/bfa_ioc.c | 6 +-
drivers/net/ethernet/intel/ixgb/ixgb_ee.c | 8 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 2 +-
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 18 ++--
drivers/net/phy/broadcom.c | 4 +-
drivers/net/wireless/ath/ath5k/ani.c | 8 +-
drivers/net/wireless/ath/ath9k/ani.c | 12 +--
drivers/net/wireless/ath/ath9k/hw-ops.h | 2 +-
drivers/net/wireless/ath/ath9k/hw.c | 5 +-
drivers/net/wireless/b43/dma.c | 4 +-
drivers/net/wireless/b43/main.c | 6 +-
drivers/net/wireless/b43/phy_n.c | 2 +-
drivers/net/wireless/b43/pio.c | 2 +-
drivers/net/wireless/b43legacy/dma.c | 4 +-
drivers/net/wireless/b43legacy/main.c | 6 +-
.../net/wireless/brcm80211/brcmfmac/dhd_linux.c | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 15 ++--
drivers/net/wireless/brcm80211/brcmsmac/channel.c | 2 +-
drivers/net/wireless/brcm80211/brcmsmac/main.c | 4 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 12 +-
.../net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 2 +-
drivers/net/wireless/iwlegacy/4965-mac.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 4 +-
drivers/net/wireless/iwmc3200wifi/commands.c | 2 +-
drivers/net/wireless/mwl8k.c | 4 +-
drivers/net/wireless/rtlwifi/base.c | 4 +-
drivers/net/wireless/rtlwifi/core.c | 2 +-
drivers/net/wireless/rtlwifi/efuse.c | 2 +-
drivers/net/wireless/rtlwifi/ps.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 10 +-
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 16 ++--
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 8 +-
drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/fw.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 16 ++--
drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 10 +-
drivers/net/wireless/rtlwifi/rtl8192de/rf.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192se/fw.c | 6 +-
drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 14 ++--
drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 12 +-
drivers/net/wireless/rtlwifi/rtl8192se/rf.c | 2 +-
drivers/pci/hotplug/cpqphp_core.c | 2 +-
drivers/pci/pci.c | 4 +-
drivers/pcmcia/yenta_socket.c | 2 +-
drivers/platform/x86/asus-wmi.c | 2 +-
drivers/platform/x86/eeepc-wmi.c | 4 +-
drivers/platform/x86/intel_rar_register.c | 10 +-
drivers/platform/x86/msi-laptop.c | 4 +-
drivers/platform/x86/thinkpad_acpi.c | 2 +-
drivers/platform/x86/toshiba_acpi.c | 2 +-
drivers/power/da9030_battery.c | 4 +-
drivers/regulator/core.c | 2 +-
drivers/regulator/db8500-prcmu.c | 2 +-
drivers/regulator/max8952.c | 6 +-
drivers/regulator/max8997.c | 4 +-
drivers/rtc/rtc-isl12022.c | 2 +-
drivers/rtc/rtc-pm8xxx.c | 2 +-
drivers/s390/char/raw3270.c | 2 +-
drivers/s390/scsi/zfcp_scsi.c | 2 +-
drivers/scsi/aha1542.c | 2 +-
drivers/scsi/cxgbi/libcxgbi.c | 4 +-
drivers/scsi/dc395x.c | 2 +-
drivers/scsi/hpsa.c | 2 +-
drivers/scsi/isci/host.c | 2 +-
drivers/scsi/isci/isci.h | 6 +-
drivers/scsi/isci/port.c | 4 +-
drivers/scsi/isci/port_config.c | 2 +-
drivers/scsi/lpfc/lpfc_sli.c | 6 +-
drivers/scsi/nsp32.c | 8 +-
drivers/scsi/pcmcia/nsp_cs.c | 2 +-
drivers/scsi/vmw_pvscsi.c | 10 +-
drivers/sh/maple/maple.c | 6 +-
drivers/spi/spi-fsl-spi.c | 12 +-
drivers/spi/spi-ti-ssp.c | 4 +-
drivers/ssb/main.c | 6 +-
drivers/ssb/pcmcia.c | 6 +-
drivers/staging/comedi/comedi_fops.c | 4 +-
drivers/staging/cptm1217/clearpad_tm1217.c | 8 +-
drivers/staging/crystalhd/crystalhd_hw.c | 8 +-
drivers/staging/et131x/et131x.c | 4 +-
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c | 2 +-
drivers/staging/ft1000/ft1000-usb/ft1000_hw.c | 22 ++--
drivers/staging/hv/storvsc_drv.c | 2 +-
drivers/staging/iio/accel/lis3l02dq_ring.c | 2 +-
drivers/staging/iio/accel/sca3000_ring.c | 4 +-
drivers/staging/iio/dac/ad5686.c | 2 +-
drivers/staging/iio/iio_dummy_evgen.c | 2 +-
drivers/staging/iio/magnetometer/ak8975.c | 2 +-
drivers/staging/media/easycap/easycap_ioctl.c | 2 +-
drivers/staging/media/lirc/lirc_igorplugusb.c | 2 +-
drivers/staging/media/lirc/lirc_serial.c | 14 ++--
drivers/staging/mei/interrupt.c | 2 +-
drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
drivers/staging/quatech_usb2/quatech_usb2.c | 12 +-
drivers/staging/rtl8187se/r8180_core.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 10 +-
.../staging/rtl8192e/rtl8192e/r8192E_firmware.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 8 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 22 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 16 ++--
drivers/staging/rtl8192e/rtl819x_TSProc.c | 4 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 18 ++--
drivers/staging/rtl8192e/rtllib_tx.c | 2 +-
drivers/staging/rtl8192e/rtllib_wx.c | 2 +-
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 2 +-
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 10 +-
.../staging/rtl8192u/ieee80211/rtl819x_TSProc.c | 4 +-
drivers/staging/rtl8192u/r8192U_core.c | 4 +-
drivers/staging/rtl8192u/r8192U_dm.c | 6 +-
drivers/staging/rtl8192u/r819xU_firmware.c | 2 +-
drivers/staging/rtl8192u/r819xU_phy.c | 2 +-
drivers/staging/sep/sep_driver.c | 14 ++--
drivers/staging/tidspbridge/dynload/cload.c | 4 +-
drivers/staging/tidspbridge/dynload/reloc.c | 6 +-
drivers/staging/tidspbridge/rmgr/drv_interface.c | 2 +-
drivers/staging/tidspbridge/rmgr/mgr.c | 4 +-
drivers/staging/vt6655/baseband.c | 4 +-
drivers/staging/vt6655/bssdb.c | 40 ++++----
drivers/staging/vt6655/card.c | 8 +-
drivers/staging/vt6655/channel.c | 16 ++--
drivers/staging/vt6655/datarate.c | 6 +-
drivers/staging/vt6655/device_main.c | 60 +++++-----
drivers/staging/vt6655/dpc.c | 34 +++----
drivers/staging/vt6655/hostap.c | 27 +----
drivers/staging/vt6655/key.c | 42 ++++----
drivers/staging/vt6655/mac.c | 4 +-
drivers/staging/vt6655/power.c | 8 +-
drivers/staging/vt6655/rf.c | 2 +-
drivers/staging/vt6655/rxtx.c | 64 ++++++------
drivers/staging/vt6655/vntwifi.c | 6 +-
drivers/staging/vt6655/wcmd.c | 22 ++--
drivers/staging/vt6655/wctl.c | 6 +-
drivers/staging/vt6655/wmgr.c | 113 +++++++++-----------
drivers/staging/vt6655/wpa.c | 2 +-
drivers/staging/vt6655/wpa2.c | 4 +-
drivers/staging/vt6655/wpactl.c | 30 +-----
drivers/staging/zcache/zcache-main.c | 6 +-
drivers/target/iscsi/iscsi_target.c | 4 +-
drivers/target/target_core_transport.c | 2 +-
drivers/tty/synclink_gt.c | 2 +-
drivers/tty/synclinkmp.c | 2 +-
drivers/usb/class/usbtmc.c | 6 +-
drivers/usb/core/hub.c | 6 +-
drivers/usb/gadget/amd5536udc.c | 6 +-
drivers/usb/gadget/ether.c | 2 +-
drivers/usb/gadget/f_eem.c | 2 +-
drivers/usb/gadget/f_hid.c | 6 +-
drivers/usb/gadget/file_storage.c | 2 +-
drivers/usb/gadget/mv_udc_core.c | 4 +-
drivers/usb/gadget/net2272.c | 2 +-
drivers/usb/gadget/net2280.c | 8 +-
drivers/usb/gadget/omap_udc.c | 4 +-
drivers/usb/gadget/zero.c | 2 +-
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ohci-hcd.c | 4 +-
drivers/usb/host/u132-hcd.c | 2 +-
drivers/usb/host/whci/qset.c | 2 +-
drivers/usb/host/xhci.c | 2 +-
drivers/usb/misc/ftdi-elan.c | 2 +-
drivers/usb/misc/iowarrior.c | 2 +-
drivers/usb/musb/cppi_dma.c | 2 +-
drivers/usb/musb/musb_core.c | 2 +-
drivers/usb/serial/iuu_phoenix.c | 8 +-
drivers/usb/serial/mos7840.c | 4 +-
drivers/usb/serial/safe_serial.c | 4 +-
drivers/usb/usb-skeleton.c | 10 +-
drivers/video/aty/aty128fb.c | 2 +-
drivers/video/aty/atyfb_base.c | 4 +-
drivers/video/aty/radeon_base.c | 36 +++---
drivers/video/cirrusfb.c | 2 +-
drivers/video/hgafb.c | 2 +-
drivers/video/i810/i810_main.c | 10 +-
drivers/video/intelfb/intelfbdrv.c | 16 ++--
drivers/video/neofb.c | 10 +-
drivers/video/omap/omapfb_main.c | 4 +-
drivers/video/omap2/displays/panel-taal.c | 4 +-
drivers/video/omap2/dss/dispc.c | 6 +-
drivers/video/omap2/dss/dsi.c | 2 +-
drivers/video/omap2/omapfb/omapfb-main.c | 6 +-
drivers/video/omap2/vram.c | 2 +-
drivers/video/pm2fb.c | 8 +-
drivers/video/pm3fb.c | 4 +-
drivers/video/riva/fbdev.c | 12 +-
drivers/video/sstfb.c | 14 ++--
drivers/video/tdfxfb.c | 2 +-
drivers/video/udlfb.c | 6 +-
drivers/video/uvesafb.c | 12 +-
drivers/video/vfb.c | 8 +-
drivers/watchdog/mpc8xxx_wdt.c | 2 +-
fs/binfmt_elf.c | 4 +-
fs/btrfs/delayed-inode.c | 12 +-
fs/cifs/cifssmb.c | 4 +-
fs/cifs/connect.c | 106 +++++++++---------
fs/cifs/file.c | 2 +-
fs/cifs/sess.c | 2 +-
fs/exofs/super.c | 2 +-
fs/ioctl.c | 2 +-
fs/nfs/callback_proc.c | 2 +-
fs/nfs/client.c | 4 +-
fs/nfs/nfs4proc.c | 2 +-
fs/nfs/objlayout/objio_osd.c | 2 +-
fs/nfsd/nfs4proc.c | 4 +-
fs/nfsd/nfs4xdr.c | 2 +-
fs/nfsd/vfs.c | 2 +-
include/linux/ata.h | 6 +-
kernel/irq/spurious.c | 2 +-
kernel/printk.c | 10 +-
kernel/sched/core.c | 2 +-
kernel/sysctl.c | 6 +-
kernel/trace/trace.c | 2 +-
lib/vsprintf.c | 4 +-
net/unix/garbage.c | 2 +-
security/apparmor/lsm.c | 8 +-
security/integrity/ima/ima_policy.c | 2 +-
security/selinux/ss/mls.c | 2 +-
security/selinux/ss/services.c | 2 +-
security/tomoyo/common.c | 2 +-
sound/core/oss/pcm_oss.c | 2 +-
sound/drivers/dummy.c | 4 +-
sound/drivers/opl3/opl3_seq.c | 2 +-
sound/drivers/pcsp/pcsp.c | 2 +-
sound/isa/opti9xx/miro.c | 2 +-
sound/oss/ad1848.c | 2 +-
sound/oss/pas2_card.c | 6 +-
sound/oss/pss.c | 6 +-
sound/oss/trix.c | 2 +-
sound/pci/asihpi/asihpi.c | 2 +-
sound/pci/atiixp.c | 2 +-
sound/pci/azt3328.c | 18 ++--
sound/pci/hda/hda_intel.c | 4 +-
sound/pci/hda/patch_via.c | 2 +-
sound/pci/nm256/nm256.c | 4 +-
sound/pci/oxygen/xonar_pcm179x.c | 2 +-
sound/pci/sis7019.c | 2 +-
sound/ppc/powermac.c | 2 +-
sound/sh/aica.c | 2 +-
sound/soc/codecs/cs4271.c | 4 +-
sound/soc/codecs/sgtl5000.c | 4 +-
sound/soc/davinci/davinci-i2s.c | 2 +-
sound/soc/fsl/fsl_dma.c | 4 +-
sound/soc/omap/ams-delta.c | 6 +-
sound/soc/omap/omap-dmic.c | 4 +-
sound/soc/omap/omap-mcbsp.c | 2 +-
sound/soc/soc-core.c | 4 +-
sound/usb/card.c | 2 +-
tools/perf/builtin-record.c | 2 +-
tools/perf/builtin-report.c | 2 +-
tools/perf/util/probe-event.c | 2 +-
--

410 files changed, 1201 insertions(+), 1267 deletions(-)
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index e159d69..925cacd 100644
--- a/arch/arm/mach-cns3xxx/pcie.c
+++ b/arch/arm/mach-cns3xxx/pcie.c
@@ -295,7 +295,7 @@ static void __init cns3xxx_pcie_check_link(struct cns3xxx_pcie *cnspci)
reg = __raw_readl(MISC_PCIE_PM_DEBUG(port));
if (reg & 0x1) {
pr_info("Link up.\n");
- cnspci->linked = 1;
+ cnspci->linked = true;
break;
} else if (time_after(jiffies, time + 50)) {
pr_info("Device not found.\n");
diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.c b/arch/arm/mach-omap2/cm2xxx_3xxx.c
index 04d39cd..3f1fdec 100644
--- a/arch/arm/mach-omap2/cm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/cm2xxx_3xxx.c
@@ -87,7 +87,7 @@ static void _write_clktrctrl(u8 c, s16 module, u32 mask)
bool omap2_cm_is_clkdm_in_hwsup(s16 module, u32 mask)
{
u32 v;
- bool ret = 0;
+ bool ret = false;

BUG_ON(!cpu_is_omap24xx() && !cpu_is_omap34xx());

diff --git a/arch/arm/plat-spear/padmux.c b/arch/arm/plat-spear/padmux.c
index 555eec6..c1cd947 100644
--- a/arch/arm/plat-spear/padmux.c
+++ b/arch/arm/plat-spear/padmux.c
@@ -94,7 +94,7 @@ static int pmx_devs_enable(struct pmx_dev **devs, u8 count)
break;
}
}
- if (found == false) {
+ if (!found) {
printk(KERN_ERR "%s device not available in %s"\
"mode\n", devs[i]->name,
pmx->active_mode->name);
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index bb6c988..495d1e1 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -275,9 +275,9 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
vcpu->arch.shared->srr0 = vcpu->arch.pc;
vcpu->arch.shared->srr1 = vcpu->arch.shared->msr;
vcpu->arch.pc = vcpu->arch.ivpr | vcpu->arch.ivor[priority];
- if (update_esr == true)
+ if (update_esr)
vcpu->arch.esr = vcpu->arch.queued_esr;
- if (update_dear == true)
+ if (update_dear)
vcpu->arch.shared->dar = vcpu->arch.queued_dear;
kvmppc_set_msr(vcpu, vcpu->arch.shared->msr & msr_mask);

diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index 69f2490..9eba7bf 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -427,7 +427,7 @@ unsigned long arch_align_stack(unsigned long sp)
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack_page, sp, ip;
- bool seen_sched = 0;
+ bool seen_sched = false;

if ((p == NULL) || (p == current) || (p->state == TASK_RUNNING))
return 0;
@@ -449,7 +449,7 @@ unsigned long get_wchan(struct task_struct *p)
ip = *((unsigned long *) sp);
if (in_sched_functions(ip))
/* Ignore everything until we're above the scheduler */
- seen_sched = 1;
+ seen_sched = true;
else if (kernel_text_address(ip) && seen_sched)
return ip;

diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index f76623c..e39b0d1 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -389,11 +389,11 @@ static int apm_disabled = -1;
#ifdef CONFIG_SMP
static bool power_off;
#else
-static bool power_off = 1;
+static bool power_off = true;
#endif
static bool realmode_power_off;
#ifdef CONFIG_APM_ALLOW_INTS
-static bool allow_ints = 1;
+static bool allow_ints = true;
#else
static bool allow_ints;
#endif
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index d43cad7..d0927aa 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -496,7 +496,7 @@ out:
c->phys_proc_id);
printk(KERN_INFO "CPU: Processor Core ID: %d\n",
c->cpu_core_id);
- printed = 1;
+ printed = true;
}
#endif
}
diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
index 4397e98..91bee70 100644
--- a/arch/x86/kernel/cpu/topology.c
+++ b/arch/x86/kernel/cpu/topology.c
@@ -92,7 +92,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
if (c->x86_max_cores > 1)
printk(KERN_INFO "CPU: Processor Core ID: %d\n",
c->cpu_core_id);
- printed = 1;
+ printed = true;
}
return;
#endif
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 224b02c..e2009b6 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -74,7 +74,7 @@ enum {
#endif

#ifdef MMU_DEBUG
-static bool dbg = 0;
+static bool dbg = false;
module_param(dbg, bool, 0644);
#endif

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d29216c..afb8b76 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -51,29 +51,29 @@
MODULE_AUTHOR("Qumranet");
MODULE_LICENSE("GPL");

-static bool __read_mostly enable_vpid = 1;
+static bool __read_mostly enable_vpid = true;
module_param_named(vpid, enable_vpid, bool, 0444);

-static bool __read_mostly flexpriority_enabled = 1;
+static bool __read_mostly flexpriority_enabled = true;
module_param_named(flexpriority, flexpriority_enabled, bool, S_IRUGO);

-static bool __read_mostly enable_ept = 1;
+static bool __read_mostly enable_ept = true;
module_param_named(ept, enable_ept, bool, S_IRUGO);

-static bool __read_mostly enable_unrestricted_guest = 1;
+static bool __read_mostly enable_unrestricted_guest = true;
module_param_named(unrestricted_guest,
enable_unrestricted_guest, bool, S_IRUGO);

-static bool __read_mostly emulate_invalid_guest_state = 0;
+static bool __read_mostly emulate_invalid_guest_state = false;
module_param(emulate_invalid_guest_state, bool, S_IRUGO);

-static bool __read_mostly vmm_exclusive = 1;
+static bool __read_mostly vmm_exclusive = true;
module_param(vmm_exclusive, bool, S_IRUGO);

-static bool __read_mostly yield_on_hlt = 1;
+static bool __read_mostly yield_on_hlt = true;
module_param(yield_on_hlt, bool, S_IRUGO);

-static bool __read_mostly fasteoi = 1;
+static bool __read_mostly fasteoi = true;
module_param(fasteoi, bool, S_IRUGO);

/*
@@ -81,7 +81,7 @@ module_param(fasteoi, bool, S_IRUGO);
* VMX and be a hypervisor for its own guests. If nested=0, guests may not
* use VMX instructions.
*/
-static bool __read_mostly nested = 0;
+static bool __read_mostly nested = false;
module_param(nested, bool, S_IRUGO);

#define KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST \
@@ -2617,19 +2617,19 @@ static __init int hardware_setup(void)
kvm_enable_efer_bits(EFER_NX);

if (!cpu_has_vmx_vpid())
- enable_vpid = 0;
+ enable_vpid = false;

if (!cpu_has_vmx_ept() ||
!cpu_has_vmx_ept_4levels()) {
- enable_ept = 0;
- enable_unrestricted_guest = 0;
+ enable_ept = false;
+ enable_unrestricted_guest = false;
}

if (!cpu_has_vmx_unrestricted_guest())
- enable_unrestricted_guest = 0;
+ enable_unrestricted_guest = false;

if (!cpu_has_vmx_flexpriority())
- flexpriority_enabled = 0;
+ flexpriority_enabled = false;

if (!cpu_has_vmx_tpr_shadow())
kvm_x86_ops->update_cr8_intercept = NULL;
@@ -2672,7 +2672,7 @@ static void enter_pmode(struct kvm_vcpu *vcpu)
unsigned long flags;
struct vcpu_vmx *vmx = to_vmx(vcpu);

- vmx->emulation_required = 1;
+ vmx->emulation_required = true;
vmx->rmode.vm86_active = 0;

vmx_segment_cache_clear(vmx);
@@ -2752,7 +2752,7 @@ static void enter_rmode(struct kvm_vcpu *vcpu)
if (enable_unrestricted_guest)
return;

- vmx->emulation_required = 1;
+ vmx->emulation_required = true;
vmx->rmode.vm86_active = 1;

/*
@@ -3698,7 +3698,7 @@ static u32 vmx_secondary_exec_control(struct vcpu_vmx *vmx)
exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
if (!enable_ept) {
exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
- enable_unrestricted_guest = 0;
+ enable_unrestricted_guest = false;
}
if (!enable_unrestricted_guest)
exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
@@ -3926,7 +3926,7 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
ret = 0;

/* HACK: Don't enable emulation on guest boot/reset */
- vmx->emulation_required = 0;
+ vmx->emulation_required = false;

out:
return ret;
@@ -4899,7 +4899,7 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
schedule();
}

- vmx->emulation_required = 0;
+ vmx->emulation_required = false;
out:
return ret;
}
@@ -5855,9 +5855,9 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)

if (!is_guest_mode(vcpu) && (exit_reason == EXIT_REASON_VMLAUNCH ||
exit_reason == EXIT_REASON_VMRESUME))
- vmx->nested.nested_run_pending = 1;
+ vmx->nested.nested_run_pending = true;
else
- vmx->nested.nested_run_pending = 0;
+ vmx->nested.nested_run_pending = false;

if (is_guest_mode(vcpu) && nested_vmx_exit_handled(vcpu)) {
nested_vmx_vmexit(vcpu);
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9cbfc06..c9c4092 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -88,7 +88,7 @@ static void process_nmi(struct kvm_vcpu *vcpu);
struct kvm_x86_ops *kvm_x86_ops;
EXPORT_SYMBOL_GPL(kvm_x86_ops);

-static bool ignore_msrs = 0;
+static bool ignore_msrs = false;
module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR);

bool kvm_has_tsc_control;
@@ -5135,7 +5135,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
int r;
bool req_int_win = !irqchip_in_kernel(vcpu->kvm) &&
vcpu->run->request_interrupt_window;
- bool req_immediate_exit = 0;
+ bool req_immediate_exit = false;

if (vcpu->requests) {
if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu))
diff --git a/arch/x86/platform/geode/alix.c b/arch/x86/platform/geode/alix.c
index dc5f1d3..361e638 100644
--- a/arch/x86/platform/geode/alix.c
+++ b/arch/x86/platform/geode/alix.c
@@ -27,7 +27,7 @@

#include <asm/geode.h>

-static bool force = 0;
+static bool force = false;
module_param(force, bool, 0444);
/* FIXME: Award bios is not automatically detected as Alix platform */
MODULE_PARM_DESC(force, "Force detection as ALIX.2/ALIX.3 platform");
diff --git a/arch/x86/platform/iris/iris.c b/arch/x86/platform/iris/iris.c
index 5917eb5..480e1af 100644
--- a/arch/x86/platform/iris/iris.c
+++ b/arch/x86/platform/iris/iris.c
@@ -65,7 +65,7 @@ static void iris_power_off(void)
static int iris_init(void)
{
unsigned char status;
- if (force != 1) {
+ if (!force) {
printk(KERN_ERR "The force parameter has not been set to 1 so the Iris poweroff handler will not be installed.\n");
return -ENODEV;
}
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
index 1d4c783..122399b 100644
--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
@@ -376,7 +376,7 @@ static int __devinit setup_lid_events(void)
gpio_direction_input(OLPC_GPIO_LID);

cs5535_gpio_clear(OLPC_GPIO_LID, GPIO_INPUT_INVERT);
- lid_inverted = 0;
+ lid_inverted = false;

/* Clear edge detection and event enable for now */
cs5535_gpio_clear(OLPC_GPIO_LID, GPIO_EVENTS_ENABLE);
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index ef5356c..056d9ff 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -56,7 +56,7 @@ static int hash_sendmsg(struct kiocb *unused, struct socket *sock,
goto unlock;
}

- ctx->more = 0;
+ ctx->more = false;

for (iov = msg->msg_iov, iovlen = msg->msg_iovlen; iovlen > 0;
iovlen--, iov++) {
@@ -163,7 +163,7 @@ static int hash_recvmsg(struct kiocb *unused, struct socket *sock,

lock_sock(sk);
if (ctx->more) {
- ctx->more = 0;
+ ctx->more = false;
ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0);
err = af_alg_wait_for_completion(crypto_ahash_final(&ctx->req),
&ctx->completion);
@@ -202,7 +202,7 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags)
sk2 = newsock->sk;
ask2 = alg_sk(sk2);
ctx2 = ask2->private;
- ctx2->more = 1;
+ ctx2->more = true;

err = crypto_ahash_import(&ctx2->req, state);
if (err) {
@@ -281,7 +281,7 @@ static int hash_accept_parent(void *private, struct sock *sk)
memset(ctx->result, 0, ds);

ctx->len = len;
- ctx->more = 0;
+ ctx->more = false;
af_alg_init_completion(&ctx->completion);

ask->private = ctx;
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 6a6dfc0..aa8b80f 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -135,7 +135,7 @@ static void skcipher_pull_sgl(struct sock *sk, int used)
}

if (!ctx->used)
- ctx->merge = 0;
+ ctx->merge = false;
}

static void skcipher_free_sgl(struct sock *sk)
@@ -250,7 +250,7 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock,
struct skcipher_sg_list *sgl;
struct af_alg_control con = {};
long copied = 0;
- bool enc = 0;
+ bool enc = false;
int err;
int i;

@@ -261,10 +261,10 @@ static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock,

switch (con.op) {
case ALG_OP_ENCRYPT:
- enc = 1;
+ enc = true;
break;
case ALG_OP_DECRYPT:
- enc = 0;
+ enc = false;
break;
default:
return -EINVAL;
@@ -395,7 +395,7 @@ static ssize_t skcipher_sendpage(struct socket *sock, struct page *page,
if (err)
goto unlock;

- ctx->merge = 0;
+ ctx->merge = false;
sgl = list_entry(ctx->tsgl.prev, struct skcipher_sg_list, list);

get_page(page);
@@ -590,9 +590,9 @@ static int skcipher_accept_parent(void *private, struct sock *sk)
INIT_LIST_HEAD(&ctx->tsgl);
ctx->len = len;
ctx->used = 0;
- ctx->more = 0;
- ctx->merge = 0;
- ctx->enc = 0;
+ ctx->more = false;
+ ctx->merge = false;
+ ctx->enc = false;
af_alg_init_completion(&ctx->completion);

ask->private = ctx;
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 7f00cf3..a76d990 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -199,7 +199,7 @@ err:

static int __init setup_hest_disable(char *str)
{
- hest_disable = 1;
+ hest_disable = true;
return 0;
}

@@ -242,5 +242,5 @@ void __init acpi_hest_init(void)
pr_info(HEST_PFX "Table parsing has been initialized.\n");
return;
err:
- hest_disable = 1;
+ hest_disable = true;
}
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 88eb143..61b1387 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -43,7 +43,7 @@ MODULE_AUTHOR("Kristen Carlson Accardi");
MODULE_DESCRIPTION(ACPI_DOCK_DRIVER_DESCRIPTION);
MODULE_LICENSE("GPL");

-static bool immediate_undock = 1;
+static bool immediate_undock = true;
module_param(immediate_undock, bool, 0644);
MODULE_PARM_DESC(immediate_undock, "1 (default) will cause the driver to "
"undock immediately when the undock button is pressed, 0 will cause"
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index c850de4..7aaa0b1 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -356,7 +356,7 @@ void __cpuinit acpi_processor_set_pdc(acpi_handle handle)
static acpi_status __init
early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv)
{
- if (processor_physically_present(handle) == false)
+ if (!processor_physically_present(handle))
return AE_OK;

acpi_processor_set_pdc(handle);
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index eaef02a..7b88c7a 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -69,7 +69,7 @@ MODULE_AUTHOR("Bruno Ducrot");
MODULE_DESCRIPTION("ACPI Video Driver");
MODULE_LICENSE("GPL");

-static bool brightness_switch_enabled = 1;
+static bool brightness_switch_enabled = true;
module_param(brightness_switch_enabled, bool, 0644);

/*
@@ -83,7 +83,7 @@ module_param(allow_duplicates, bool, 0644);
* Some BIOSes claim they use minimum backlight at boot,
* and this may bring dimming screen after boot
*/
-static bool use_bios_initial_backlight = 1;
+static bool use_bios_initial_backlight = true;
module_param(use_bios_initial_backlight, bool, 0644);

static int register_count = 0;
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f3f0fe7..57f69b6 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -155,7 +155,7 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
&caps, NULL);
/* There might be boot param flags set already... */
acpi_video_support |= caps;
- acpi_video_caps_checked = 1;
+ acpi_video_caps_checked = true;
/* Add blacklists here. Be careful to use the right *DMI* bits
* to still be able to override logic via boot params, e.g.:
*
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 55d6179..9a184fc 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -600,7 +600,7 @@ MODULE_DEVICE_TABLE(pci, nv_pci_tbl);
MODULE_VERSION(DRV_VERSION);

static bool adma_enabled;
-static bool swncq_enabled = 1;
+static bool swncq_enabled = true;
static bool msi_enabled;

static void nv_adma_register_mode(struct ata_port *ap)
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index b182c2f..4ac8f61 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -116,8 +116,8 @@ static bool disable64;
static short nvpibits = -1;
static short nvcibits = -1;
static short rx_skb_reserve = 16;
-static bool irq_coalesce = 1;
-static bool sdh = 0;
+static bool irq_coalesce = true;
+static bool sdh = false;

/* Read from EEPROM = 0000 0011b */
static unsigned int readtab[] = {
@@ -1080,7 +1080,7 @@ he_start(struct atm_dev *dev)
else
gen_cntl_0 &= ~ENBL_64;

- if (disable64 == 1) {
+ if (disable64) {
hprintk("disabling 64-bit pci bus transfers\n");
gen_cntl_0 &= ~ENBL_64;
}
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index b0f553b..172a0fd 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3453,7 +3453,7 @@ static inline int interrupt_pending(ctlr_info_t *h)

static inline long interrupt_not_for_us(ctlr_info_t *h)
{
- return ((h->access.intr_pending(h) == 0) ||
+ return ((!h->access.intr_pending(h)) ||
(h->interrupts_enabled == 0));
}

diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 831e3ac..3e620ca 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -126,7 +126,7 @@
*/
#include <linux/types.h>

-static bool verbose = 0;
+static bool verbose = false;
static int major = PD_MAJOR;
static char *name = PD_NAME;
static int cluster = 64;
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index ec8f9ed..5c230e7 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -126,7 +126,7 @@

*/

-static bool verbose = 0;
+static bool verbose = false;
static int major = PF_MAJOR;
static char *name = PF_NAME;
static int cluster = 64;
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 4a27b1d..c17f959 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -137,7 +137,7 @@

*/

-static bool verbose = 0;
+static bool verbose = false;
static int major = PG_MAJOR;
static char *name = PG_NAME;
static int disable = 0;
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 2596042..c939456 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -117,7 +117,7 @@

*/

-static bool verbose = 0;
+static bool verbose = false;
static int major = PT_MAJOR;
static char *name = PT_NAME;
static int disable = 0;
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index 51a9727..fa4664b 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -1026,7 +1026,7 @@ static void __init do_xd_setup (int *integers)
{
switch (integers[0]) {
case 4: if (integers[4] < 0)
- nodma = 1;
+ nodma = true;
else if (integers[4] < 8)
xd_dma = integers[4];
case 3: if ((integers[3] > 0) && (integers[3] <= 0x3FC))
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index f00f596..ffe2331 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -43,7 +43,7 @@ static bool ignore_sniffer;
static bool disable_scofix;
static bool force_scofix;

-static bool reset = 1;
+static bool reset = true;

static struct usb_driver btusb_driver;

diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index a767d4de..8eb7c03 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -49,8 +49,8 @@

#define VERSION "0.3"

-static bool txcrc = 1;
-static bool hciextn = 1;
+static bool txcrc = true;
+static bool hciextn = true;

#define BCSP_TXWINSIZE 4

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 0711448..af2964f 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -48,7 +48,7 @@

#define VERSION "2.2"

-static bool reset = 0;
+static bool reset = false;

static struct hci_uart_proto *hup[HCI_UART_MAX_PROTO];

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 55eaf47..0736ab6 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -289,13 +289,13 @@ static bool debug;
/* used to keep tray locked at all times */
static int keeplocked;
/* default compatibility mode */
-static bool autoclose=1;
+static bool autoclose=true;
static bool autoeject;
-static bool lockdoor = 1;
+static bool lockdoor = true;
/* will we ever get to use this... sigh. */
static bool check_media_type;
/* automatically restart mrw format */
-static bool mrw_format_restart = 1;
+static bool mrw_format_restart = true;
module_param(debug, bool, 0);
module_param(autoclose, bool, 0);
module_param(autoeject, bool, 0);
@@ -317,13 +317,13 @@ static const char *mrw_address_space[] = { "DMA", "GAA" };
#if (ERRLOGMASK!=CD_NOTHING)
#define cdinfo(type, fmt, args...) \
do { \
- if ((ERRLOGMASK & type) || debug == 1) \
+ if ((ERRLOGMASK & type) || debug) \
pr_info(fmt, ##args); \
} while (0)
#else
#define cdinfo(type, fmt, args...) \
do { \
- if (0 && (ERRLOGMASK & type) || debug == 1) \
+ if (0 && (ERRLOGMASK & type) || debug) \
pr_info(fmt, ##args); \
} while (0)
#endif
@@ -421,13 +421,13 @@ int register_cdrom(struct cdrom_device_info *cdi)
cdo->n_minors = 0;
cdi->options = CDO_USE_FFLAGS;

- if (autoclose==1 && CDROM_CAN(CDC_CLOSE_TRAY))
+ if (autoclose && CDROM_CAN(CDC_CLOSE_TRAY))
cdi->options |= (int) CDO_AUTO_CLOSE;
- if (autoeject==1 && CDROM_CAN(CDC_OPEN_TRAY))
+ if (autoeject && CDROM_CAN(CDC_OPEN_TRAY))
cdi->options |= (int) CDO_AUTO_EJECT;
- if (lockdoor==1)
+ if (lockdoor)
cdi->options |= (int) CDO_LOCK;
- if (check_media_type==1)
+ if (check_media_type)
cdi->options |= (int) CDO_CHECK_TYPE;

if (CDROM_CAN(CDC_MRW_W))
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index 444f8b6..cec2aea 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -33,7 +33,7 @@
#define ULI_X86_64_ENU_SCR_REG 0x54

static struct resource *aperture_resource;
-static bool __initdata agp_try_unsupported = 1;
+static bool __initdata agp_try_unsupported = true;
static int agp_bridges_found;

static void amd64_tlbflush(struct agp_memory *temp)
diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c
index 08704ae..22272eb 100644
--- a/drivers/char/agp/sis-agp.c
+++ b/drivers/char/agp/sis-agp.c
@@ -17,7 +17,7 @@
#define PCI_DEVICE_ID_SI_662 0x0662
#define PCI_DEVICE_ID_SI_671 0x0671

-static bool __devinitdata agp_sis_force_delay = 0;
+static bool __devinitdata agp_sis_force_delay = false;
static int __devinitdata agp_sis_agp_spec = -1;

static int sis_fetch_size(void)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 50fcf9c..d31847e 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1227,7 +1227,7 @@ static int smi_num; /* Used to sequence the SMIs */
#define DEFAULT_REGSPACING 1
#define DEFAULT_REGSIZE 1

-static bool si_trydefaults = 1;
+static bool si_trydefaults = true;
static char *si_type[SI_MAX_PARMS];
#define MAX_SI_TYPE_STR 30
static char si_type_str[MAX_SI_TYPE_STR];
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index f434856..f85749c 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -860,7 +860,7 @@ static int __init lp_setup (char *str)
} else if (!strcmp(str, "none")) {
parport_nr[parport_ptr++] = LP_PARPORT_NONE;
} else if (!strcmp(str, "reset")) {
- reset = 1;
+ reset = true;
}
return 1;
}
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 07f6a5a..fad19cb 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -439,7 +439,7 @@ static int mgslpc_device_count = 0;
* .text section address and breakpoint on module load.
* This is useful for use with gdb and add-symbol-file command.
*/
-static bool break_on_load=0;
+static bool break_on_load=false;

/*
* Driver major number, defaults to zero to get auto
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index a174862..2edff1a 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -369,7 +369,7 @@ static int probe_itpm(struct tpm_chip *chip)
size_t len = sizeof(cmd_getticks);
int rem_itpm = itpm;

- itpm = 0;
+ itpm = false;

rc = tpm_tis_send_data(chip, cmd_getticks, len);
if (rc == 0)
@@ -378,7 +378,7 @@ static int probe_itpm(struct tpm_chip *chip)
tpm_tis_ready(chip);
release_locality(chip, chip->vendor.locality, 0);

- itpm = 1;
+ itpm = true;

rc = tpm_tis_send_data(chip, cmd_getticks, len);
if (rc == 0) {
@@ -500,7 +500,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
return IRQ_HANDLED;
}

-static bool interrupts = 1;
+static bool interrupts = true;
module_param(interrupts, bool, 0444);
MODULE_PARM_DESC(interrupts, "Enable interrupts");

@@ -737,10 +737,10 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
if (pnp_irq_valid(pnp_dev, 0))
irq = pnp_irq(pnp_dev, 0);
else
- interrupts = 0;
+ interrupts = false;

if (is_itpm(pnp_dev))
- itpm = 1;
+ itpm = true;

return tpm_tis_init(&pnp_dev->dev, start, len, irq);
}
diff --git a/drivers/char/xilinx_hwicap/buffer_icap.c b/drivers/char/xilinx_hwicap/buffer_icap.c
index 05d8977..53c3882 100644
--- a/drivers/char/xilinx_hwicap/buffer_icap.c
+++ b/drivers/char/xilinx_hwicap/buffer_icap.c
@@ -270,7 +270,7 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,
int status;
s32 buffer_count = 0;
s32 num_writes = 0;
- bool dirty = 0;
+ bool dirty = false;
u32 i;
void __iomem *base_address = drvdata->base_address;

@@ -279,7 +279,7 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,

/* Copy data to bram */
buffer_icap_set_bram(base_address, buffer_count, data[i]);
- dirty = 1;
+ dirty = true;

if (buffer_count < XHI_MAX_BUFFER_INTS - 1) {
buffer_count++;
@@ -299,7 +299,7 @@ int buffer_icap_set_configuration(struct hwicap_drvdata *drvdata, u32 *data,

buffer_count = 0;
num_writes++;
- dirty = 0;
+ dirty = false;
}

/* Write unwritten data to ICAP */
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index e90e1c7..d14cca3 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -523,7 +523,7 @@ static int hwicap_open(struct inode *inode, struct file *file)
file->private_data = drvdata;
drvdata->write_buffer_in_use = 0;
drvdata->read_buffer_in_use = 0;
- drvdata->is_open = 1;
+ drvdata->is_open = true;

error:
mutex_unlock(&drvdata->sem);
@@ -556,7 +556,7 @@ static int hwicap_release(struct inode *inode, struct file *file)
goto error;

error:
- drvdata->is_open = 0;
+ drvdata->is_open = false;
mutex_unlock(&drvdata->sem);
return status;
}
@@ -600,7 +600,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
return -EBUSY;
}

- probed_devices[id] = 1;
+ probed_devices[id] = true;
mutex_unlock(&icap_sem);

devt = MKDEV(XHWICAP_MAJOR, XHWICAP_MINOR + id);
@@ -643,7 +643,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,
drvdata->config_regs = config_regs;

mutex_init(&drvdata->sem);
- drvdata->is_open = 0;
+ drvdata->is_open = false;

dev_info(dev, "ioremap %llx to %p with size %llx\n",
(unsigned long long) drvdata->mem_start,
@@ -672,7 +672,7 @@ static int __devinit hwicap_setup(struct device *dev, int id,

failed0:
mutex_lock(&icap_sem);
- probed_devices[id] = 0;
+ probed_devices[id] = false;
mutex_unlock(&icap_sem);

return retval;
@@ -709,7 +709,7 @@ static int __devexit hwicap_remove(struct device *dev)
dev_set_drvdata(dev, NULL);

mutex_lock(&icap_sem);
- probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = 0;
+ probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = false;
mutex_unlock(&icap_sem);
return 0; /* success */
}
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index e73cf2e..6d44efc 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -221,7 +221,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
struct aead_tfm *tfm = &aead->base.crt_aead;
struct caam_ctx *ctx = crypto_aead_ctx(aead);
struct device *jrdev = ctx->jrdev;
- bool keys_fit_inline = 0;
+ bool keys_fit_inline = false;
u32 *key_jump_cmd, *jump_cmd;
u32 geniv, moveiv;
u32 *desc;
@@ -236,7 +236,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_ENC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
- keys_fit_inline = 1;
+ keys_fit_inline = true;

/* aead_encrypt shared descriptor */
desc = ctx->sh_desc_enc;
@@ -294,7 +294,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_DEC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
- keys_fit_inline = 1;
+ keys_fit_inline = true;

desc = ctx->sh_desc_dec;

@@ -362,7 +362,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_GIVENC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
- keys_fit_inline = 1;
+ keys_fit_inline = true;

/* aead_givencrypt shared descriptor */
desc = ctx->sh_desc_givenc;
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 9b592b0..f2ccbee 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -173,7 +173,7 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
u32 cfghi = DWC_CFGH_FIFO_MODE;
u32 cfglo = DWC_CFGL_CH_PRIOR(dwc->priority);

- if (dwc->initialized == true)
+ if (dwc->initialized)
return;

if (dws) {
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 812fd76..5f4c390 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -1067,7 +1067,7 @@ static int sh_dmae_nmi_handler(struct notifier_block *self,
* handling or NMI events that don't concern the DMACs.
*/
triggered = sh_dmae_nmi_notify(shdev);
- if (triggered == true)
+ if (triggered)
ret = NOTIFY_OK;
}
rcu_read_unlock();
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index 2333810..75fb865 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -465,7 +465,7 @@ static struct dma_async_tx_descriptor *sirfsoc_dma_prep_interleaved(
* and ylen (number of frame - 1) must be at least 0
*/
if ((xt->frame_size == 1) && (xt->numf > 0)) {
- sdesc->cyclic = 0;
+ sdesc->cyclic = false;
sdesc->xlen = xt->sgl[0].size / SIRFSOC_DMA_WORD_LEN;
sdesc->width = (xt->sgl[0].size + xt->sgl[0].icg) /
SIRFSOC_DMA_WORD_LEN;
@@ -532,7 +532,7 @@ sirfsoc_dma_prep_cyclic(struct dma_chan *chan, dma_addr_t addr,
/* Place descriptor in prepared list */
spin_lock_irqsave(&schan->lock, iflags);
sdesc->addr = addr;
- sdesc->cyclic = 1;
+ sdesc->cyclic = true;
sdesc->xlen = 0;
sdesc->ylen = buf_len / SIRFSOC_DMA_WORD_LEN - 1;
sdesc->width = 1;
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 80e95aa..7909837 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -66,7 +66,7 @@
*
* Concurrent logins are useful together with cluster filesystems.
*/
-static bool sbp2_param_exclusive_login = 1;
+static bool sbp2_param_exclusive_login = true;
module_param_named(exclusive_login, sbp2_param_exclusive_login, bool, 0644);
MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device "
"(default = Y, use N for concurrent initiators)");
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ece03fc..66e56a3 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1271,7 +1271,7 @@ do_detailed_mode(struct detailed_timing *timing, void *c)

drm_mode_probed_add(closure->connector, newmode);
closure->modes++;
- closure->preferred = 0;
+ closure->preferred = false;
}
}

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index aada26f..ea75b12 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -280,7 +280,7 @@ void drm_fb_helper_restore(void)
{
bool ret;
ret = drm_fb_helper_force_kernel_mode();
- if (ret == true)
+ if (ret)
DRM_ERROR("Failed to restore crtc configuration\n");
}
EXPORT_SYMBOL(drm_fb_helper_restore);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index b6a737d..8cbd5a2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -742,7 +742,7 @@ static int fimd_power_on(struct fimd_context *ctx, bool enable)

DRM_DEBUG_KMS("%s\n", __FILE__);

- if (enable != false && enable != true)
+ if (enable && !enable)
return -EINVAL;

if (enable) {
diff --git a/drivers/gpu/drm/gma500/oaktrail_lvds.c b/drivers/gpu/drm/gma500/oaktrail_lvds.c
index 238bbe1..5a3c41b 100644
--- a/drivers/gpu/drm/gma500/oaktrail_lvds.c
+++ b/drivers/gpu/drm/gma500/oaktrail_lvds.c
@@ -376,7 +376,7 @@ void oaktrail_lvds_init(struct drm_device *dev,
mode_dev->panel_wants_dither = (dev_priv->gct_data.
Panel_Port_Control & MRST_PANEL_8TO6_DITHER_ENABLE);
if (dev_priv->lvds_dither)
- mode_dev->panel_wants_dither = 1;
+ mode_dev->panel_wants_dither = true;

/*
* LVDS discovery:
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index 9402569..f5ec2f9 100644
--- a/drivers/gpu/drm/gma500/power.c
+++ b/drivers/gpu/drm/gma500/power.c
@@ -101,7 +101,7 @@ static void gma_resume_display(struct pci_dev *pdev)
struct drm_device *dev = pci_get_drvdata(pdev);
struct drm_psb_private *dev_priv = dev->dev_private;

- if (dev_priv->suspended == false)
+ if (!dev_priv->suspended)
return;

/* turn on the display power island */
@@ -259,7 +259,7 @@ bool gma_power_begin(struct drm_device *dev, bool force_on)
spin_unlock_irqrestore(&power_ctrl_lock, flags);
return true;
}
- if (force_on == false)
+ if (!force_on)
goto out_false;

/* Ok power up needed */
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index 88b4297..962ecd9 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -2578,8 +2578,7 @@ bool psb_intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
if (!psb_intel_sdvo_get_capabilities(psb_intel_sdvo, &psb_intel_sdvo->caps))
goto err;

- if (psb_intel_sdvo_output_setup(psb_intel_sdvo,
- psb_intel_sdvo->caps.output_flags) != true) {
+ if (!psb_intel_sdvo_output_setup(psb_intel_sdvo, psb_intel_sdvo->caps.output_flags)) {
DRM_DEBUG_KMS("SDVO output failed to setup on SDVO%c\n",
IS_SDVOB(sdvo_reg) ? 'B' : 'C');
goto err;
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 308f819..acd0c0e 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -440,7 +440,7 @@ static int i915_drm_freeze(struct drm_device *dev)
intel_opregion_fini(dev);

/* Modeset on resume, not lid events */
- dev_priv->modeset_on_lid = 0;
+ dev_priv->modeset_on_lid = false;

return 0;
}
@@ -512,7 +512,7 @@ static int i915_drm_thaw(struct drm_device *dev)

intel_opregion_init(dev);

- dev_priv->modeset_on_lid = 0;
+ dev_priv->modeset_on_lid = false;

return error;
}
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 63880e2..675adbd 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -237,7 +237,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
}

if (downclock < panel_dvo_timing->clock && i915_lvds_downclock) {
- dev_priv->lvds_downclock_avail = 1;
+ dev_priv->lvds_downclock_avail = true;
dev_priv->lvds_downclock = downclock * 10;
DRM_DEBUG_KMS("LVDS downclock is found in VBT. "
"Normal Clock %dKHz, downclock %dKHz\n",
@@ -443,7 +443,7 @@ parse_driver_features(struct drm_i915_private *dev_priv,

if (SUPPORTS_EDP(dev) &&
driver->lvds_config == BDB_DRIVER_FEATURE_EDP)
- dev_priv->edp.support = 1;
+ dev_priv->edp.support = true;

if (driver->dual_frequency)
dev_priv->render_reclock_avail = true;
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index dd729d4..7b1fffb 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -180,7 +180,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
bool turn_off_dac = HAS_PCH_SPLIT(dev);
u32 save_adpa;

- crt->force_hotplug_required = 0;
+ crt->force_hotplug_required = false;

save_adpa = adpa = I915_READ(PCH_ADPA);
DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa);
@@ -507,7 +507,7 @@ static void intel_crt_reset(struct drm_connector *connector)
struct intel_crt *crt = intel_attached_crt(connector);

if (HAS_PCH_SPLIT(dev))
- crt->force_hotplug_required = 1;
+ crt->force_hotplug_required = true;
}

/*
@@ -610,7 +610,7 @@ void intel_crt_init(struct drm_device *dev)
/*
* Configure the automatic hotplug detection stuff
*/
- crt->force_hotplug_required = 0;
+ crt->force_hotplug_required = false;
if (HAS_PCH_SPLIT(dev)) {
u32 adpa;

@@ -621,7 +621,7 @@ void intel_crt_init(struct drm_device *dev)
POSTING_READ(PCH_ADPA);

DRM_DEBUG_KMS("pch crt adpa set to 0x%x\n", adpa);
- crt->force_hotplug_required = 1;
+ crt->force_hotplug_required = true;
}

dev_priv->hotplug_supported_mask |= CRT_HOTPLUG_INT_STATUS;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 00fbff5..64a4073 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5061,7 +5061,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
*/
DRM_DEBUG_KMS("Different P is found for "
"LVDS clock/downclock\n");
- has_reduced_clock = 0;
+ has_reduced_clock = false;
}
}
/* SDVO TV has fixed PLL values depend on its clock range,
@@ -5607,7 +5607,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
*/
DRM_DEBUG_KMS("Different P is found for "
"LVDS clock/downclock\n");
- has_reduced_clock = 0;
+ has_reduced_clock = false;
}
}
/* SDVO TV has fixed PLL values depend on its clock range,
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index aa84832..75103c0 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -524,14 +524,14 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
if (dmi_check_system(intel_no_modeset_on_lid))
return NOTIFY_OK;
if (!acpi_lid_open()) {
- dev_priv->modeset_on_lid = 1;
+ dev_priv->modeset_on_lid = true;
return NOTIFY_OK;
}

if (!dev_priv->modeset_on_lid)
return NOTIFY_OK;

- dev_priv->modeset_on_lid = 0;
+ dev_priv->modeset_on_lid = false;

mutex_lock(&dev->mode_config.mutex);
drm_helper_resume_force_mode(dev);
@@ -786,7 +786,7 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
}
if (temp_downclock < fixed_mode->clock && i915_lvds_downclock) {
/* We found the downclock for LVDS. */
- dev_priv->lvds_downclock_avail = 1;
+ dev_priv->lvds_downclock_avail = true;
dev_priv->lvds_downclock = temp_downclock;
DRM_DEBUG_KMS("LVDS downclock is found in EDID. "
"Normal clock %dKhz, downclock %dKhz\n",
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index e334ec3..9f2c803 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2551,8 +2551,7 @@ bool intel_sdvo_init(struct drm_device *dev, int sdvo_reg)
&intel_sdvo->hotplug_active, 2);
intel_sdvo->hotplug_active[0] &= ~0x3;

- if (intel_sdvo_output_setup(intel_sdvo,
- intel_sdvo->caps.output_flags) != true) {
+ if (!intel_sdvo_output_setup(intel_sdvo, intel_sdvo->caps.output_flags)) {
DRM_DEBUG_KMS("SDVO output failed to setup on SDVO%c\n",
IS_SDVOB(sdvo_reg) ? 'B' : 'C');
goto err;
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 1571be3..035483a 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1293,7 +1293,7 @@ intel_tv_chose_preferred_modes(struct drm_connector *connector,
if (tv_mode->nbr_end < 480 && mode_ptr->vdisplay == 480)
mode_ptr->type |= DRM_MODE_TYPE_PREFERRED;
else if (tv_mode->nbr_end > 480) {
- if (tv_mode->progressive == true && tv_mode->nbr_end < 720) {
+ if (tv_mode->progressive && tv_mode->nbr_end < 720) {
if (mode_ptr->vdisplay == 720)
mode_ptr->type |= DRM_MODE_TYPE_PREFERRED;
} else if (mode_ptr->vdisplay == 1080)
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index e5cbead..577fea7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -1981,7 +1981,7 @@ init_i2c_if(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
BIOSLOG(bios, "0x%04X: I2CReg: 0x%02X, Value: [no device], "
"Mask: 0x%02X, Data: 0x%02X\n",
offset, reg, mask, data);
- iexec->execute = 0;
+ iexec->execute = false;
return 6;
}

@@ -3501,7 +3501,7 @@ init_i2c_long_if(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
BIOSLOG(bios, "0x%04X: I2CReg: 0x%02X:0x%02X, Value: [no device], "
"Mask: 0x%02X, Data: 0x%02X\n",
offset, reghi, reglo, mask, data);
- iexec->execute = 0;
+ iexec->execute = false;
return 7;
}

diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index f80c5e0..a09d745 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -1308,7 +1308,7 @@ nouveau_wait_cb(struct drm_device *dev, u64 timeout,
u64 start = ptimer->read(dev);

do {
- if (cond(data) == true)
+ if (cond(data))
return true;
} while (ptimer->read(dev) - start < timeout);

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index bfd36ab..2b49c0a 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1744,9 +1744,9 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
case RADEON_PP_TXFORMAT_2:
i = (reg - RADEON_PP_TXFORMAT_0) / 24;
if (idx_value & RADEON_TXFORMAT_NON_POWER2) {
- track->textures[i].use_pitch = 1;
+ track->textures[i].use_pitch = true;
} else {
- track->textures[i].use_pitch = 0;
+ track->textures[i].use_pitch = false;
track->textures[i].width = 1 << ((idx_value >> RADEON_TXFORMAT_WIDTH_SHIFT) & RADEON_TXFORMAT_WIDTH_MASK);
track->textures[i].height = 1 << ((idx_value >> RADEON_TXFORMAT_HEIGHT_SHIFT) & RADEON_TXFORMAT_HEIGHT_MASK);
}
@@ -2463,7 +2463,7 @@ void r100_vga_set_state(struct radeon_device *rdev, bool state)
uint32_t temp;

temp = RREG32(RADEON_CONFIG_CNTL);
- if (state == false) {
+ if (!state) {
temp &= ~RADEON_CFG_VGA_RAM_EN;
temp |= RADEON_CFG_VGA_IO_DIS;
} else {
@@ -3583,12 +3583,12 @@ void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track
else
track->num_texture = 6;
track->maxy = 2048;
- track->separate_cube = 1;
+ track->separate_cube = true;
} else {
track->num_cb = 4;
track->num_texture = 16;
track->maxy = 4096;
- track->separate_cube = 0;
+ track->separate_cube = false;
track->aaresolve = false;
track->aa.robj = NULL;
}
@@ -4041,7 +4041,7 @@ int r100_init(struct radeon_device *rdev)
RREG32(R_0007C0_CP_STAT));
}
/* check if cards are posted or not */
- if (radeon_boot_test_post_card(rdev) == false)
+ if (!radeon_boot_test_post_card(rdev))
return -EINVAL;
/* Set asic errata */
r100_errata(rdev);
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 3fc0d29..24277c0 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -1521,7 +1521,7 @@ int r300_init(struct radeon_device *rdev)
RREG32(R_0007C0_CP_STAT));
}
/* check if cards are posted or not */
- if (radeon_boot_test_post_card(rdev) == false)
+ if (!radeon_boot_test_post_card(rdev))
return -EINVAL;
/* Set asic errata */
r300_errata(rdev);
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 4f08e5e..69cdc29 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -2505,7 +2505,7 @@ void r600_vga_set_state(struct radeon_device *rdev, bool state)
uint32_t temp;

temp = RREG32(CONFIG_CNTL);
- if (state == false) {
+ if (!state) {
temp &= ~(1<<0);
temp |= (1<<1);
} else {
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index 98724fc..0a0b83c 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -253,7 +253,7 @@ static bool radeon_atpx_detect(void)
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
vga_count++;

- has_atpx |= (radeon_atpx_pci_probe_handle(pdev) == true);
+ has_atpx |= (radeon_atpx_pci_probe_handle(pdev));
}

if (has_atpx && vga_count == 2) {
diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
index 501f488..63c1965 100644
--- a/drivers/gpu/drm/radeon/radeon_bios.c
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
@@ -483,14 +483,14 @@ bool radeon_get_bios(struct radeon_device *rdev)
uint16_t tmp;

r = radeon_atrm_get_bios(rdev);
- if (r == false)
+ if (!r)
r = igp_read_bios_from_vram(rdev);
- if (r == false)
+ if (!r)
r = radeon_read_bios(rdev);
- if (r == false) {
+ if (!r) {
r = radeon_read_disabled_bios(rdev);
}
- if (r == false || rdev->bios == NULL) {
+ if (!r || rdev->bios == NULL) {
DRM_ERROR("Unable to locate a BIOS ROM\n");
rdev->bios = NULL;
return false;
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index e7cb3ab..5950e54 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -195,7 +195,7 @@ radeon_connector_analog_encoder_conflict_solve(struct drm_connector *connector,
if (radeon_conflict->use_digital)
continue;

- if (priority == true) {
+ if (priority) {
DRM_DEBUG_KMS("1: conflicting encoders switching off %s\n", drm_get_connector_name(conflict));
DRM_DEBUG_KMS("in favor of %s\n", drm_get_connector_name(connector));
conflict->status = connector_status_disconnected;
@@ -421,7 +421,7 @@ int radeon_connector_set_property(struct drm_connector *connector, struct drm_pr
else
ret = radeon_legacy_get_tmds_info_from_combios(radeon_encoder, tmds);
}
- if (val == 1 || ret == false) {
+ if (val == 1 || !ret) {
radeon_legacy_get_tmds_info_from_table(radeon_encoder, tmds);
}
radeon_property_change_mode(&radeon_encoder->base);
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 8c49fef..8f0be13 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -672,11 +672,11 @@ static bool radeon_setup_enc_conn(struct drm_device *dev)
if (rdev->bios) {
if (rdev->is_atom_bios) {
ret = radeon_get_atom_connector_info_from_supported_devices_table(dev);
- if (ret == false)
+ if (!ret)
ret = radeon_get_atom_connector_info_from_object_table(dev);
} else {
ret = radeon_get_legacy_connector_info_from_bios(dev);
- if (ret == false)
+ if (!ret)
ret = radeon_get_legacy_connector_info_from_table(dev);
}
} else {
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 2f46e0c..4b25a7e 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -1560,7 +1560,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
else
ret = radeon_legacy_get_tmds_info_from_combios(encoder, tmds);

- if (ret == false)
+ if (!ret)
radeon_legacy_get_tmds_info_from_table(encoder, tmds);

return tmds;
@@ -1583,7 +1583,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra

ret = radeon_legacy_get_ext_tmds_info_from_combios(encoder, tmds);

- if (ret == false)
+ if (!ret)
radeon_legacy_get_ext_tmds_info_from_table(encoder, tmds);

return tmds;
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index d45df17..5f3a1e9 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -275,7 +275,7 @@ int radeon_bo_evict_vram(struct radeon_device *rdev)
{
/* late 2.6.33 fix IGP hibernate - we need pm ops to do this correct */
if (0 && (rdev->flags & RADEON_IS_IGP)) {
- if (rdev->mc.igp_sideport_enabled == false)
+ if (!rdev->mc.igp_sideport_enabled)
/* Useless to evict on IGP chips */
return 0;
}
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 095148e..c44dadf 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -786,7 +786,7 @@ static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish
u32 stat_crtc = 0;
bool in_vbl = radeon_pm_in_vbl(rdev);

- if (in_vbl == false)
+ if (!in_vbl)
DRM_DEBUG_DRIVER("not in vbl for pm change %08x at %s\n", stat_crtc,
finish ? "exit" : "entry");
return in_vbl;
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index c421e77..c616f15 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -188,7 +188,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
rbo = container_of(bo, struct radeon_bo, tbo);
switch (bo->mem.mem_type) {
case TTM_PL_VRAM:
- if (rbo->rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready == false)
+ if (!rbo->rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready)
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_CPU);
else
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_GTT);
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index ec46eb4..d1fcad9a 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -959,7 +959,7 @@ int rs600_init(struct radeon_device *rdev)
RREG32(R_0007C0_CP_STAT));
}
/* check if cards are posted or not */
- if (radeon_boot_test_post_card(rdev) == false)
+ if (!radeon_boot_test_post_card(rdev))
return -EINVAL;

/* Initialize clocks */
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 58434e8..8e32741 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -219,7 +219,7 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
struct vga_switcheroo_client *active = NULL;

for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) {
- if (vgasr_priv.clients[i].active == true) {
+ if (vgasr_priv.clients[i].active) {
active = &vgasr_priv.clients[i];
break;
}
@@ -244,7 +244,7 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
struct vga_switcheroo_client *active = NULL;

for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) {
- if (vgasr_priv.clients[i].active == true) {
+ if (vgasr_priv.clients[i].active) {
active = &vgasr_priv.clients[i];
break;
}
@@ -363,23 +363,23 @@ vga_switcheroo_debugfs_write(struct file *filp, const char __user *ubuf,
goto out;
}

- if (client->active == true)
+ if (client->active)
goto out;

/* okay we want a switch - test if devices are willing to switch */
can_switch = true;
for (i = 0; i < VGA_SWITCHEROO_MAX_CLIENTS; i++) {
can_switch = vgasr_priv.clients[i].can_switch(vgasr_priv.clients[i].pdev);
- if (can_switch == false) {
+ if (!can_switch) {
printk(KERN_ERR "vga_switcheroo: client %d refused switch\n", i);
break;
}
}

- if (can_switch == false && delay == false)
+ if (!can_switch && !delay)
goto out;

- if (can_switch == true) {
+ if (can_switch) {
pdev_name = pci_name(client->pdev);
ret = vga_switchto_stage1(client);
if (ret)
@@ -468,13 +468,13 @@ int vga_switcheroo_process_delayed_switch(void)
if (vgasr_priv.clients[i].id == vgasr_priv.delayed_client_id)
client = &vgasr_priv.clients[i];
can_switch = vgasr_priv.clients[i].can_switch(vgasr_priv.clients[i].pdev);
- if (can_switch == false) {
+ if (!can_switch) {
printk(KERN_ERR "vga_switcheroo: client %d refused switch\n", i);
break;
}
}

- if (can_switch == false || client == NULL)
+ if (!can_switch || client == NULL)
goto err;

pdev_name = pci_name(client->pdev);
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c
index 6ecc9e2..1994db2 100644
--- a/drivers/hid/hid-lg4ff.c
+++ b/drivers/hid/hid-lg4ff.c
@@ -426,7 +426,7 @@ int lg4ff_init(struct hid_device *hid)
/* Initialize device_list if this is the first device to handle by lg4ff */
if (!list_inited) {
INIT_LIST_HEAD(&device_list.list);
- list_inited = 1;
+ list_inited = true;
}

/* Add the device to device_list */
@@ -463,7 +463,7 @@ int lg4ff_init(struct hid_device *hid)

int lg4ff_deinit(struct hid_device *hid)
{
- bool found = 0;
+ bool found = false;
struct lg4ff_device_entry *entry;
struct list_head *h, *g;
list_for_each_safe(h, g, &device_list.list) {
@@ -472,7 +472,7 @@ int lg4ff_deinit(struct hid_device *hid)
list_del(h);
kfree(entry->device_id);
kfree(entry);
- found = 1;
+ found = true;
break;
}
}
diff --git a/drivers/hid/hid-ntrig.c b/drivers/hid/hid-ntrig.c
index 9fae2eb..b6c767a 100644
--- a/drivers/hid/hid-ntrig.c
+++ b/drivers/hid/hid-ntrig.c
@@ -590,8 +590,8 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
switch (usage->hid) {
case 0xff000001:
/* Tag indicating the start of a multitouch group */
- nd->reading_mt = 1;
- nd->first_contact_touch = 0;
+ nd->reading_mt = true;
+ nd->first_contact_touch = false;
break;
case HID_DG_TIPSWITCH:
nd->tipswitch = value;
@@ -662,7 +662,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
* even if deactivation slack is turned off.
*/
nd->act_state = deactivate_slack - 1;
- nd->confidence = 0;
+ nd->confidence = false;
break;
}

@@ -678,7 +678,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
*/
if (nd->w < nd->min_width ||
nd->h < nd->min_height)
- nd->confidence = 0;
+ nd->confidence = false;
} else
break;

@@ -757,7 +757,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
if (!nd->reading_mt) /* Just to be sure */
break;

- nd->reading_mt = 0;
+ nd->reading_mt = false;


/*
@@ -876,7 +876,7 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
return -ENOMEM;
}

- nd->reading_mt = 0;
+ nd->reading_mt = false;
nd->min_width = 0;
nd->min_height = 0;
nd->activate_slack = activate_slack;
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c
index 34a14a7..5d49114 100644
--- a/drivers/hwmon/abituguru3.c
+++ b/drivers/hwmon/abituguru3.c
@@ -607,7 +607,7 @@ static bool force;
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Set to one to force detection.");
/* Default verbose is 1, since this driver is still in the testing phase */
-static bool verbose = 1;
+static bool verbose = true;
module_param(verbose, bool, 0644);
MODULE_PARM_DESC(verbose, "Enable/disable verbose error reporting");

diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
index ed60242..1db9a20 100644
--- a/drivers/hwmon/ads7828.c
+++ b/drivers/hwmon/ads7828.c
@@ -48,8 +48,8 @@ static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
I2C_CLIENT_END };

/* Module parameters */
-static bool se_input = 1; /* Default is SE, 0 == diff */
-static bool int_vref = 1; /* Default is internal ref ON */
+static bool se_input = true; /* Default is SE, 0 == diff */
+static bool int_vref = true; /* Default is internal ref ON */
static int vref_mv = ADS7828_INT_VREF_MV; /* set if vref != 2.5V */
module_param(se_input, bool, S_IRUGO);
module_param(int_vref, bool, S_IRUGO);
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index a6c6ec3..e9d7d3e 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -176,12 +176,12 @@ static ssize_t show_temp(struct device *dev,
/* Check whether the time interval has elapsed */
if (!tdata->valid || time_after(jiffies, tdata->last_updated + HZ)) {
rdmsr_on_cpu(tdata->cpu, tdata->status_reg, &eax, &edx);
- tdata->valid = 0;
+ tdata->valid = false;
/* Check whether the data is valid */
if (eax & 0x80000000) {
tdata->temp = tdata->tjmax -
((eax >> 16) & 0x7f) * 1000;
- tdata->valid = 1;
+ tdata->valid = true;
}
tdata->last_updated = jiffies;
}
diff --git a/drivers/hwmon/lineage-pem.c b/drivers/hwmon/lineage-pem.c
index 58eded2..e139929 100644
--- a/drivers/hwmon/lineage-pem.c
+++ b/drivers/hwmon/lineage-pem.c
@@ -202,7 +202,7 @@ static struct pem_data *pem_update_device(struct device *dev)
i2c_smbus_write_byte(client, PEM_CLEAR_INFO_FLAGS);

data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
abort:
mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index b3311b1..e6058ed 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -247,7 +247,7 @@ static int lm75_detect(struct i2c_client *new_client,
struct i2c_adapter *adapter = new_client->adapter;
int i;
int conf, hyst, os;
- bool is_lm75a = 0;
+ bool is_lm75a = false;

if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
I2C_FUNC_SMBUS_WORD_DATA))
@@ -291,7 +291,7 @@ static int lm75_detect(struct i2c_client *new_client,
|| i2c_smbus_read_byte_data(new_client, 5) != 0xff
|| i2c_smbus_read_byte_data(new_client, 6) != 0xff)
return -ENODEV;
- is_lm75a = 1;
+ is_lm75a = true;
hyst = i2c_smbus_read_byte_data(new_client, 2);
os = i2c_smbus_read_byte_data(new_client, 3);
} else { /* Traditional style LM75 detection */
diff --git a/drivers/hwmon/lm95245.c b/drivers/hwmon/lm95245.c
index 5e5fc1b..7e77145 100644
--- a/drivers/hwmon/lm95245.c
+++ b/drivers/hwmon/lm95245.c
@@ -155,7 +155,7 @@ static struct lm95245_data *lm95245_update_device(struct device *dev)
= i2c_smbus_read_byte_data(client,
lm95245_reg_address[i]);
data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}

mutex_unlock(&data->update_lock);
@@ -263,7 +263,7 @@ static ssize_t set_limit(struct device *dev, struct device_attribute *attr,

mutex_lock(&data->update_lock);

- data->valid = 0;
+ data->valid = false;

i2c_smbus_write_byte_data(client, lm95245_reg_address[index], val);

@@ -288,7 +288,7 @@ static ssize_t set_crit_hyst(struct device *dev, struct device_attribute *attr,

mutex_lock(&data->update_lock);

- data->valid = 0;
+ data->valid = false;

/* shared crit hysteresis */
i2c_smbus_write_byte_data(client, LM95245_REG_RW_COMMON_HYSTERESIS,
@@ -328,7 +328,7 @@ static ssize_t set_type(struct device *dev, struct device_attribute *attr,
else
data->config2 &= ~CFG2_REMOTE_TT;

- data->valid = 0;
+ data->valid = false;

i2c_smbus_write_byte_data(client, LM95245_REG_RW_CONFIG2,
data->config2);
@@ -440,7 +440,7 @@ static void lm95245_init_client(struct i2c_client *client)
{
struct lm95245_data *data = i2c_get_clientdata(client);

- data->valid = 0;
+ data->valid = false;
data->interval = lm95245_read_conversion_rate(client);

data->config1 = i2c_smbus_read_byte_data(client,
diff --git a/drivers/hwmon/ltc4151.c b/drivers/hwmon/ltc4151.c
index 4ac06b7..e6f1914 100644
--- a/drivers/hwmon/ltc4151.c
+++ b/drivers/hwmon/ltc4151.c
@@ -88,7 +88,7 @@ static struct ltc4151_data *ltc4151_update_device(struct device *dev)
data->regs[i] = val;
}
data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
abort:
mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/ltc4215.c b/drivers/hwmon/ltc4215.c
index c7e6d8e..505e33f 100644
--- a/drivers/hwmon/ltc4215.c
+++ b/drivers/hwmon/ltc4215.c
@@ -66,7 +66,7 @@ static struct ltc4215_data *ltc4215_update_device(struct device *dev)
}

data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}

mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c
index 6593083..834007d 100644
--- a/drivers/hwmon/ltc4245.c
+++ b/drivers/hwmon/ltc4245.c
@@ -162,7 +162,7 @@ static struct ltc4245_data *ltc4245_update_device(struct device *dev)
ltc4245_update_gpios(dev);

data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}

mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/ltc4261.c b/drivers/hwmon/ltc4261.c
index ce52355..62e3d59 100644
--- a/drivers/hwmon/ltc4261.c
+++ b/drivers/hwmon/ltc4261.c
@@ -85,13 +85,13 @@ static struct ltc4261_data *ltc4261_update_device(struct device *dev)
"Failed to read ADC value: error %d\n",
val);
ret = ERR_PTR(val);
- data->valid = 0;
+ data->valid = false;
goto abort;
}
data->regs[i] = val;
}
data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
abort:
mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c
index f8e323a..3263eac 100644
--- a/drivers/hwmon/max16065.c
+++ b/drivers/hwmon/max16065.c
@@ -169,7 +169,7 @@ static struct max16065_data *max16065_update_device(struct device *dev)
= i2c_smbus_read_byte_data(client, MAX16065_FAULT(i));

data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
mutex_unlock(&data->update_lock);
return data;
diff --git a/drivers/hwmon/max6642.c b/drivers/hwmon/max6642.c
index 209e8a5..f1d4597 100644
--- a/drivers/hwmon/max6642.c
+++ b/drivers/hwmon/max6642.c
@@ -194,7 +194,7 @@ static struct max6642_data *max6642_update_device(struct device *dev)
MAX6642_REG_R_STATUS);

data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}

mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 00460d8..ff14f01 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -424,7 +424,7 @@ static struct pmbus_data *pmbus_update_device(struct device *dev)
}
pmbus_clear_faults(client);
data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
mutex_unlock(&data->update_lock);
return data;
diff --git a/drivers/hwmon/smm665.c b/drivers/hwmon/smm665.c
index 4116381..be86a74 100644
--- a/drivers/hwmon/smm665.c
+++ b/drivers/hwmon/smm665.c
@@ -267,7 +267,7 @@ static struct smm665_data *smm665_update_device(struct device *dev)
data->adc[i] = val;
}
data->last_updated = jiffies;
- data->valid = 1;
+ data->valid = true;
}
abort:
mutex_unlock(&data->update_lock);
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 374118f..70ee666 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -71,7 +71,7 @@ module_param(force_i2c, byte, 0);
MODULE_PARM_DESC(force_i2c,
"Initialize the i2c address of the sensors");

-static bool init = 1;
+static bool init = true;
module_param(init, bool, 0);
MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");

diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index 17a8fa2..c5f5f78 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -71,7 +71,7 @@ static bool reset;
module_param(reset, bool, 0);
MODULE_PARM_DESC(reset, "Set to one to reset chip on load");

-static bool init = 1;
+static bool init = true;
module_param(init, bool, 0);
MODULE_PARM_DESC(init, "Set to zero to bypass chip initialization");

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 6381604..15ee223 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -375,7 +375,7 @@ static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
clk_disable(i2c_dev->clk);

if (i2c_dev->irq_disabled) {
- i2c_dev->irq_disabled = 0;
+ i2c_dev->irq_disabled = false;
enable_irq(i2c_dev->irq);
}

@@ -399,7 +399,7 @@ static irqreturn_t tegra_i2c_isr(int irq, void *dev_id)

if (!i2c_dev->irq_disabled) {
disable_irq_nosync(i2c_dev->irq);
- i2c_dev->irq_disabled = 1;
+ i2c_dev->irq_disabled = true;
}

complete(&i2c_dev->msg_complete);
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index 333011c..16f1788 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -329,7 +329,7 @@ static int __devinit vt596_probe(struct pci_dev *pdev,
/* Determine the address of the SMBus areas */
if (force_addr) {
vt596_smba = force_addr & 0xfff0;
- force = 0;
+ force = false;
goto found;
}

diff --git a/drivers/ide/ali14xx.c b/drivers/ide/ali14xx.c
index d3be99f..47778f2 100644
--- a/drivers/ide/ali14xx.c
+++ b/drivers/ide/ali14xx.c
@@ -228,7 +228,7 @@ MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets");

static int __init ali14xx_init(void)
{
- if (probe_ali14xx == 0)
+ if (!probe_ali14xx)
goto out;

/* auto-detect IDE controller port */
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index 1471730..f587c7f 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -726,7 +726,7 @@ static int __init cmd640x_init(void)
if (cmd640_vlb && probe_for_cmd640_vlb()) {
bus_type = "VLB";
} else {
- cmd640_vlb = 0;
+ cmd640_vlb = false;
/* Find out what kind of PCI probing is supported otherwise
Justin Gibbs will sulk.. */
if (pci_conf1() && probe_for_cmd640_pci1())
diff --git a/drivers/ide/dtc2278.c b/drivers/ide/dtc2278.c
index 46af474..7c96476 100644
--- a/drivers/ide/dtc2278.c
+++ b/drivers/ide/dtc2278.c
@@ -137,7 +137,7 @@ MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets");

static int __init dtc2278_init(void)
{
- if (probe_dtc2278 == 0)
+ if (!probe_dtc2278)
return -ENODEV;

if (dtc2278_probe()) {
diff --git a/drivers/ide/ht6560b.c b/drivers/ide/ht6560b.c
index 986f251..91a943a 100644
--- a/drivers/ide/ht6560b.c
+++ b/drivers/ide/ht6560b.c
@@ -354,7 +354,7 @@ static const struct ide_port_info ht6560b_port_info __initdata = {

static int __init ht6560b_init(void)
{
- if (probe_ht6560b == 0)
+ if (!probe_ht6560b)
return -ENODEV;

if (!request_region(HT_CONFIG_PORT, 1, DRV_NAME)) {
diff --git a/drivers/ide/ide-4drives.c b/drivers/ide/ide-4drives.c
index 547d7cf..4e47780 100644
--- a/drivers/ide/ide-4drives.c
+++ b/drivers/ide/ide-4drives.c
@@ -33,7 +33,7 @@ static int __init ide_4drives_init(void)
unsigned long base = 0x1f0, ctl = 0x3f6;
struct ide_hw hw, *hws[] = { &hw, &hw };

- if (probe_4drives == 0)
+ if (!probe_4drives)
return -ENODEV;

if (!request_region(base, 8, DRV_NAME)) {
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index f1a6796b..659e33d 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -96,7 +96,7 @@ int ide_acpi_init(void)

bool ide_port_acpi(ide_hwif_t *hwif)
{
- return ide_noacpi == 0 && hwif->acpidata;
+ return !ide_noacpi && hwif->acpidata;
}

/**
@@ -592,7 +592,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif)
drive->name, err);
}

- if (ide_noacpi || ide_acpionboot == 0) {
+ if (ide_noacpi || !ide_acpionboot) {
DEBPRINT("ACPI methods disabled on boot\n");
return;
}
diff --git a/drivers/ide/ide-pci-generic.c b/drivers/ide/ide-pci-generic.c
index 7f56b73..0c95d0a 100644
--- a/drivers/ide/ide-pci-generic.c
+++ b/drivers/ide/ide-pci-generic.c
@@ -109,7 +109,7 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
int ret = -ENODEV;

/* Don't use the generic entry unless instructed to do so */
- if (id->driver_data == 0 && ide_generic_all == 0)
+ if (id->driver_data == 0 && !ide_generic_all)
goto out;

switch (dev->vendor) {
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c
index 8bbfe55..d31fb41 100644
--- a/drivers/ide/qd65xx.c
+++ b/drivers/ide/qd65xx.c
@@ -426,7 +426,7 @@ static int __init qd65xx_init(void)
{
int rc1, rc2 = -ENODEV;

- if (probe_qd65xx == 0)
+ if (!probe_qd65xx)
return -ENODEV;

rc1 = qd_probe(0x30);
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index 5cfb781..a220437 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -167,7 +167,7 @@ MODULE_PARM_DESC(probe, "probe for UMC8672 chipset");

static int __init umc8672_init(void)
{
- if (probe_umc8672 == 0)
+ if (!probe_umc8672)
goto out;

if (umc8672_probe() == 0)
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 832e7a7..65a674e 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -59,16 +59,16 @@ MODULE_AUTHOR("Christoph Raisch <raisch@xxxxxxxxxx>");
MODULE_DESCRIPTION("IBM eServer HCA InfiniBand Device Driver");
MODULE_VERSION(HCAD_VERSION);

-static bool ehca_open_aqp1 = 0;
+static bool ehca_open_aqp1 = false;
static int ehca_hw_level = 0;
-static bool ehca_poll_all_eqs = 1;
+static bool ehca_poll_all_eqs = true;

int ehca_debug_level = 0;
int ehca_nr_ports = -1;
-bool ehca_use_hp_mr = 0;
+bool ehca_use_hp_mr = false;
int ehca_port_act_time = 30;
int ehca_static_rate = -1;
-bool ehca_scaling_code = 0;
+bool ehca_scaling_code = false;
int ehca_lock_hcalls = -1;
int ehca_max_cq = -1;
int ehca_max_qp = -1;
@@ -808,7 +808,7 @@ static int __devinit ehca_probe(struct platform_device *dev,
}

/* create AQP1 for port 1 */
- if (ehca_open_aqp1 == 1) {
+ if (ehca_open_aqp1) {
shca->sport[0].port_state = IB_PORT_DOWN;
ret = ehca_create_aqp1(shca, 1);
if (ret) {
@@ -819,7 +819,7 @@ static int __devinit ehca_probe(struct platform_device *dev,
}

/* create AQP1 for port 2 */
- if ((ehca_open_aqp1 == 1) && (shca->num_ports == 2)) {
+ if ((ehca_open_aqp1) && (shca->num_ports == 2)) {
shca->sport[1].port_state = IB_PORT_DOWN;
ret = ehca_create_aqp1(shca, 2);
if (ret) {
@@ -887,7 +887,7 @@ static int __devexit ehca_remove(struct platform_device *dev)

sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);

- if (ehca_open_aqp1 == 1) {
+ if (ehca_open_aqp1) {
int i;
for (i = 0; i < shca->num_ports; i++) {
ret = ehca_destroy_aqp1(&shca->sport[i]);
@@ -1051,7 +1051,7 @@ static int __init ehca_module_init(void)
goto module_init4;
}

- if (ehca_poll_all_eqs != 1) {
+ if (!ehca_poll_all_eqs) {
ehca_gen_err("WARNING!!!");
ehca_gen_err("It is possible to lose interrupts.");
} else {
@@ -1079,7 +1079,7 @@ module_init1:

static void __exit ehca_module_exit(void)
{
- if (ehca_poll_all_eqs == 1)
+ if (ehca_poll_all_eqs)
del_timer_sync(&poll_eqs_timer);

ibmebus_unregister_driver(&ehca_driver);
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index e2bdfd4..907e270 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -1249,7 +1249,7 @@ static int __devinit wistron_probe(struct platform_device *dev)
if (wifi & 1)
wifi_enabled = wifi & 2;
else
- have_wifi = 0;
+ have_wifi = false;

if (have_wifi)
bios_set_state(WIFI, wifi_enabled);
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index 0acbc7d..9ec4531 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -524,7 +524,7 @@ static void atp_complete_geyser_1_2(struct urb *urb)
/* Perform size detection, if not done already */
if (unlikely(!dev->size_detect_done)) {
atp_detect_size(dev);
- dev->size_detect_done = 1;
+ dev->size_detect_done = true;
goto exit;
}
}
@@ -733,7 +733,7 @@ static int atp_open(struct input_dev *input)
if (usb_submit_urb(dev->urb, GFP_ATOMIC))
return -EIO;

- dev->open = 1;
+ dev->open = true;
return 0;
}

@@ -743,7 +743,7 @@ static void atp_close(struct input_dev *input)

usb_kill_urb(dev->urb);
cancel_work_sync(&dev->work);
- dev->open = 0;
+ dev->open = false;
}

static int atp_handle_geyser(struct atp *dev)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index d2c0db1..615366f 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1290,7 +1290,7 @@ static int elantech_set_properties(struct elantech_data *etd)
synaptics_send_cmd;

/* Turn on packet checking by default */
- etd->paritycheck = 1;
+ etd->paritycheck = true;

/*
* This firmware suffers from misreporting coordinates when
diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 1c5d521..d162cdc 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -774,7 +774,7 @@ static int hgpk_reconnect(struct psmouse *psmouse)
PM_EVENT_ON)
return 0;

- priv->powered = 1;
+ priv->powered = true;
return hgpk_reset_device(psmouse, false);
}

diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index e6c9931..66890b9 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -60,7 +60,7 @@ static unsigned int psmouse_rate = 100;
module_param_named(rate, psmouse_rate, uint, 0644);
MODULE_PARM_DESC(rate, "Report rate, in reports per second.");

-static bool psmouse_smartscroll = 1;
+static bool psmouse_smartscroll = true;
module_param_named(smartscroll, psmouse_smartscroll, bool, 0644);
MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");

diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c
index 1c58aaf..6789435 100644
--- a/drivers/input/mouse/synaptics_i2c.c
+++ b/drivers/input/mouse/synaptics_i2c.c
@@ -185,7 +185,7 @@
#define NO_DATA_SLEEP_MSECS (MSEC_PER_SEC / 4)

/* Control touchpad's No Deceleration option */
-static bool no_decel = 1;
+static bool no_decel = true;
module_param(no_decel, bool, 0644);
MODULE_PARM_DESC(no_decel, "No Deceleration. Default = 1 (on)");

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 88672ec..6e0c296 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -779,7 +779,7 @@ static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
}
} else
/* force touch out when pen is in prox */
- prox = 0;
+ prox = false;

if (prox) {
input_report_abs(input, ABS_X, x);
diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c
index 94fb9fb..348f817 100644
--- a/drivers/input/touchscreen/auo-pixcir-ts.c
+++ b/drivers/input/touchscreen/auo-pixcir-ts.c
@@ -508,7 +508,7 @@ static int __devinit auo_pixcir_probe(struct i2c_client *client,
pdata->init_hw(client);

ts->client = client;
- ts->touch_ind_mode = 0;
+ ts->touch_ind_mode = false;
init_waitqueue_head(&ts->wait);

snprintf(ts->phys, sizeof(ts->phys),
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index a0ed668..e2eb250 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -40,7 +40,7 @@ MODULE_DESCRIPTION("CAPI4Linux: DMA support for active AVM cards");
MODULE_AUTHOR("Carsten Paeth");
MODULE_LICENSE("GPL");

-static bool suppress_pollack = 0;
+static bool suppress_pollack = false;
module_param(suppress_pollack, bool, 0);

/* ------------------------------------------------------------- */
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index 023de78..4d9b072 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -30,7 +30,7 @@ static const char *boardname[] = { "DataCommute/BRI", "DataCommute/PRI", "TeleCo
static unsigned int io[] = {0,0,0,0};
static unsigned char irq[] = {0,0,0,0};
static unsigned long ram[] = {0,0,0,0};
-static bool do_reset = 0;
+static bool do_reset = false;

module_param_array(io, int, NULL, 0);
module_param_array(irq, int, NULL, 0);
diff --git a/drivers/macintosh/ams/ams-input.c b/drivers/macintosh/ams/ams-input.c
index b27e530..a3b8916 100644
--- a/drivers/macintosh/ams/ams-input.c
+++ b/drivers/macintosh/ams/ams-input.c
@@ -91,7 +91,7 @@ static int ams_input_enable(void)
return error;
}

- joystick = 1;
+ joystick = true;

return 0;
}
@@ -104,7 +104,7 @@ static void ams_input_disable(void)
ams_info.idev = NULL;
}

- joystick = 0;
+ joystick = false;
}

static ssize_t ams_input_show_joystick(struct device *dev,
diff --git a/drivers/media/dvb/dvb-usb/af9005.c b/drivers/media/dvb/dvb-usb/af9005.c
index af176b6..3f4361e 100644
--- a/drivers/media/dvb/dvb-usb/af9005.c
+++ b/drivers/media/dvb/dvb-usb/af9005.c
@@ -30,7 +30,7 @@ MODULE_PARM_DESC(debug,
"set debugging level (1=info,xfer=2,rc=4,reg=8,i2c=16,fw=32 (or-able))."
DVB_USB_DEBUG_STATUS);
/* enable obnoxious led */
-bool dvb_usb_af9005_led = 1;
+bool dvb_usb_af9005_led = true;
module_param_named(led, dvb_usb_af9005_led, bool, 0644);
MODULE_PARM_DESC(led, "enable led (default: 1).");

diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
index 6bcbcf5..8add4bd 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -671,7 +671,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe)

switch (c->transmission_mode) {
case TRANSMISSION_MODE_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case TRANSMISSION_MODE_2K:
break;
@@ -680,12 +680,12 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid transmission_mode", __func__);
- auto_mode = 1;
+ auto_mode = true;
}

switch (c->guard_interval) {
case GUARD_INTERVAL_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case GUARD_INTERVAL_1_32:
break;
@@ -700,12 +700,12 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid guard_interval", __func__);
- auto_mode = 1;
+ auto_mode = true;
}

switch (c->hierarchy) {
case HIERARCHY_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case HIERARCHY_NONE:
break;
@@ -720,12 +720,12 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid hierarchy", __func__);
- auto_mode = 1;
+ auto_mode = true;
};

switch (c->modulation) {
case QAM_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case QPSK:
break;
@@ -737,7 +737,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid modulation", __func__);
- auto_mode = 1;
+ auto_mode = true;
}

/* Use HP. How and which case we can switch to LP? */
@@ -745,7 +745,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe)

switch (c->code_rate_HP) {
case FEC_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case FEC_1_2:
break;
@@ -763,12 +763,12 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid code_rate_HP", __func__);
- auto_mode = 1;
+ auto_mode = true;
}

switch (c->code_rate_LP) {
case FEC_AUTO:
- auto_mode = 1;
+ auto_mode = true;
break;
case FEC_1_2:
break;
@@ -788,7 +788,7 @@ static int af9013_set_frontend(struct dvb_frontend *fe)
break;
default:
dbg("%s: invalid code_rate_LP", __func__);
- auto_mode = 1;
+ auto_mode = true;
}

switch (c->bandwidth_hz) {
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 6980ed7..9e00b8f 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -1111,7 +1111,7 @@ static int HI_Command(struct drxk_state *state, u16 cmd, u16 *pResult)
((state->m_HICfgCtrl) &
SIO_HI_RA_RAM_PAR_5_CFG_SLEEP__M) ==
SIO_HI_RA_RAM_PAR_5_CFG_SLEEP_ZZZ);
- if (powerdown_cmd == false) {
+ if (!powerdown_cmd) {
/* Wait until command rdy */
u32 retryCount = 0;
u16 waitCmd;
@@ -1204,7 +1204,7 @@ static int MPEGTSConfigurePins(struct drxk_state *state, bool mpegEnable)
if (status < 0)
goto error;

- if (mpegEnable == false) {
+ if (!mpegEnable) {
/* Set MPEG TS pads to inputmode */
status = write16(state, SIO_PDR_MSTRT_CFG__A, 0x0000);
if (status < 0)
@@ -1260,7 +1260,7 @@ static int MPEGTSConfigurePins(struct drxk_state *state, bool mpegEnable)
status = write16(state, SIO_PDR_MVAL_CFG__A, 0x0000); /* Disable */
if (status < 0)
goto error;
- if (state->m_enableParallel == true) {
+ if (state->m_enableParallel) {
/* paralel -> enable MD1 to MD7 */
status = write16(state, SIO_PDR_MD1_CFG__A, sioPdrMdxCfg);
if (status < 0)
@@ -1449,7 +1449,7 @@ static int DVBTEnableOFDMTokenRing(struct drxk_state *state, bool enable)

dprintk(1, "\n");

- if (enable == false) {
+ if (!enable) {
desiredCtrl = SIO_OFDM_SH_OFDM_RING_ENABLE_OFF;
desiredStatus = SIO_OFDM_SH_OFDM_RING_STATUS_DOWN;
}
@@ -2059,7 +2059,7 @@ static int MPEGTSDtoSetup(struct drxk_state *state,
goto error;
fecOcRegMode &= (~FEC_OC_MODE_PARITY__M);
fecOcRegIprMode &= (~FEC_OC_IPR_MODE_MVAL_DIS_PAR__M);
- if (state->m_insertRSByte == true) {
+ if (state->m_insertRSByte) {
/* enable parity symbol forward */
fecOcRegMode |= FEC_OC_MODE_PARITY__M;
/* MVAL disable during parity bytes */
@@ -2070,7 +2070,7 @@ static int MPEGTSDtoSetup(struct drxk_state *state,

/* Check serial or parrallel output */
fecOcRegIprMode &= (~(FEC_OC_IPR_MODE_SERIAL__M));
- if (state->m_enableParallel == false) {
+ if (!state->m_enableParallel) {
/* MPEG data output is serial -> set ipr_mode[0] */
fecOcRegIprMode |= FEC_OC_IPR_MODE_SERIAL__M;
}
@@ -2182,19 +2182,19 @@ static int MPEGTSConfigurePolarity(struct drxk_state *state)

/* Control selective inversion of output bits */
fecOcRegIprInvert &= (~(InvertDataMask));
- if (state->m_invertDATA == true)
+ if (state->m_invertDATA)
fecOcRegIprInvert |= InvertDataMask;
fecOcRegIprInvert &= (~(FEC_OC_IPR_INVERT_MERR__M));
- if (state->m_invertERR == true)
+ if (state->m_invertERR)
fecOcRegIprInvert |= FEC_OC_IPR_INVERT_MERR__M;
fecOcRegIprInvert &= (~(FEC_OC_IPR_INVERT_MSTRT__M));
- if (state->m_invertSTR == true)
+ if (state->m_invertSTR)
fecOcRegIprInvert |= FEC_OC_IPR_INVERT_MSTRT__M;
fecOcRegIprInvert &= (~(FEC_OC_IPR_INVERT_MVAL__M));
- if (state->m_invertVAL == true)
+ if (state->m_invertVAL)
fecOcRegIprInvert |= FEC_OC_IPR_INVERT_MVAL__M;
fecOcRegIprInvert &= (~(FEC_OC_IPR_INVERT_MCLK__M));
- if (state->m_invertCLK == true)
+ if (state->m_invertCLK)
fecOcRegIprInvert |= FEC_OC_IPR_INVERT_MCLK__M;

return write16(state, FEC_OC_IPR_INVERT__A, fecOcRegIprInvert);
@@ -3405,7 +3405,7 @@ static int DVBTCtrlSetIncEnable(struct drxk_state *state, bool *enabled)
int status;

dprintk(1, "\n");
- if (*enabled == true)
+ if (*enabled)
status = write16(state, IQM_CF_BYPASSDET__A, 0);
else
status = write16(state, IQM_CF_BYPASSDET__A, 1);
@@ -3421,7 +3421,7 @@ static int DVBTCtrlSetFrEnable(struct drxk_state *state, bool *enabled)
int status;

dprintk(1, "\n");
- if (*enabled == true) {
+ if (*enabled) {
/* write mask to 1 */
status = write16(state, OFDM_SC_RA_RAM_FR_THRES_8K__A,
DEFAULT_FR_THRES_8K);
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c
index 36ce061..d31d47e 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -49,9 +49,9 @@ MODULE_VERSION("0.0.4");
static int io = CONFIG_RADIO_GEMTEK_PORT;
static bool probe = CONFIG_RADIO_GEMTEK_PROBE;
static bool hardmute;
-static bool shutdown = 1;
-static bool keepmuted = 1;
-static bool initmute = 1;
+static bool shutdown = true;
+static bool keepmuted = true;
+static bool initmute = true;
static int radio_nr = -1;

module_param(io, int, 0444);
@@ -599,7 +599,7 @@ static void __exit gemtek_exit(void)
struct v4l2_device *v4l2_dev = &gt->v4l2_dev;

if (shutdown) {
- hardmute = 1; /* Turn off PLL */
+ hardmute = true; /* Turn off PLL */
gemtek_mute(gt);
} else {
v4l2_info(v4l2_dev, "Module unloaded but card not muted!\n");
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c
index 22c5743..af242a9 100644
--- a/drivers/media/radio/radio-sf16fmi.c
+++ b/drivers/media/radio/radio-sf16fmi.c
@@ -328,7 +328,7 @@ static int __init fmi_init(void)
io = isapnp_fmi_probe();
if (io < 0)
continue;
- pnp_attached = 1;
+ pnp_attached = true;
}
if (!request_region(io, 2, "radio-sf16fmi")) {
if (pnp_attached)
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
index 0e740c9..f22b146 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -165,7 +165,7 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
{
int retval;
unsigned long timeout;
- bool timed_out = 0;
+ bool timed_out = false;

/* start tuning */
radio->registers[CHANNEL] &= ~CHANNEL_CHAN;
@@ -306,7 +306,7 @@ static int si470x_set_seek(struct si470x_device *radio,
{
int retval = 0;
unsigned long timeout;
- bool timed_out = 0;
+ bool timed_out = false;

/* start seeking */
radio->registers[POWERCFG] |= POWERCFG_SEEK;
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index 860c112..91659fa 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -965,7 +965,7 @@ static int ene_transmit(struct rc_dev *rdev, unsigned *buf, unsigned n)
dev->tx_reg = 0;
dev->tx_done = 0;
dev->tx_sample = 0;
- dev->tx_sample_pulse = 0;
+ dev->tx_sample_pulse = false;

dbg("TX: %d samples", dev->tx_len);

diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index 21105bf..2f50382 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -156,7 +156,7 @@

/* module parameters */
#ifdef CONFIG_USB_DEBUG
-static bool debug = 1;
+static bool debug = true;
#else
static bool debug;
#endif
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index d6f4bfe..9bb8d9d 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -43,7 +43,7 @@
#define DRIVER_DESC "Streamzap Remote Control driver"

#ifdef CONFIG_USB_DEBUG
-static bool debug = 1;
+static bool debug = true;
#else
static bool debug;
#endif
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c
index 349bd9c..b8f3454 100644
--- a/drivers/media/video/cx18/cx18-driver.c
+++ b/drivers/media/video/cx18/cx18-driver.c
@@ -75,7 +75,7 @@ static int radio[CX18_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1 };
static unsigned cardtype_c = 1;
static unsigned tuner_c = 1;
-static bool radio_c = 1;
+static bool radio_c = true;
static char pal[] = "--";
static char secam[] = "--";
static char ntsc[] = "-";
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 3949b7d..533b224 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -99,7 +99,7 @@ static int i2c_clock_period[IVTV_MAX_CARDS] = { -1, -1, -1, -1, -1, -1, -1, -1,

static unsigned int cardtype_c = 1;
static unsigned int tuner_c = 1;
-static bool radio_c = 1;
+static bool radio_c = true;
static unsigned int i2c_clock_period_c = 1;
static char pal[] = "---";
static char secam[] = "--";
diff --git a/drivers/media/video/marvell-ccic/mcam-core.c b/drivers/media/video/marvell-ccic/mcam-core.c
index 37d20e7..7c3f186 100644
--- a/drivers/media/video/marvell-ccic/mcam-core.c
+++ b/drivers/media/video/marvell-ccic/mcam-core.c
@@ -73,7 +73,7 @@ MODULE_PARM_DESC(dma_buf_size,
"parameters require larger buffers, an attempt to reallocate "
"will be made.");
#else /* MCAM_MODE_VMALLOC */
-static const bool alloc_bufs_at_read = 0;
+static const bool alloc_bufs_at_read = false;
static const int n_dma_bufs = 3; /* Used by S/G_PARM */
#endif /* MCAM_MODE_VMALLOC */

diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 1fb7d5b..a9eb2f5 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -977,7 +977,7 @@ static int omap_vout_release(struct file *file)
mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN |
DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2;
omap_dispc_unregister_isr(omap_vout_isr, vout, mask);
- vout->streaming = 0;
+ vout->streaming = false;

videobuf_streamoff(q);
videobuf_queue_cancel(q);
@@ -1648,7 +1648,7 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
vout->field_id = 0;

/* set flag here. Next QBUF will start DMA */
- vout->streaming = 1;
+ vout->streaming = true;

vout->first_int = 1;

@@ -1718,7 +1718,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
if (!vout->streaming)
return -EINVAL;

- vout->streaming = 0;
+ vout->streaming = false;
mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD
| DISPC_IRQ_VSYNC2;

@@ -1927,7 +1927,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
control[0].id = V4L2_CID_ROTATE;
control[0].value = 0;
vout->rotation = 0;
- vout->mirror = 0;
+ vout->mirror = false;
vout->control[2].id = V4L2_CID_HFLIP;
vout->control[2].value = 0;
if (vout->vid_info.rotation_type == VOUT_ROT_VRFB)
diff --git a/drivers/media/video/omap/omap_vout_vrfb.c b/drivers/media/video/omap/omap_vout_vrfb.c
index 4be26ab..516405d 100644
--- a/drivers/media/video/omap/omap_vout_vrfb.c
+++ b/drivers/media/video/omap/omap_vout_vrfb.c
@@ -146,7 +146,7 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, int vid_num,
ret = -ENOMEM;
goto release_vrfb_ctx;
}
- vout->vrfb_static_allocation = 1;
+ vout->vrfb_static_allocation = true;
}
return 0;

@@ -333,7 +333,7 @@ void omap_vout_calculate_vrfb_offset(struct omap_vout_device *vout)
offset = vout->vrfb_context[0].yoffset *
vout->vrfb_context[0].bytespp;
temp_ps = ps / vr_ps;
- if (mirroring == 0) {
+ if (!mirroring) {
*cropped_offset = offset + line_length *
temp_ps * cleft + crop->top * temp_ps;
} else {
@@ -347,7 +347,7 @@ void omap_vout_calculate_vrfb_offset(struct omap_vout_device *vout)
vout->vrfb_context[0].bytespp) +
(vout->vrfb_context[0].xoffset *
vout->vrfb_context[0].bytespp));
- if (mirroring == 0) {
+ if (!mirroring) {
*cropped_offset = offset + (line_length * ps * ctop) +
(cleft / vr_ps) * ps;

@@ -361,7 +361,7 @@ void omap_vout_calculate_vrfb_offset(struct omap_vout_device *vout)
offset = MAX_PIXELS_PER_LINE * vout->vrfb_context[0].xoffset *
vout->vrfb_context[0].bytespp;
temp_ps = ps / vr_ps;
- if (mirroring == 0) {
+ if (!mirroring) {
*cropped_offset = offset + line_length *
temp_ps * crop->left + ctop * ps;
} else {
@@ -372,7 +372,7 @@ void omap_vout_calculate_vrfb_offset(struct omap_vout_device *vout)
}
break;
case dss_rotation_0_degree:
- if (mirroring == 0) {
+ if (!mirroring) {
*cropped_offset = (line_length * ps) *
crop->top + (crop->left / vr_ps) * ps;
} else {
diff --git a/drivers/media/video/ov9740.c b/drivers/media/video/ov9740.c
index d9a9f71..2a18b1c 100644
--- a/drivers/media/video/ov9740.c
+++ b/drivers/media/video/ov9740.c
@@ -564,13 +564,13 @@ static int ov9740_set_res(struct i2c_client *client, u32 width, u32 height)
u32 y_start;
u32 x_end;
u32 y_end;
- bool scaling = 0;
+ bool scaling = false;
u32 scale_input_x;
u32 scale_input_y;
int ret;

if ((width != OV9740_MAX_WIDTH) || (height != OV9740_MAX_HEIGHT))
- scaling = 1;
+ scaling = true;

/*
* Try to use as much of the sensor area as possible when supporting
diff --git a/drivers/media/video/s5p-fimc/fimc-mdevice.c b/drivers/media/video/s5p-fimc/fimc-mdevice.c
index 8ea4ee1..d044d1e 100644
--- a/drivers/media/video/s5p-fimc/fimc-mdevice.c
+++ b/drivers/media/video/s5p-fimc/fimc-mdevice.c
@@ -623,7 +623,7 @@ static int __fimc_md_set_camclk(struct fimc_md *fmd,
camclk->frequency = pdata->clk_frequency;
ret = clk_enable(camclk->clock);
}
- s_info->clk_on = 1;
+ s_info->clk_on = true;
dbg("Enabled camclk %d: f: %lu", pdata->clk_id,
clk_get_rate(camclk->clock));

@@ -635,7 +635,7 @@ static int __fimc_md_set_camclk(struct fimc_md *fmd,

if (--camclk->use_count == 0) {
clk_disable(camclk->clock);
- s_info->clk_on = 0;
+ s_info->clk_on = false;
dbg("Disabled camclk %d", pdata->clk_id);
}
return ret;
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index d427f84..8cc5c43 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -38,11 +38,11 @@
#include "stk-webcam.h"


-static bool hflip = 1;
+static bool hflip = true;
module_param(hflip, bool, 0444);
MODULE_PARM_DESC(hflip, "Horizontal image flip (mirror). Defaults to 1");

-static bool vflip = 1;
+static bool vflip = true;
module_param(vflip, bool, 0444);
MODULE_PARM_DESC(vflip, "Vertical image flip. Defaults to 1");

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 4059ea1..024913d 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -598,7 +598,7 @@ static int tuner_probe(struct i2c_client *client,
t->name = "(tuner unset)";
t->type = UNSET;
t->audmode = V4L2_TUNER_MODE_STEREO;
- t->standby = 1;
+ t->standby = true;
t->radio_freq = 87.5 * 16000; /* Initial freq range */
t->tv_freq = 400 * 16; /* Sets freq to VHF High - needed for some PLL's to properly start */

diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c
index 20f7237..1c26755 100644
--- a/drivers/media/video/via-camera.c
+++ b/drivers/media/video/via-camera.c
@@ -1334,7 +1334,7 @@ static __devinit bool viacam_serial_is_enabled(void)
VIACAM_SERIAL_CREG, &cbyte);
if ((cbyte & VIACAM_SERIAL_BIT) == 0)
return false; /* Not enabled */
- if (override_serial == 0) {
+ if (!override_serial) {
printk(KERN_NOTICE "Via camera: serial port is enabled, " \
"refusing to load.\n");
printk(KERN_NOTICE "Specify override_serial=1 to force " \
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c
index e86173b..9f63376 100644
--- a/drivers/media/video/zoran/zoran_device.c
+++ b/drivers/media/video/zoran/zoran_device.c
@@ -684,7 +684,7 @@ set_videobus_dir (struct zoran *zr,
switch (zr->card.type) {
case LML33:
case LML33R10:
- if (lml33dpath == 0)
+ if (!lml33dpath)
GPIO(zr, 5, val);
else
GPIO(zr, 5, 1);
diff --git a/drivers/memstick/host/r592.c b/drivers/memstick/host/r592.c
index 29b2172..2366620 100644
--- a/drivers/memstick/host/r592.c
+++ b/drivers/memstick/host/r592.c
@@ -23,7 +23,7 @@
#include <linux/swab.h>
#include "r592.h"

-static bool r592_enable_dma = 1;
+static bool r592_enable_dma = true;
static int debug;

static const char *tpc_names[] = {
diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index e2a52e5..f01dede 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -856,9 +856,9 @@ static ssize_t apds990x_prox_reporting_mode_store(struct device *dev,
struct apds990x_chip *chip = dev_get_drvdata(dev);

if (sysfs_streq(buf, reporting_modes[0]))
- chip->prox_continuous_mode = 0;
+ chip->prox_continuous_mode = false;
else if (sysfs_streq(buf, reporting_modes[1]))
- chip->prox_continuous_mode = 1;
+ chip->prox_continuous_mode = true;
else
return -EINVAL;
return len;
diff --git a/drivers/misc/iwmc3200top/main.c b/drivers/misc/iwmc3200top/main.c
index 701eb60..33f43c9 100644
--- a/drivers/misc/iwmc3200top/main.c
+++ b/drivers/misc/iwmc3200top/main.c
@@ -380,16 +380,16 @@ static bool dump;
module_param(dump, bool, 0604);
MODULE_PARM_DESC(dump, "dump_hex_content");

-static bool jump = 1;
+static bool jump = true;
module_param(jump, bool, 0604);

-static bool direct = 1;
+static bool direct = true;
module_param(direct, bool, 0604);

-static bool checksum = 1;
+static bool checksum = true;
module_param(checksum, bool, 0604);

-static bool fw_download = 1;
+static bool fw_download = true;
module_param(fw_download, bool, 0604);

static int block_size = IWMC_SDIO_BLK_SIZE;
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f545a3e..760892c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -48,7 +48,7 @@ static struct workqueue_struct *workqueue;
* performance cost, and for other reasons may not always be desired.
* So we allow it it to be disabled.
*/
-bool use_spi_crc = 1;
+bool use_spi_crc = true;
module_param(use_spi_crc, bool, 0);

/*
@@ -60,7 +60,7 @@ module_param(use_spi_crc, bool, 0);
#ifdef CONFIG_MMC_UNSAFE_RESUME
bool mmc_assume_removable;
#else
-bool mmc_assume_removable = 1;
+bool mmc_assume_removable = true;
#endif
EXPORT_SYMBOL(mmc_assume_removable);
module_param_named(removable, mmc_assume_removable, bool, 0644);
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index fcfe1eb..0e62f71 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1993,34 +1993,34 @@ static void __init atmci_get_cap(struct atmel_mci *host)
dev_info(&host->pdev->dev,
"version: 0x%x\n", version);

- host->caps.has_dma = 0;
- host->caps.has_pdc = 0;
- host->caps.has_cfg_reg = 0;
- host->caps.has_cstor_reg = 0;
- host->caps.has_highspeed = 0;
- host->caps.has_rwproof = 0;
+ host->caps.has_dma = false;
+ host->caps.has_pdc = false;
+ host->caps.has_cfg_reg = false;
+ host->caps.has_cstor_reg = false;
+ host->caps.has_highspeed = false;
+ host->caps.has_rwproof = false;

/* keep only major version number */
switch (version & 0xf00) {
case 0x100:
case 0x200:
- host->caps.has_pdc = 1;
- host->caps.has_rwproof = 1;
+ host->caps.has_pdc = true;
+ host->caps.has_rwproof = true;
break;
case 0x300:
case 0x400:
case 0x500:
#ifdef CONFIG_AT_HDMAC
- host->caps.has_dma = 1;
+ host->caps.has_dma = true;
#else
- host->caps.has_dma = 0;
+ host->caps.has_dma = false;
dev_info(&host->pdev->dev,
"has dma capability but dma engine is not selected, then use pio\n");
#endif
- host->caps.has_cfg_reg = 1;
- host->caps.has_cstor_reg = 1;
- host->caps.has_highspeed = 1;
- host->caps.has_rwproof = 1;
+ host->caps.has_cfg_reg = true;
+ host->caps.has_cstor_reg = true;
+ host->caps.has_highspeed = true;
+ host->caps.has_rwproof = true;
break;
default:
dev_warn(&host->pdev->dev,
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 64a8325..3cf3fcd 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -557,7 +557,7 @@ static int mmc_davinci_start_dma_transfer(struct mmc_davinci_host *host,
}
}

- host->do_dma = 1;
+ host->do_dma = true;
mmc_davinci_send_dma_request(host, data);

return 0;
@@ -725,7 +725,7 @@ static void mmc_davinci_request(struct mmc_host *mmc, struct mmc_request *req)
return;
}

- host->do_dma = 0;
+ host->do_dma = false;
mmc_davinci_prepare_data(host, req);
mmc_davinci_start_command(host, req->cmd);
}
@@ -1020,7 +1020,7 @@ static irqreturn_t mmc_davinci_irq(int irq, void *dev_id)
if (qstatus & MMCST0_DATDNE) {
/* All blocks sent/received, and CRC checks passed */
if (data != NULL) {
- if ((host->do_dma == 0) && (host->bytes_left > 0)) {
+ if ((!host->do_dma) && (host->bytes_left > 0)) {
/* if datasize < rw_threshold
* no RX ints are generated
*/
@@ -1284,7 +1284,7 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
host->sdio_irq = platform_get_irq(pdev, 1);

if (host->use_dma && davinci_acquire_dma_channels(host) != 0)
- host->use_dma = 0;
+ host->use_dma = false;

/* REVISIT: someday, support IRQ-driven card detection. */
mmc->caps |= MMC_CAP_NEEDS_POLL;
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index cb2dc0e..4cd55f2 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -175,7 +175,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
unsigned int nob = data->blocks;
unsigned long long clks;
unsigned int timeout;
- bool dalgn = 0;
+ bool dalgn = false;
u32 dcmd;
int i;

@@ -216,7 +216,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
host->sg_cpu[i].dcmd |= DCMD_ENDIRQEN;
/* Not aligned to 8-byte boundary? */
if (sg_dma_address(&data->sg[i]) & 0x7)
- dalgn = 1;
+ dalgn = true;
if (data->flags & MMC_DATA_READ) {
host->sg_cpu[i].dsadr = host->res->start + MMC_RXFIFO;
host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]);
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 43d9628..a82c910 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -22,8 +22,8 @@
#define DRIVER_NAME "tifm_sd"
#define DRIVER_VERSION "0.8"

-static bool no_dma = 0;
-static bool fixed_timeout = 0;
+static bool no_dma = false;
+static bool fixed_timeout = false;
module_param(no_dma, bool, 0644);
module_param(fixed_timeout, bool, 0644);

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index 3135a1a..4d25868 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -512,7 +512,7 @@ static void new_system_port_status(struct vub300_mmc_host *vub300)
(0x0010 & vub300->system_port_status.port_flags) ? 1 : 0;
if (new_card_present && !old_card_present) {
dev_info(&vub300->udev->dev, "card just inserted\n");
- vub300->card_present = 1;
+ vub300->card_present = true;
vub300->bus_width = 0;
if (disable_offload_processing)
strncpy(vub300->vub_name, "EMPTY Processing Disabled",
@@ -522,7 +522,7 @@ static void new_system_port_status(struct vub300_mmc_host *vub300)
mmc_detect_change(vub300->mmc, 1);
} else if (!new_card_present && old_card_present) {
dev_info(&vub300->udev->dev, "card just ejected\n");
- vub300->card_present = 0;
+ vub300->card_present = false;
mmc_detect_change(vub300->mmc, 0);
} else {
/* no change */
@@ -597,7 +597,7 @@ static void __vub300_irqpoll_response(struct vub300_mmc_host *vub300)
mmc_signal_sdio_irq(vub300->mmc);
else
vub300->irqs_queued += 1;
- vub300->irq_disabled = 1;
+ vub300->irq_disabled = true;
mutex_unlock(&vub300->irq_mutex);
break;
case RESPONSE_ERROR:
@@ -624,7 +624,7 @@ static void __vub300_irqpoll_response(struct vub300_mmc_host *vub300)
mmc_signal_sdio_irq(vub300->mmc);
else
vub300->irqs_queued += 1;
- vub300->irq_disabled = 1;
+ vub300->irq_disabled = true;
mutex_unlock(&vub300->irq_mutex);
break;
}
@@ -644,7 +644,7 @@ static void __vub300_irqpoll_response(struct vub300_mmc_host *vub300)
vub300->irqs_queued += 1;
else
vub300->irqs_queued += 1;
- vub300->irq_disabled = 0;
+ vub300->irq_disabled = false;
mutex_unlock(&vub300->irq_mutex);
break;
}
@@ -949,7 +949,7 @@ static void send_command(struct vub300_mmc_host *vub300)
complete(&vub300->command_complete);
return;
}
- vub300->app_spec = 0;
+ vub300->app_spec = false;
} else {
switch (cmd->opcode) {
case 0:
@@ -1053,7 +1053,7 @@ static void send_command(struct vub300_mmc_host *vub300)
case 55:
response_type = SDRT_1;
vub300->resp_len = 6;
- vub300->app_spec = 1;
+ vub300->app_spec = true;
break;
case 56:
response_type = SDRT_1;
@@ -1679,7 +1679,7 @@ static void __vub300_command_response(struct vub300_mmc_host *vub300,
} else {
vub300->irqs_queued += 1;
}
- vub300->irq_disabled = 1;
+ vub300->irq_disabled = true;
mutex_unlock(&vub300->irq_mutex);
vub300->resp.common.header_size =
sizeof(struct sd_register_header);
@@ -1704,7 +1704,7 @@ static void __vub300_command_response(struct vub300_mmc_host *vub300,
} else {
vub300->irqs_queued += 1;
}
- vub300->irq_disabled = 0;
+ vub300->irq_disabled = false;
mutex_unlock(&vub300->irq_mutex);
vub300->resp.common.header_size =
sizeof(struct sd_register_header);
@@ -2018,7 +2018,7 @@ static void vub300_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
kref_get(&vub300->kref);
mutex_lock(&vub300->cmd_mutex);
if ((ios->power_mode == MMC_POWER_OFF) && vub300->card_powered) {
- vub300->card_powered = 0;
+ vub300->card_powered = false;
usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0),
SET_SD_POWER,
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
@@ -2031,7 +2031,7 @@ static void vub300_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
0x0001, 0x0000, NULL, 0, HZ);
msleep(600);
- vub300->card_powered = 1;
+ vub300->card_powered = true;
} else if (ios->power_mode == MMC_POWER_ON) {
u8 *buf = kmalloc(8, GFP_KERNEL);
if (buf) {
@@ -2063,18 +2063,18 @@ static void vub300_enable_sdio_irq(struct mmc_host *mmc, int enable)
vub300->irqs_queued -= 1;
mmc_signal_sdio_irq(vub300->mmc);
} else if (vub300->irq_disabled) {
- vub300->irq_disabled = 0;
- vub300->irq_enabled = 1;
+ vub300->irq_disabled = false;
+ vub300->irq_enabled = true;
vub300_queue_poll_work(vub300, 0);
} else if (vub300->irq_enabled) {
/* this should not happen, so we will just ignore it */
} else {
- vub300->irq_enabled = 1;
+ vub300->irq_enabled = true;
vub300_queue_poll_work(vub300, 0);
}
mutex_unlock(&vub300->irq_mutex);
} else {
- vub300->irq_enabled = 0;
+ vub300->irq_enabled = false;
}
kref_put(&vub300->kref, vub300_delete);
}
@@ -2186,11 +2186,11 @@ static int vub300_probe(struct usb_interface *interface,
mmc->ops = &vub300_mmc_ops;
vub300 = mmc_priv(mmc);
vub300->mmc = mmc;
- vub300->card_powered = 0;
+ vub300->card_powered = false;
vub300->bus_width = 0;
vub300->cmnd.head.block_size[0] = 0x00;
vub300->cmnd.head.block_size[1] = 0x00;
- vub300->app_spec = 0;
+ vub300->app_spec = false;
mutex_init(&vub300->cmd_mutex);
mutex_init(&vub300->irq_mutex);
vub300->command_out_urb = command_out_urb;
@@ -2204,8 +2204,8 @@ static int vub300_probe(struct usb_interface *interface,
}

vub300->total_offload_count = 0;
- vub300->irq_enabled = 0;
- vub300->irq_disabled = 0;
+ vub300->irq_enabled = false;
+ vub300->irq_disabled = false;
vub300->irqs_queued = 0;

for (i = 0; i < ARRAY_SIZE(vub300->sdio_register); i++)
@@ -2230,7 +2230,7 @@ static int vub300_probe(struct usb_interface *interface,
* use the second pair of bulk-in and bulk-out
* endpoints for Data In/Out
*/
- vub300->large_usb_packets = 0;
+ vub300->large_usb_packets = false;
iface_desc = interface->cur_altsetting;
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
struct usb_endpoint_descriptor *endpoint =
@@ -2241,7 +2241,7 @@ static int vub300_probe(struct usb_interface *interface,
usb_endpoint_is_bulk_out(endpoint) ? "BULK OUT" :
"UNKNOWN", i, endpoint->bEndpointAddress);
if (endpoint->wMaxPacketSize > 64)
- vub300->large_usb_packets = 1;
+ vub300->large_usb_packets = true;
if (usb_endpoint_is_bulk_in(endpoint)) {
if (!vub300->cmnd_res_ep) {
vub300->cmnd_res_ep =
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 493ec2f..2e98d65 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -236,7 +236,7 @@ static void dma_irq_callback(void *param)

case DMA_FOR_READ_DATA:
dma_unmap_sg(this->dev, &this->data_sgl, 1, DMA_FROM_DEVICE);
- if (this->direct_dma_map_ok == false)
+ if (!this->direct_dma_map_ok)
memcpy(this->upper_buf, this->data_buffer_dma,
this->upper_len);
break;
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 5c3d719..310728e 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -185,7 +185,7 @@ struct pxa3xx_nand_info {
uint32_t ndcb2;
};

-static bool use_dma = 1;
+static bool use_dma = true;
module_param(use_dma, bool, 0444);
MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW");

@@ -884,7 +884,7 @@ static int pxa3xx_nand_init_buff(struct pxa3xx_nand_info *info)
struct platform_device *pdev = info->pdev;
int data_desc_offset = MAX_BUFF_SIZE - sizeof(struct pxa_dma_desc);

- if (use_dma == 0) {
+ if (!use_dma) {
info->data_buff = kmalloc(MAX_BUFF_SIZE, GFP_KERNEL);
if (info->data_buff == NULL)
return -ENOMEM;
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index 769a4e0..1c05b34 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -22,7 +22,7 @@
#include "r852.h"


-static bool r852_enable_dma = 1;
+static bool r852_enable_dma = true;
module_param(r852_enable_dma, bool, S_IRUGO);
MODULE_PARM_DESC(r852_enable_dma, "Enable usage of the DMA (default)");

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index bf27c54..489add5 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -615,7 +615,7 @@ static inline void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func,
u32 igu_addr_ack = IGU_REG_CSTORM_TYPE_0_SB_CLEANUP + (idu_sb_id/32)*4;
u32 sb_bit = 1 << (idu_sb_id%32);
u32 func_encode = func |
- ((is_Pf == true ? 1 : 0) << IGU_FID_ENCODE_IS_PF_SHIFT);
+ ((is_Pf ? 1 : 0) << IGU_FID_ENCODE_IS_PF_SHIFT);
u32 addr_encode = IGU_CMD_E2_PROD_UPD_BASE + idu_sb_id;

/* Not supported in BC mode */
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index 5051cf3..7ca7c58 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -1109,7 +1109,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
break;
}
}
- if (false == pg_found) {
+ if (!pg_found) {
data[help_data->num_of_pg].pg = add_pg;
data[help_data->num_of_pg].pg_priority =
(1 << ttp[add_traf_type]);
@@ -1119,7 +1119,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
}
DP(NETIF_MSG_LINK,
"add_traf_type %d pg_found %s num_of_pg %d\n",
- add_traf_type, (false == pg_found) ? "NO" : "YES",
+ add_traf_type, (!pg_found) ? "NO" : "YES",
help_data->num_of_pg);
}
}
@@ -1510,7 +1510,7 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params(
entry = 0;

if (i == (num_of_pri-1) &&
- false == b_found_strict)
+ !b_found_strict)
/* last entry will be handled separately
* If no priority is strict than last
* enty goes to last queue.*/
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index abfad27..4ca3fa5 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -692,7 +692,7 @@ static void
bfa_iocpf_sm_mismatch_entry(struct bfa_iocpf *iocpf)
{
/* Call only the first time sm enters fwmismatch state. */
- if (iocpf->fw_mismatch_notified == false)
+ if (!iocpf->fw_mismatch_notified)
bfa_ioc_pf_fwmismatch(iocpf->ioc);

iocpf->fw_mismatch_notified = true;
@@ -1766,7 +1766,7 @@ bfa_nw_ioc_smem_read(struct bfa_ioc *ioc, void *tbuf, u32 soff, u32 sz)
/*
* Hold semaphore to serialize pll init and fwtrc.
*/
- if (bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg) == 0)
+ if (!bfa_nw_ioc_sem_get(ioc->ioc_regs.ioc_init_sem_reg))
return 1;

writel(pgnum, ioc->ioc_regs.host_page_num_fn);
@@ -1825,7 +1825,7 @@ bfa_nw_ioc_debug_save_ftrc(struct bfa_ioc *ioc)
int tlen;

if (ioc->dbg_fwsave_once) {
- ioc->dbg_fwsave_once = 0;
+ ioc->dbg_fwsave_once = false;
if (ioc->dbg_fwsave_len) {
tlen = ioc->dbg_fwsave_len;
bfa_nw_ioc_debug_fwtrc(ioc, ioc->dbg_fwsave, &tlen);
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_ee.c b/drivers/net/ethernet/intel/ixgb/ixgb_ee.c
index 2ed925f..cf95915 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_ee.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_ee.c
@@ -534,7 +534,7 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)
{

if ((index < IXGB_EEPROM_SIZE) &&
- (ixgb_check_and_get_eeprom_data(hw) == true)) {
+ (ixgb_check_and_get_eeprom_data(hw))) {
return hw->eeprom[index];
}

@@ -558,7 +558,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw,

ENTER();

- if (ixgb_check_and_get_eeprom_data(hw) == true) {
+ if (ixgb_check_and_get_eeprom_data(hw)) {
for (i = 0; i < ETH_ALEN; i++) {
mac_addr[i] = ee_map->mac_addr[i];
}
@@ -578,7 +578,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw,
u32
ixgb_get_ee_pba_number(struct ixgb_hw *hw)
{
- if (ixgb_check_and_get_eeprom_data(hw) == true)
+ if (ixgb_check_and_get_eeprom_data(hw))
return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG])
| (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16);

@@ -599,7 +599,7 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw)
{
struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;

- if (ixgb_check_and_get_eeprom_data(hw) == true)
+ if (ixgb_check_and_get_eeprom_data(hw))
return le16_to_cpu(ee_map->device_id);

return 0;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
index ef2afef..5c1d738 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
@@ -617,7 +617,7 @@ static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw,
*link_up = false;
}

- if (*link_up == false)
+ if (!*link_up)
goto out;
}

@@ -645,7 +645,7 @@ static s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw,
else
*speed = IXGBE_LINK_SPEED_1GB_FULL;

- if ((hw->device_id == IXGBE_DEV_ID_82598AT2) && (*link_up == true) &&
+ if ((hw->device_id == IXGBE_DEV_ID_82598AT2) && (*link_up) &&
(ixgbe_validate_link_ready(hw) != 0))
*link_up = false;

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 7cf1e1f..2e60ba5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -1489,11 +1489,11 @@ static s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)
ack = ixgbe_get_i2c_data(&i2cctl);

udelay(1);
- if (ack == 0)
+ if (!ack)
break;
}

- if (ack == 1) {
+ if (ack) {
hw_dbg(hw, "I2C ack was not received.\n");
status = IXGBE_ERR_I2C;
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index cf6812d..8c23422 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -257,7 +257,7 @@ static void ixgbe_restore_vf_macvlans(struct ixgbe_adapter *adapter)

list_for_each(pos, &adapter->vf_mvs.l) {
entry = list_entry(pos, struct vf_macvlans, l);
- if (entry->free == false)
+ if (!entry->free)
hw->mac.ops.set_rar(hw, entry->rar_entry,
entry->vf_macvlan,
entry->vf, IXGBE_RAH_AV);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
index 8cc5ecc..ab4518c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
@@ -760,7 +760,7 @@ static s32 ixgbe_blink_led_start_X540(struct ixgbe_hw *hw, u32 index)
* This will be reversed when we stop the blinking.
*/
hw->mac.ops.check_link(hw, &speed, &link_up, false);
- if (link_up == false) {
+ if (!link_up) {
macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
macc_reg |= IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS;
IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 3ead111..b32552f 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -1224,7 +1224,7 @@ static irqreturn_t pch_gbe_intr(int irq, void *data)

/* When request status is Receive interruption */
if ((int_st & (PCH_GBE_INT_RX_DMA_CMPLT | PCH_GBE_INT_TX_CMPLT)) ||
- (adapter->rx_stop_flag == true)) {
+ (adapter->rx_stop_flag)) {
if (likely(napi_schedule_prep(&adapter->napi))) {
/* Enable only Rx Descriptor empty */
atomic_inc(&adapter->irq_sem);
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 79013e5..b4a56f7 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -165,7 +165,7 @@ static void xemaclite_enable_interrupts(struct net_local *drvdata)

/* Enable the Tx interrupts for the second Buffer if
* configured in HW */
- if (drvdata->tx_ping_pong != 0) {
+ if (drvdata->tx_ping_pong) {
reg_data = in_be32(drvdata->base_addr +
XEL_BUFFER_OFFSET + XEL_TSR_OFFSET);
out_be32(drvdata->base_addr + XEL_BUFFER_OFFSET +
@@ -179,7 +179,7 @@ static void xemaclite_enable_interrupts(struct net_local *drvdata)

/* Enable the Rx interrupts for the second Buffer if
* configured in HW */
- if (drvdata->rx_ping_pong != 0) {
+ if (drvdata->rx_ping_pong) {
out_be32(drvdata->base_addr + XEL_BUFFER_OFFSET +
XEL_RSR_OFFSET,
XEL_RSR_RECV_IE_MASK);
@@ -210,7 +210,7 @@ static void xemaclite_disable_interrupts(struct net_local *drvdata)

/* Disable the Tx interrupts for the second Buffer
* if configured in HW */
- if (drvdata->tx_ping_pong != 0) {
+ if (drvdata->tx_ping_pong) {
reg_data = in_be32(drvdata->base_addr + XEL_BUFFER_OFFSET +
XEL_TSR_OFFSET);
out_be32(drvdata->base_addr + XEL_BUFFER_OFFSET +
@@ -225,7 +225,7 @@ static void xemaclite_disable_interrupts(struct net_local *drvdata)

/* Disable the Rx interrupts for the second buffer
* if configured in HW */
- if (drvdata->rx_ping_pong != 0) {
+ if (drvdata->rx_ping_pong) {

reg_data = in_be32(drvdata->base_addr + XEL_BUFFER_OFFSET +
XEL_RSR_OFFSET);
@@ -356,9 +356,9 @@ static int xemaclite_send_data(struct net_local *drvdata, u8 *data,
XEL_TSR_XMIT_ACTIVE_MASK)) == 0) {

/* Switch to next buffer if configured */
- if (drvdata->tx_ping_pong != 0)
+ if (drvdata->tx_ping_pong)
drvdata->next_tx_buf_to_use ^= XEL_BUFFER_OFFSET;
- } else if (drvdata->tx_ping_pong != 0) {
+ } else if (drvdata->tx_ping_pong) {
/* If the expected buffer is full, try the other buffer,
* if it is configured in HW */

@@ -411,14 +411,14 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
reg_data = in_be32(addr + XEL_RSR_OFFSET);

if ((reg_data & XEL_RSR_RECV_DONE_MASK) == XEL_RSR_RECV_DONE_MASK) {
- if (drvdata->rx_ping_pong != 0)
+ if (drvdata->rx_ping_pong)
drvdata->next_rx_buf_to_use ^= XEL_BUFFER_OFFSET;
} else {
/* The instance is out of sync, try other buffer if other
* buffer is configured, return 0 otherwise. If the instance is
* out of sync, do not update the 'next_rx_buf_to_use' since it
* will correct on subsequent calls */
- if (drvdata->rx_ping_pong != 0)
+ if (drvdata->rx_ping_pong)
addr = (void __iomem __force *)((u32 __force)addr ^
XEL_BUFFER_OFFSET);
else
@@ -699,7 +699,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
}

/* If there was a Tx interrupt, call the Tx Handler */
- if (tx_complete != 0)
+ if (tx_complete)
xemaclite_tx_handler(dev);

return IRQ_HANDLED;
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index e8be47d..2a21ab1 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -355,7 +355,7 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
}
}

- if (clk125en == false ||
+ if (!clk125en ||
(phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE))
val &= ~BCM54XX_SHD_SCR3_DLLAPD_DIS;
else
@@ -373,7 +373,7 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)

orig = val;

- if (clk125en == false ||
+ if (!clk125en ||
(phydev->dev_flags & PHY_BRCM_AUTO_PWRDWN_ENABLE))
val |= BCM54XX_SHD_APD_EN;
else
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c
index bf67416..35e9370 100644
--- a/drivers/net/wireless/ath/ath5k/ani.c
+++ b/drivers/net/wireless/ath/ath5k/ani.c
@@ -257,7 +257,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as,
"beacon RSSI high");
/* only OFDM: beacon RSSI is high, we can disable ODFM weak
* signal detection */
- if (ofdm_trigger && as->ofdm_weak_sig == true) {
+ if (ofdm_trigger && as->ofdm_weak_sig) {
ath5k_ani_set_ofdm_weak_signal_detection(ah, false);
ath5k_ani_set_spur_immunity_level(ah, 0);
return;
@@ -272,7 +272,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as,
* but can raise firstep level */
ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI,
"beacon RSSI mid");
- if (ofdm_trigger && as->ofdm_weak_sig == false)
+ if (ofdm_trigger && !as->ofdm_weak_sig)
ath5k_ani_set_ofdm_weak_signal_detection(ah, true);
if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL)
ath5k_ani_set_firstep_level(ah, as->firstep_level + 1);
@@ -282,7 +282,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as,
* detect and zero firstep level to maximize CCK sensitivity */
ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI,
"beacon RSSI low, 2GHz");
- if (ofdm_trigger && as->ofdm_weak_sig == true)
+ if (ofdm_trigger && as->ofdm_weak_sig)
ath5k_ani_set_ofdm_weak_signal_detection(ah, false);
if (as->firstep_level > 0)
ath5k_ani_set_firstep_level(ah, 0);
@@ -326,7 +326,7 @@ ath5k_ani_lower_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as)
} else if (rssi > ATH5K_ANI_RSSI_THR_LOW) {
/* beacon RSSI is mid-range: turn on ODFM weak signal
* detection and next, lower firstep level */
- if (as->ofdm_weak_sig == false) {
+ if (!as->ofdm_weak_sig) {
ath5k_ani_set_ofdm_weak_signal_detection(ah,
true);
return;
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index bc56f57..4c2c33d 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -405,22 +405,16 @@ static void ath9k_hw_ani_lower_immunity_old(struct ath_hw *ah)
/* XXX: Handle me */
} else if (rssi > aniState->rssiThrLow) {
if (aniState->ofdmWeakSigDetectOff) {
- if (ath9k_hw_ani_control(ah,
- ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
- true) == true)
+ if (ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, true))
return;
}
if (aniState->firstepLevel > 0) {
- if (ath9k_hw_ani_control(ah,
- ATH9K_ANI_FIRSTEP_LEVEL,
- aniState->firstepLevel - 1) == true)
+ if (ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, aniState->firstepLevel - 1))
return;
}
} else {
if (aniState->firstepLevel > 0) {
- if (ath9k_hw_ani_control(ah,
- ATH9K_ANI_FIRSTEP_LEVEL,
- aniState->firstepLevel - 1) == true)
+ if (ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, aniState->firstepLevel - 1))
return;
}
}
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h
index c4ad0b0..265bf77 100644
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
@@ -24,7 +24,7 @@
static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah,
bool power_off)
{
- if (ah->aspm_enabled != true)
+ if (!ah->aspm_enabled)
return;

ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off);
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index ee77595..3cc1cbc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1597,7 +1597,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
allow_fbs = true;

if (bChannelChange &&
- (ah->chip_fullsleep != true) &&
+ (!ah->chip_fullsleep) &&
(ah->curchan != NULL) &&
(chan->channel != ah->curchan->channel) &&
(allow_fbs ||
@@ -2035,8 +2035,7 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
if (setChip) {
if ((REG_READ(ah, AR_RTC_STATUS) &
AR_RTC_STATUS_M) == AR_RTC_STATUS_SHUTDOWN) {
- if (ath9k_hw_set_reset_reg(ah,
- ATH9K_RESET_POWER_ON) != true) {
+ if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) {
return false;
}
if (!AR_SREV_9300_20_OR_LATER(ah))
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index b5f1b91..dc9a096 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -1467,7 +1467,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
/* This TX ring is full. */
unsigned int skb_mapping = skb_get_queue_mapping(skb);
ieee80211_stop_queue(dev->wl->hw, skb_mapping);
- dev->wl->tx_queue_stopped[skb_mapping] = 1;
+ dev->wl->tx_queue_stopped[skb_mapping] = true;
ring->stopped = true;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index);
@@ -1590,7 +1590,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
}

if (dev->wl->tx_queue_stopped[ring->queue_prio]) {
- dev->wl->tx_queue_stopped[ring->queue_prio] = 0;
+ dev->wl->tx_queue_stopped[ring->queue_prio] = false;
} else {
/* If the driver queue is running wake the corresponding
* mac80211 queue. */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 23ffb1b..142d088 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3398,7 +3398,7 @@ static void b43_tx_work(struct work_struct *work)
else
err = b43_dma_tx(dev, skb);
if (err == -ENOSPC) {
- wl->tx_queue_stopped[queue_num] = 1;
+ wl->tx_queue_stopped[queue_num] = true;
ieee80211_stop_queue(wl->hw, queue_num);
skb_queue_head(&wl->tx_queue[queue_num], skb);
break;
@@ -3409,7 +3409,7 @@ static void b43_tx_work(struct work_struct *work)
}

if (!err)
- wl->tx_queue_stopped[queue_num] = 0;
+ wl->tx_queue_stopped[queue_num] = false;
}

#if B43_DEBUG
@@ -5310,7 +5310,7 @@ static struct b43_wl *b43_wireless_init(struct b43_bus_dev *dev)
/* Initialize queues and flags. */
for (queue_num = 0; queue_num < B43_QOS_QUEUE_NUM; queue_num++) {
skb_queue_head_init(&wl->tx_queue[queue_num]);
- wl->tx_queue_stopped[queue_num] = 0;
+ wl->tx_queue_stopped[queue_num] = false;
}

snprintf(chip_name, ARRAY_SIZE(chip_name),
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index bf5a438..8b22446 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -3524,7 +3524,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,
core = (cmd & 0x3000) >> 12;
type = (cmd & 0x0F00) >> 8;

- if (phy6or5x && updated[core] == 0) {
+ if (phy6or5x && !updated[core]) {
b43_nphy_update_tx_cal_ladder(dev, core);
updated[core] = true;
}
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index 3533ab8..5fedb8a 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -778,7 +778,7 @@ void b43_pio_rx(struct b43_pio_rxqueue *q)
bool stop;

while (1) {
- stop = (pio_rx_frame(q) == 0);
+ stop = (!pio_rx_frame(q));
if (stop)
break;
cond_resched();
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index f1f8bd0..8b7be5c 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -1182,7 +1182,7 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev,
/* This TX ring is full. */
unsigned int skb_mapping = skb_get_queue_mapping(skb);
ieee80211_stop_queue(dev->wl->hw, skb_mapping);
- dev->wl->tx_queue_stopped[skb_mapping] = 1;
+ dev->wl->tx_queue_stopped[skb_mapping] = true;
ring->stopped = true;
if (b43legacy_debug(dev, B43legacy_DBG_DMAVERBOSE))
b43legacydbg(dev->wl, "Stopped TX ring %d\n",
@@ -1297,7 +1297,7 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev,
}

if (dev->wl->tx_queue_stopped[ring->queue_prio]) {
- dev->wl->tx_queue_stopped[ring->queue_prio] = 0;
+ dev->wl->tx_queue_stopped[ring->queue_prio] = false;
} else {
/* If the driver queue is running wake the corresponding
* mac80211 queue. */
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 75e70bc..4c14c72 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2464,7 +2464,7 @@ static void b43legacy_tx_work(struct work_struct *work)
else
err = b43legacy_dma_tx(dev, skb);
if (err == -ENOSPC) {
- wl->tx_queue_stopped[queue_num] = 1;
+ wl->tx_queue_stopped[queue_num] = true;
ieee80211_stop_queue(wl->hw, queue_num);
skb_queue_head(&wl->tx_queue[queue_num], skb);
break;
@@ -2475,7 +2475,7 @@ static void b43legacy_tx_work(struct work_struct *work)
}

if (!err)
- wl->tx_queue_stopped[queue_num] = 0;
+ wl->tx_queue_stopped[queue_num] = false;
}

mutex_unlock(&wl->mutex);
@@ -3828,7 +3828,7 @@ static int b43legacy_wireless_init(struct ssb_device *dev)
/* Initialize queues and flags. */
for (queue_num = 0; queue_num < B43legacy_QOS_QUEUE_NUM; queue_num++) {
skb_queue_head_init(&wl->tx_queue[queue_num]);
- wl->tx_queue_stopped[queue_num] = 0;
+ wl->tx_queue_stopped[queue_num] = false;
}

ssb_set_devtypedata(dev, wl);
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index eb9eb76..7fa3ceb 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -780,7 +780,7 @@ static int brcmf_netdev_stop(struct net_device *ndev)

brcmf_dbg(TRACE, "Enter\n");
brcmf_cfg80211_down(drvr->config);
- if (drvr->bus_if->drvr_up == 0)
+ if (!drvr->bus_if->drvr_up)
return 0;

/* Set state and stop OS transmissions */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index f7eeee1..f943146 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -765,7 +765,7 @@ static int brcmf_sdbrcm_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
brcmf_dbg(INFO, "CLKCTL: turned ON\n");

#if defined(BCMDBG)
- if (bus->alp_only != true) {
+ if (!bus->alp_only) {
if (SBSDIO_ALPONLY(clkctl))
brcmf_dbg(ERROR, "HT Clock should be on\n");
}
@@ -2099,7 +2099,7 @@ brcmf_sdbrcm_wait_for_event(struct brcmf_sdio *bus, bool *lockvar)
{
up(&bus->sdsem);
wait_event_interruptible_timeout(bus->ctrl_wait,
- (*lockvar == false), HZ * 2);
+ (!*lockvar), HZ * 2);
down(&bus->sdsem);
return;
}
@@ -2684,8 +2684,7 @@ static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)

/* Priority based enq */
spin_lock_bh(&bus->txqlock);
- if (brcmf_c_prec_enq(bus->sdiodev->dev, &bus->txq, pkt, prec) ==
- false) {
+ if (!brcmf_c_prec_enq(bus->sdiodev->dev, &bus->txq, pkt, prec)) {
skb_pull(pkt, SDPCM_HDRLEN);
brcmf_txcomplete(bus->sdiodev->dev, pkt, false);
brcmu_pkt_buf_free_skb(pkt);
@@ -2972,7 +2971,7 @@ brcmf_sdbrcm_bus_txctl(struct device *dev, unsigned char *msg, uint msglen)

brcmf_sdbrcm_wait_for_event(bus, &bus->ctrl_frame_stat);

- if (bus->ctrl_frame_stat == false) {
+ if (!bus->ctrl_frame_stat) {
brcmf_dbg(INFO, "ctrl_frame_stat == false\n");
ret = 0;
} else {
@@ -3040,7 +3039,7 @@ brcmf_sdbrcm_bus_rxctl(struct device *dev, unsigned char *msg, uint msglen)
rxlen, msglen);
} else if (timeleft == 0) {
brcmf_dbg(ERROR, "resumed on timeout\n");
- } else if (pending == true) {
+ } else if (pending) {
brcmf_dbg(CTL, "cancelled\n");
return -ERESTARTSYS;
} else {
@@ -4031,7 +4030,7 @@ void
brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick)
{
/* Totally stop the timer */
- if (!wdtick && bus->wd_timer_valid == true) {
+ if (!wdtick && bus->wd_timer_valid) {
del_timer_sync(&bus->timer);
bus->wd_timer_valid = false;
bus->save_ms = wdtick;
@@ -4044,7 +4043,7 @@ brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick)

if (wdtick) {
if (bus->save_ms != BRCMF_WD_POLL_MS) {
- if (bus->wd_timer_valid == true)
+ if (bus->wd_timer_valid)
/* Stop timer and restart at new value */
del_timer_sync(&bus->timer);

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
index 55e9f45..b946713 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -1149,7 +1149,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
);

brcms_b_set_chanspec(wlc->hw, chanspec,
- (brcms_c_quiet_chanspec(wlc_cm, chanspec) != 0),
+ (brcms_c_quiet_chanspec(wlc_cm, chanspec)),
&txpwr);
}

diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index f6affc6..d687ef6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -3246,7 +3246,7 @@ static void brcms_b_coreinit(struct brcms_c_info *wlc)
}

/* For old ucode, txfifo sizes needs to be modified(increased) */
- if (fifosz_fixup == true)
+ if (fifosz_fixup)
brcms_b_corerev_fifofixup(wlc_hw);

/* check txfifo allocations match between ucode and driver */
@@ -5425,7 +5425,7 @@ int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config)
return -EINVAL;

/* update configuration value */
- if (config == true)
+ if (config)
brcms_c_protection_upd(wlc, BRCMS_PROT_G_USER, gmode);

/* Clear rateset override */
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
index ce8562a..d56e897 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -3968,7 +3968,7 @@ s16 wlc_lcnphy_tempsense_new(struct brcms_phy *pi, bool mode)
s16 avg = 0;
bool suspend = false;

- if (mode == 1) {
+ if (mode) {
suspend = (0 == (bcma_read32(pi->d11core,
D11REGOFFS(maccontrol)) &
MCTL_EN_MAC));
@@ -3991,7 +3991,7 @@ s16 wlc_lcnphy_tempsense_new(struct brcms_phy *pi, bool mode)

avg /= 2;

- if (mode == 1) {
+ if (mode) {

mod_phy_reg(pi, 0x448, (0x1 << 14), (1) << 14);

@@ -4012,7 +4012,7 @@ u16 wlc_lcnphy_tempsense(struct brcms_phy *pi, bool mode)
u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi);
struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;

- if (mode == 1) {
+ if (mode) {
suspend = (0 == (bcma_read32(pi->d11core,
D11REGOFFS(maccontrol)) &
MCTL_EN_MAC));
@@ -4049,7 +4049,7 @@ u16 wlc_lcnphy_tempsense(struct brcms_phy *pi, bool mode)
if (mode)
wlc_lcnphy_set_tx_pwr_ctrl(pi, SAVE_txpwrctrl);

- if (mode == 1) {
+ if (mode) {

mod_phy_reg(pi, 0x448, (0x1 << 14), (1) << 14);

@@ -4078,7 +4078,7 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy *pi, bool mode)
s32 avg = 0;
bool suspend = false;

- if (mode == 1) {
+ if (mode) {
suspend = (0 == (bcma_read32(pi->d11core,
D11REGOFFS(maccontrol)) &
MCTL_EN_MAC));
@@ -4097,7 +4097,7 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy *pi, bool mode)
avg = (avg * LCN_VBAT_SCALE_NOM +
(LCN_VBAT_SCALE_DEN >> 1)) / LCN_VBAT_SCALE_DEN;

- if (mode == 1) {
+ if (mode) {
if (!suspend)
wlapi_enable_mac(pi->sh->physhim);
}
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
index a16f1ab..e3f3151 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
@@ -21462,7 +21462,7 @@ void wlc_phy_antsel_init(struct brcms_phy_pub *ppi, bool lut_init)
if (NREV_GE(pi->pubpi.phy_rev, 3)) {
u16 v0 = 0x211, v1 = 0x222, v2 = 0x144, v3 = 0x188;

- if (lut_init == false)
+ if (!lut_init)
return;

if (pi->srom_fem2g.antswctrllut == 0) {
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 1667232..e21e2db 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -5179,7 +5179,7 @@ il4965_set_hw_ready(struct il_priv *il)
else
il->hw_ready = false;

- D_INFO("hardware %s\n", (il->hw_ready == 1) ? "ready" : "not ready");
+ D_INFO("hardware %s\n", (il->hw_ready) ? "ready" : "not ready");
return ret;
}

diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
index bd29568..c837463 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
@@ -478,7 +478,7 @@ void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans,
}

txq_id = trans_pcie->agg_txq[sta_id][tid];
- if (WARN_ON_ONCE(is_agg_txqid_valid(trans, txq_id) == false)) {
+ if (WARN_ON_ONCE(!is_agg_txqid_valid(trans, txq_id))) {
IWL_ERR(trans,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWLAGN_FIRST_AMPDU_QUEUE,
@@ -573,7 +573,7 @@ int iwl_trans_pcie_tx_agg_disable(struct iwl_trans *trans, int sta_id, int tid)
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
u8 txq_id = trans_pcie->agg_txq[sta_id][tid];

- if (WARN_ON_ONCE(is_agg_txqid_valid(trans, txq_id) == false)) {
+ if (WARN_ON_ONCE(!is_agg_txqid_valid(trans, txq_id))) {
IWL_ERR(trans,
"queue number out of range: %d, must be %d to %d\n",
txq_id, IWLAGN_FIRST_AMPDU_QUEUE,
diff --git a/drivers/net/wireless/iwmc3200wifi/commands.c b/drivers/net/wireless/iwmc3200wifi/commands.c
index bd75078..cc7022e 100644
--- a/drivers/net/wireless/iwmc3200wifi/commands.c
+++ b/drivers/net/wireless/iwmc3200wifi/commands.c
@@ -806,7 +806,7 @@ int iwm_invalidate_mlme_profile(struct iwm_priv *iwm)
return ret;

ret = wait_event_interruptible_timeout(iwm->mlme_queue,
- (iwm->umac_profile_active == 0), 5 * HZ);
+ (!iwm->umac_profile_active), 5 * HZ);

return ret ? 0 : -EBUSY;
}
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index dd5aeaf..8488c35 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1330,7 +1330,7 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
wh->addr1);

if (mwl8k_vif != NULL &&
- mwl8k_vif->is_hw_crypto_enabled == true) {
+ mwl8k_vif->is_hw_crypto_enabled) {
/*
* When MMIC ERROR is encountered
* by the firmware, payload is
@@ -1993,7 +1993,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
*/

if (txq->len >= MWL8K_TX_DESCS - 2) {
- if (mgmtframe == false ||
+ if (!mgmtframe ||
txq->len == MWL8K_TX_DESCS) {
if (start_ba_session) {
spin_lock(&priv->stream_lock);
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 8d6eb0f..0aeca09 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -407,7 +407,7 @@ void rtl_init_rfkill(struct ieee80211_hw *hw)

rtlpriv->rfkill.rfkill_state = radio_state;

- blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;
+ blocked = (rtlpriv->rfkill.rfkill_state) ? 0 : 1;
wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
}

@@ -693,7 +693,7 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw,
{
int rate_idx;

- if (false == isht) {
+ if (!isht) {
if (IEEE80211_BAND_2GHZ == hw->conf.channel->band) {
switch (desc_rate) {
case DESC92_RATE1M:
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 3f0f056..57c4e36 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -1109,7 +1109,7 @@ static void rtl_op_rfkill_poll(struct ieee80211_hw *hw)
(KERN_INFO "wireless radio switch turned %s\n",
radio_state ? "on" : "off"));

- blocked = (rtlpriv->rfkill.rfkill_state == 1) ? 0 : 1;
+ blocked = (rtlpriv->rfkill.rfkill_state) ? 0 : 1;
wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
}
}
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c
index ed1058b..7ac8564 100644
--- a/drivers/net/wireless/rtlwifi/efuse.c
+++ b/drivers/net/wireless/rtlwifi/efuse.c
@@ -778,7 +778,7 @@ static void efuse_write_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
dataempty = false;
}

- if (dataempty == false) {
+ if (!dataempty) {
*efuse_addr = *efuse_addr + (tmp_word_cnts * 2) + 1;
*write_state = PG_STATE_HEADER;
} else {
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 130fdd9..369aab6 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -105,7 +105,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
case ERFOFF:

if ((changesource == RF_CHANGE_BY_HW)
- && (ppsc->hwradiooff == false)) {
+ && (!ppsc->hwradiooff)) {
ppsc->hwradiooff = true;
}

diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
index 72a98ca..b93c69e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
@@ -330,7 +330,7 @@ static void rtl92c_dm_initial_gain_multi_sta(struct ieee80211_hw *hw)
if (mac->opmode == NL80211_IFTYPE_ADHOC)
multi_sta = true;

- if ((multi_sta == false) || (dm_digtable.cursta_connectctate !=
+ if ((!multi_sta) || (dm_digtable.cursta_connectctate !=
DIG_STA_DISCONNECT)) {
initialized = false;
dm_digtable.dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
index 931d979..454b53b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/fw_common.c
@@ -521,7 +521,7 @@ void rtl92c_fill_h2c_cmd(struct ieee80211_hw *hw,
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u32 tmp_cmdbuf[2];

- if (rtlhal->fw_ready == false) {
+ if (!rtlhal->fw_ready) {
RT_ASSERT(false, ("return H2C cmd because of Fw "
"download fail!!!\n"));
return;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
index 1f07558..467b408 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c
@@ -219,7 +219,7 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("==>\n"));
rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
BASEBAND_CONFIG_PHY_REG);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Write BB Reg Fail!!"));
return false;
}
@@ -232,13 +232,13 @@ bool _rtl92c_phy_bb8192c_config_parafile(struct ieee80211_hw *hw)
rtstatus = rtlpriv->cfg->ops->config_bb_with_pgheaderfile(hw,
BASEBAND_CONFIG_PHY_REG);
}
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("BB_PG Reg Fail!!"));
return false;
}
rtstatus = rtlpriv->cfg->ops->config_bb_with_headerfile(hw,
BASEBAND_CONFIG_AGC_TAB);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n"));
return false;
}
@@ -584,7 +584,7 @@ void rtl92c_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
struct rtl_efuse *rtlefuse = rtl_efuse(rtlpriv);
u8 cckpowerlevel[2], ofdmpowerlevel[2];

- if (rtlefuse->txpwr_fromeprom == false)
+ if (!rtlefuse->txpwr_fromeprom)
return;
_rtl92c_get_txpower_index(hw, channel,
&cckpowerlevel[0], &ofdmpowerlevel[0]);
@@ -1133,7 +1133,7 @@ static void _rtl92c_phy_path_adda_on(struct ieee80211_hw *hw,
u32 i;

pathOn = is_patha_on ? 0x04db25a4 : 0x0b1b25a4;
- if (false == is2t) {
+ if (!is2t) {
pathOn = 0x0bdb25a0;
rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0b1b25a0);
} else {
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index a3deaef..88a5af9 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -592,22 +592,22 @@ static bool _rtl92ce_llt_table_init(struct ieee80211_hw *hw)

for (i = 0; i < (txpktbuf_bndy - 1); i++) {
status = _rtl92ce_llt_write(hw, i, i + 1);
- if (true != status)
+ if (!status)
return status;
}

status = _rtl92ce_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
- if (true != status)
+ if (!status)
return status;

for (i = txpktbuf_bndy; i < maxPage; i++) {
status = _rtl92ce_llt_write(hw, i, (i + 1));
- if (true != status)
+ if (!status)
return status;
}

status = _rtl92ce_llt_write(hw, maxPage, txpktbuf_bndy);
- if (true != status)
+ if (!status)
return status;

return true;
@@ -696,7 +696,7 @@ static bool _rtl92ce_init_mac(struct ieee80211_hw *hw)

rtl_write_word(rtlpriv, REG_CR, 0x2ff);

- if (_rtl92ce_llt_table_init(hw) == false)
+ if (!_rtl92ce_llt_table_init(hw))
return false;

rtl_write_dword(rtlpriv, REG_HISR, 0xffffffff);
@@ -909,7 +909,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
rtlpci->being_init_adapter = true;
rtlpriv->intf_ops->disable_aspm(hw);
rtstatus = _rtl92ce_init_mac(hw);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Init MAC failed\n"));
err = 1;
return err;
@@ -1126,7 +1126,7 @@ void rtl92ce_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
(u8 *) (&reg_rcr));
_rtl92ce_set_bcn_ctrl_reg(hw, 0, BIT(4));
- } else if (check_bssid == false) {
+ } else if (!check_bssid) {
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
_rtl92ce_set_bcn_ctrl_reg(hw, BIT(4), 0);
rtlpriv->cfg->ops->set_hw_reg(hw,
@@ -1999,7 +1999,7 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
e_rfpowerstate_toset = ERFON;
ppsc->hwradiooff = false;
actuallyset = true;
- } else if ((ppsc->hwradiooff == false)
+ } else if ((!ppsc->hwradiooff)
&& (e_rfpowerstate_toset == ERFOFF)) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("GPIOChangeRF - HW Radio OFF, RF OFF\n"));
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
index 3b585aa..648d2c8 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/phy.c
@@ -528,7 +528,7 @@ static bool _rtl92ce_phy_set_rf_power_state(struct ieee80211_hw *hw,
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic enable\n"));
rtstatus = rtl_ps_enable_nic(hw);
- } while ((rtstatus != true)
+ } while ((!rtstatus)
&& (InitializeCount < 10));
RT_CLEAR_PS_LEVEL(ppsc,
RT_RF_OFF_LEVL_HALT_NIC);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c
index d3b01e6..863f2f5 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c
@@ -510,7 +510,7 @@ static bool _rtl92ce_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
break;
}

- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath));
return false;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index 124cf63..acb8c7d 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1008,7 +1008,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw)
? WMM_CHIP_B_TX_PAGE_BOUNDARY
: WMM_CHIP_A_TX_PAGE_BOUNDARY;
}
- if (false == rtl92c_init_llt_table(hw, boundary)) {
+ if (!rtl92c_init_llt_table(hw, boundary)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Failed to init LLT Table!\n"));
return -EINVAL;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
index 9e0c8fc..ab4632c 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/mac.c
@@ -216,14 +216,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)

for (i = 0; i < (boundary - 1); i++) {
rst = rtl92c_llt_write(hw, i , i + 1);
- if (true != rst) {
+ if (!rst) {
pr_err("===> %s #1 fail\n", __func__);
return rst;
}
}
/* end of list */
rst = rtl92c_llt_write(hw, (boundary - 1), 0xFF);
- if (true != rst) {
+ if (!rst) {
pr_err("===> %s #2 fail\n", __func__);
return rst;
}
@@ -234,14 +234,14 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
*/
for (i = boundary; i < LLT_LAST_ENTRY_OF_TX_PKT_BUFFER; i++) {
rst = rtl92c_llt_write(hw, i, (i + 1));
- if (true != rst) {
+ if (!rst) {
pr_err("===> %s #3 fail\n", __func__);
return rst;
}
}
/* Let last entry point to the start entry of ring buffer */
rst = rtl92c_llt_write(hw, LLT_LAST_ENTRY_OF_TX_PKT_BUFFER, boundary);
- if (true != rst) {
+ if (!rst) {
pr_err("===> %s #4 fail\n", __func__);
return rst;
}
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
index e49cf22..0f4c2f2 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c
@@ -482,7 +482,7 @@ static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw,
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic enable\n"));
rtstatus = rtl_ps_enable_nic(hw);
- } while ((rtstatus != true)
+ } while ((!rtstatus)
&& (InitializeCount < 10));
RT_CLEAR_PS_LEVEL(ppsc,
RT_RF_OFF_LEVL_HALT_NIC);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
index 1e851aa..124b2a6 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
@@ -480,7 +480,7 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
BRFSI_RFENV << 16, u4_regvalue);
break;
}
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath));
goto phy_rf_cfg_fail;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
index 3cd0736..abff0ee 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
@@ -408,7 +408,7 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
de_digtable.last_min_undecorated_pwdb_for_dm =
de_digtable.min_undecorated_pwdb_for_dm;
}
- if (rtlpriv->dm.dm_initialgain_enable == false)
+ if (!rtlpriv->dm.dm_initialgain_enable)
return;

/* because we will send data pkt when scanning
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
index 82f060b..88fbedf 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/fw.c
@@ -542,7 +542,7 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u32 tmp_cmdbuf[2];

- if (rtlhal->fw_ready == false) {
+ if (!rtlhal->fw_ready) {
RT_ASSERT(false, ("return H2C cmd because of Fw "
"download fail!!!\n"));
return;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index 9d89d7c..b1c3c3f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -590,13 +590,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
/* 18. LLT_table_init(Adapter); */
for (i = 0; i < (txpktbuf_bndy - 1); i++) {
status = _rtl92de_llt_write(hw, i, i + 1);
- if (true != status)
+ if (!status)
return status;
}

/* end of list */
status = _rtl92de_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
- if (true != status)
+ if (!status)
return status;

/* Make the other pages as ring buffer */
@@ -605,13 +605,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
/* Otherwise used as local loopback buffer. */
for (i = txpktbuf_bndy; i < maxPage; i++) {
status = _rtl92de_llt_write(hw, i, (i + 1));
- if (true != status)
+ if (!status)
return status;
}

/* Let last entry point to the start entry of ring buffer */
status = _rtl92de_llt_write(hw, maxPage, txpktbuf_bndy);
- if (true != status)
+ if (!status)
return status;

return true;
@@ -707,7 +707,7 @@ static bool _rtl92de_init_mac(struct ieee80211_hw *hw)

/* System init */
/* 18. LLT_table_init(Adapter); */
- if (_rtl92de_llt_table_init(hw) == false)
+ if (!_rtl92de_llt_table_init(hw))
return false;

/* Clear interrupt and enable interrupt */
@@ -920,7 +920,7 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
rtl92d_phy_reset_iqk_result(hw);
/* rtlpriv->intf_ops->disable_aspm(hw); */
rtstatus = _rtl92de_init_mac(hw);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Init MAC failed\n"));
err = 1;
spin_unlock_irqrestore(&globalmutex_for_power_and_efuse, flags);
@@ -1151,7 +1151,7 @@ void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4));
- } else if (check_bssid == false) {
+ } else if (!check_bssid) {
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
_rtl92de_set_bcn_ctrl_reg(hw, BIT(4), 0);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
@@ -2157,7 +2157,7 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
e_rfpowerstate_toset = ERFON;
ppsc->hwradiooff = false;
actuallyset = true;
- } else if ((ppsc->hwradiooff == false)
+ } else if ((!ppsc->hwradiooff)
&& (e_rfpowerstate_toset == ERFOFF)) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("GPIOChangeRF - HW Radio OFF, RF OFF\n"));
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
index 0883349..8c42d89 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
@@ -864,7 +864,7 @@ static bool _rtl92d_phy_bb_config(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, ("==>\n"));
rtstatus = _rtl92d_phy_config_bb_with_headerfile(hw,
BASEBAND_CONFIG_PHY_REG);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("Write BB Reg Fail!!"));
return false;
}
@@ -879,13 +879,13 @@ static bool _rtl92d_phy_bb_config(struct ieee80211_hw *hw)
rtstatus = _rtl92d_phy_config_bb_with_pgheaderfile(hw,
BASEBAND_CONFIG_PHY_REG);
}
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("BB_PG Reg Fail!!"));
return false;
}
rtstatus = _rtl92d_phy_config_bb_with_headerfile(hw,
BASEBAND_CONFIG_AGC_TAB);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("AGC Table Fail\n"));
return false;
}
@@ -1137,7 +1137,7 @@ void rtl92d_phy_set_txpower_level(struct ieee80211_hw *hw, u8 channel)
struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 cckpowerlevel[2], ofdmpowerlevel[2];

- if (rtlefuse->txpwr_fromeprom == false)
+ if (!rtlefuse->txpwr_fromeprom)
return;
channel = _rtl92c_phy_get_rightchnlplace(channel);
_rtl92d_get_txpower_index(hw, channel, &cckpowerlevel[0],
@@ -3334,7 +3334,7 @@ bool rtl92d_phy_set_rf_power_state(struct ieee80211_hw *hw,
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic enable\n"));
rtstatus = rtl_ps_enable_nic(hw);
- } while ((rtstatus != true) &&
+ } while ((!rtstatus) &&
(InitializeCount < 10));

RT_CLEAR_PS_LEVEL(ppsc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/rf.c b/drivers/net/wireless/rtlwifi/rtl8192de/rf.c
index db27ceb..683a39e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/rf.c
@@ -604,7 +604,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw)
u4_regvalue);
break;
}
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE,
("Radio[%d] Fail!!", rfpath));
goto phy_rf_cfg_fail;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
index 3fda6b1..18d5ee9 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
@@ -273,7 +273,7 @@ static bool _rtl92s_firmware_checkready(struct ieee80211_hw *hw,

/* Turn On CPU */
rtstatus = _rtl92s_firmware_enable_cpu(hw);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
("Enable CPU fail!\n"));
goto status_check_fail;
@@ -445,14 +445,14 @@ int rtl92s_download_fw(struct ieee80211_hw *hw)
rtstatus = _rtl92s_firmware_downloadcode(hw, puc_mappedfile,
ul_filelength);

- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("fail!\n"));
goto fail;
}

/* <3> Check whether load FW process is ready */
rtstatus = _rtl92s_firmware_checkready(hw, fwstatus);
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("fail!\n"));
goto fail;
}
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
index c474486..3ed7e20 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -967,7 +967,7 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
rtlhal->fwcmd_ioparam = rtl_read_dword(rtlpriv, LBUS_ADDR_MASK);

/* 3. Initialize MAC/PHY Config by MACPHY_reg.txt */
- if (rtl92s_phy_mac_config(hw) != true) {
+ if (!rtl92s_phy_mac_config(hw)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, ("MAC Config failed\n"));
return rtstatus;
}
@@ -977,7 +977,7 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
rtl_write_dword(rtlpriv, CMDR, 0x37FC);

/* 4. Initialize BB After MAC Config PHY_reg.txt, AGC_Tab.txt */
- if (rtl92s_phy_bb_config(hw) != true) {
+ if (!rtl92s_phy_bb_config(hw)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, ("BB Config failed\n"));
return rtstatus;
}
@@ -1013,7 +1013,7 @@ int rtl92se_hw_init(struct ieee80211_hw *hw)
else
rtl_write_byte(rtlpriv, RF_CTRL, 0x07);

- if (rtl92s_phy_rf_config(hw) != true) {
+ if (!rtl92s_phy_rf_config(hw)) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("RF Config failed\n"));
return rtstatus;
}
@@ -1110,7 +1110,7 @@ void rtl92se_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
if (check_bssid) {
reg_rcr |= (RCR_CBSSID);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
- } else if (check_bssid == false) {
+ } else if (!check_bssid) {
reg_rcr &= (~RCR_CBSSID);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
}
@@ -1351,7 +1351,7 @@ static void _rtl92se_gen_refreshledstate(struct ieee80211_hw *hw)
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
struct rtl_led *pLed0 = &(pcipriv->ledctl.sw_led0);

- if (rtlpci->up_first_time == 1)
+ if (rtlpci->up_first_time)
return;

if (rtlpriv->psc.rfoff_reason == RF_CHANGE_BY_IPS)
@@ -2271,7 +2271,7 @@ bool rtl92se_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
bool turnonbypowerdomain = false;

/* just 8191se can check gpio before firstup, 92c/92d have fixed it */
- if ((rtlpci->up_first_time == 1) || (rtlpci->being_init_adapter))
+ if ((rtlpci->up_first_time) || (rtlpci->being_init_adapter))
return false;

if (ppsc->swrf_processing)
@@ -2306,7 +2306,7 @@ bool rtl92se_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
rfpwr_toset = ERFON;
ppsc->hwradiooff = false;
actuallyset = true;
- } else if ((ppsc->hwradiooff == false) && (rfpwr_toset == ERFOFF)) {
+ } else if ((!ppsc->hwradiooff) && (rfpwr_toset == ERFOFF)) {
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("RFKILL-HW Radio OFF, RF OFF\n"));

diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
index f10ac1a..5672851 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/phy.c
@@ -558,7 +558,7 @@ bool rtl92s_phy_set_rf_power_state(struct ieee80211_hw *hw,
RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG,
("IPS Set eRf nic enable\n"));
rtstatus = rtl_ps_enable_nic(hw);
- } while ((rtstatus != true) &&
+ } while ((!rtstatus) &&
(InitializeCount < 10));

RT_CLEAR_PS_LEVEL(ppsc,
@@ -993,7 +993,7 @@ static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw)
rtstatus = false;
}

- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG,
("Write BB Reg Fail!!"));
goto phy_BB8190_Config_ParaFile_Fail;
@@ -1007,7 +1007,7 @@ static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw)
rtstatus = _rtl92s_phy_config_bb_with_pg(hw,
BASEBAND_CONFIG_PHY_REG);
}
- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG,
("_rtl92s_phy_bb_config_parafile(): "
"BB_PG Reg Fail!!"));
@@ -1017,7 +1017,7 @@ static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw)
/* 3. BB AGC table Initialization */
rtstatus = _rtl92s_phy_config_bb(hw, BASEBAND_CONFIG_AGC_TAB);

- if (rtstatus != true) {
+ if (!rtstatus) {
pr_err("%s(): AGC Table Fail\n", __func__);
goto phy_BB8190_Config_ParaFile_Fail;
}
@@ -1274,7 +1274,7 @@ void rtl92s_phy_set_txpower(struct ieee80211_hw *hw, u8 channel)
/* [0]:RF-A, [1]:RF-B */
u8 cckpowerlevel[2], ofdmpowerLevel[2];

- if (rtlefuse->txpwr_fromeprom == false)
+ if (!rtlefuse->txpwr_fromeprom)
return;

/* Mainly we use RF-A Tx Power to write the Tx Power registers,
@@ -1635,7 +1635,7 @@ bool rtl92s_phy_set_fw_cmd(struct ieee80211_hw *hw, enum fwcmd_iotype fw_cmdio)
break;
case FW_CMD_HIGH_PWR_ENABLE:
if (!(rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) &&
- (rtlpriv->dm.dynamic_txpower_enable != true)) {
+ (!rtlpriv->dm.dynamic_txpower_enable)) {
fw_cmdmap |= (FW_HIGH_PWR_ENABLE_CTL |
FW_SS_CTL);
FW_CMD_IO_SET(rtlpriv, fw_cmdmap);
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
index 0ad50fe..8c7035c 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/rf.c
@@ -508,7 +508,7 @@ bool rtl92s_phy_rf6052_config(struct ieee80211_hw *hw)
break;
}

- if (rtstatus != true) {
+ if (!rtstatus) {
pr_err("Radio[%d] Fail!!\n", rfpath);
goto fail;
}
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 187a199..4055d2e 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -741,7 +741,7 @@ static int one_time_init(void)
if (initialized)
return 0;

- power_mode = 0;
+ power_mode = false;

retval = init_cpqhp_routing_table();
if (retval)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index af295bb..6d63452 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3535,7 +3535,7 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,

if (flags & PCI_VGA_STATE_CHANGE_DECODES) {
pci_read_config_word(dev, PCI_COMMAND, &cmd);
- if (decode == true)
+ if (decode)
cmd |= command_bits;
else
cmd &= ~command_bits;
@@ -3551,7 +3551,7 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
if (bridge) {
pci_read_config_word(bridge, PCI_BRIDGE_CONTROL,
&cmd);
- if (decode == true)
+ if (decode)
cmd |= PCI_BRIDGE_CTL_VGA;
else
cmd &= ~PCI_BRIDGE_CTL_VGA;
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 849c0c1..3d6b263 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -28,7 +28,7 @@ static bool disable_clkrun;
module_param(disable_clkrun, bool, 0444);
MODULE_PARM_DESC(disable_clkrun, "If PC card doesn't function properly, please try this option");

-static bool isa_probe = 1;
+static bool isa_probe = true;
module_param(isa_probe, bool, 0444);
MODULE_PARM_DESC(isa_probe, "If set ISA interrupts are probed (default). Set to N to disable probing");

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 72d731c..29b45ba 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -1220,7 +1220,7 @@ static void asus_wmi_notify(u32 value, void *context)
int code;
int orig_code;
unsigned int key_value = 1;
- bool autorelease = 1;
+ bool autorelease = true;

status = wmi_get_event_data(value, &response);
if (status != AE_OK) {
diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c
index 9f6e643..b78ce3f 100644
--- a/drivers/platform/x86/eeepc-wmi.c
+++ b/drivers/platform/x86/eeepc-wmi.c
@@ -93,7 +93,7 @@ static void eeepc_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
switch (*code) {
case HOME_PRESS:
*value = 1;
- *autorelease = 0;
+ *autorelease = false;
break;
case HOME_HOLD:
*code = ASUS_WMI_KEY_IGNORE;
@@ -101,7 +101,7 @@ static void eeepc_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
case HOME_RELEASE:
*code = HOME_PRESS;
*value = 0;
- *autorelease = 0;
+ *autorelease = false;
break;
}
}
diff --git a/drivers/platform/x86/intel_rar_register.c b/drivers/platform/x86/intel_rar_register.c
index c8a6aed..d5dac24 100644
--- a/drivers/platform/x86/intel_rar_register.c
+++ b/drivers/platform/x86/intel_rar_register.c
@@ -119,7 +119,7 @@ static struct rar_device *alloc_rar_device(void)
{
if (my_rar_device.allocated)
return NULL;
- my_rar_device.allocated = 1;
+ my_rar_device.allocated = true;
return &my_rar_device;
}

@@ -132,7 +132,7 @@ static struct rar_device *alloc_rar_device(void)
static void free_rar_device(struct rar_device *rar)
{
pci_dev_put(rar->rar_dev);
- rar->allocated = 0;
+ rar->allocated = false;
}

/**
@@ -516,7 +516,7 @@ int register_rar(int num, int (*callback)(unsigned long data),
retval = -EBUSY;
goto done;
}
- c->busy = 1;
+ c->busy = true;

/* See if we have a handler for this RAR yet, if we do then fire it */
rar = rar_to_device(num, &idx);
@@ -557,7 +557,7 @@ void unregister_rar(int num)
if (c == NULL || !c->busy)
WARN_ON(1);
else
- c->busy = 0;
+ c->busy = false;
mutex_unlock(&rar_mutex);
}
EXPORT_SYMBOL(unregister_rar);
@@ -576,7 +576,7 @@ static void rar_callback(struct rar_device *rar)

mutex_lock(&rar_mutex);

- rar->registered = 1; /* Ensure no more callbacks queue */
+ rar->registered = true; /* Ensure no more callbacks queue */

for (i = 0; i < MRST_NUM_RAR; i++) {
if (c->callback && c->busy) {
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index bb51321..d7684fc 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -870,13 +870,13 @@ static int __init msi_init(void)
return -ENODEV;

if (force || dmi_check_system(msi_dmi_table))
- old_ec_model = 1;
+ old_ec_model = true;

if (!old_ec_model)
get_threeg_exists();

if (!old_ec_model && dmi_check_system(msi_load_scm_models_dmi_table))
- load_scm_model = 1;
+ load_scm_model = true;

if (auto_brightness < 0 || auto_brightness > 2)
return -EINVAL;
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index ea0c607..a5e0973 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3727,7 +3727,7 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
if (tp_features.hotkey_wlsw &&
hkey == TP_HKEY_EV_RFKILL_CHANGED) {
tpacpi_send_radiosw_update();
- send_acpi_ev = 0;
+ send_acpi_ev = false;
known_ev = true;
break;
}
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index dcdc1f4..bdb4154 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -407,7 +407,7 @@ static int bt_rfkill_set_block(void *data, bool blocked)
int err;
bool radio_state;

- value = (blocked == false);
+ value = (!blocked);

mutex_lock(&dev->mutex);
if (hci_get_radio_state(dev, &radio_state) != HCI_SUCCESS) {
diff --git a/drivers/power/da9030_battery.c b/drivers/power/da9030_battery.c
index 3fd3e95..11da3b2 100644
--- a/drivers/power/da9030_battery.c
+++ b/drivers/power/da9030_battery.c
@@ -236,10 +236,10 @@ static void da9030_set_charge(struct da9030_charger *charger, int on)
val = DA9030_CHRG_CHARGER_ENABLE;
val |= (charger->charge_milliamp / 100) << 3;
val |= (charger->charge_millivolt - 4000) / 50;
- charger->is_on = 1;
+ charger->is_on = true;
} else {
val = 0;
- charger->is_on = 0;
+ charger->is_on = false;
}

da903x_write(charger->master, DA9030_CHARGE_CONTROL, val);
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e9a83f8..76ff9dd 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3005,7 +3005,7 @@ EXPORT_SYMBOL_GPL(regulator_suspend_finish);
*/
void regulator_has_full_constraints(void)
{
- has_full_constraints = 1;
+ has_full_constraints = true;
}
EXPORT_SYMBOL_GPL(regulator_has_full_constraints);

diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c
index 515443f..bb3e0cf 100644
--- a/drivers/regulator/db8500-prcmu.c
+++ b/drivers/regulator/db8500-prcmu.c
@@ -238,7 +238,7 @@ static int db8500_regulator_switch_disable(struct regulator_dev *rdev)
goto out;
}

- info->is_enabled = 0;
+ info->is_enabled = false;
out:
return ret;
}
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 75d8940..67144ae 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -231,7 +231,7 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,
if (err) {
dev_info(max8952->dev, "EN gpio invalid: assume that EN"
"is always High\n");
- max8952->en = 1;
+ max8952->en = true;
pdata->gpio_en = -1; /* Mark invalid */
}

@@ -260,8 +260,8 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,
if (err) {
dev_warn(max8952->dev, "VID0/1 gpio invalid: "
"DVS not available.\n");
- max8952->vid0 = 0;
- max8952->vid1 = 0;
+ max8952->vid0 = false;
+ max8952->vid1 = false;
/* Mark invalid */
pdata->gpio_vid0 = -1;
pdata->gpio_vid1 = -1;
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index d26e864..27d4e90 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -608,7 +608,7 @@ static int max8997_assess_side_effect(struct regulator_dev *rdev,

if (others == rid)
continue;
- if (buckx_gpiodvs[others] == false)
+ if (!buckx_gpiodvs[others])
continue; /* Not affected */
diff = (buckx_val[others])[i] -
(buckx_val[others])[max8997->buck125_gpioindex];
@@ -694,7 +694,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev,
new_idx = tmp_idx;
new_val = tmp_val;

- if (max8997->ignore_gpiodvs_side_effect == false)
+ if (!max8997->ignore_gpiodvs_side_effect)
return -EINVAL;

dev_warn(&rdev->dev, "MAX8997 GPIO-DVS Side Effect Warning: GPIO SET:"
diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c
index 6186833..9221383 100644
--- a/drivers/rtc/rtc-isl12022.c
+++ b/drivers/rtc/rtc-isl12022.c
@@ -203,7 +203,7 @@ static int isl12022_set_datetime(struct i2c_client *client, struct rtc_time *tm)
return ret;
}

- isl12022->write_enabled = 1;
+ isl12022->write_enabled = true;
}

/* hours, minutes and seconds */
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index 9f1d6bc..3143a72 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -447,7 +447,7 @@ static int __devinit pm8xxx_rtc_probe(struct platform_device *pdev)
}

rtc_dd->ctrl_reg = ctrl_reg;
- if (rtc_write_enable == true)
+ if (rtc_write_enable)
pm8xxx_rtc_ops.set_time = pm8xxx_rtc_set_time;

platform_set_drvdata(pdev, rtc_dd);
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index f3b8bb8..935cdbc 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -75,7 +75,7 @@ static LIST_HEAD(raw3270_devices);
static int raw3270_registered;

/* Module parameters */
-static bool tubxcorrect = 0;
+static bool tubxcorrect = false;
module_param(tubxcorrect, bool, 0);

/*
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index b79576b..11f5d82 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -28,7 +28,7 @@ static bool enable_dif;
module_param_named(dif, enable_dif, bool, 0400);
MODULE_PARM_DESC(dif, "Enable DIF/DIX data integrity support");

-static bool allow_lun_scan = 1;
+static bool allow_lun_scan = true;
module_param(allow_lun_scan, bool, 0600);
MODULE_PARM_DESC(allow_lun_scan, "For NPIV, scan and attach all storage LUNs");

diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index ed119ce..5d0503a 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -102,7 +102,7 @@ static int setup_dmaspeed[MAXBOARDS] __initdata = { -1, -1, -1, -1 };
*/

#if defined(MODULE)
-static bool isapnp = 0;
+static bool isapnp = false;
static int aha1542[] = {0x330, 11, 4, -1};
module_param_array(aha1542, int, NULL, 0);
module_param(isapnp, bool, 0);
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index d3ff9cd..f1ba0d2 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1599,7 +1599,7 @@ static int skb_read_pdu_data(struct iscsi_conn *conn, struct sk_buff *lskb,
struct sk_buff *skb, unsigned int offset)
{
struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
- bool offloaded = 0;
+ bool offloaded = false;
int opcode = tcp_conn->in.hdr->opcode & ISCSI_OPCODE_MASK;

log_debug(1 << CXGBI_DBG_PDU_RX,
@@ -1622,7 +1622,7 @@ static int skb_read_pdu_data(struct iscsi_conn *conn, struct sk_buff *lskb,
offset += ISCSI_DIGEST_SIZE;

if (cxgbi_skcb_test_flag(lskb, SKCBF_RX_DATA_DDPD))
- offloaded = 1;
+ offloaded = true;

if (opcode == ISCSI_OP_SCSI_DATA_IN)
log_debug(1 << CXGBI_DBG_PDU_RX,
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 13aeca3..948875e 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -546,7 +546,7 @@ static struct ParameterData __devinitdata cfg_data[] = {
* command line overrides will be used. If set to 1 then safe and
* slow settings will be used.
*/
-static bool use_safe_settings = 0;
+static bool use_safe_settings = false;
module_param_named(safe, use_safe_settings, bool, 0);
MODULE_PARM_DESC(safe, "Use safe and slow settings only. Default: false");

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index b96962c..6e44897 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3020,7 +3020,7 @@ static inline bool interrupt_pending(struct ctlr_info *h)

static inline long interrupt_not_for_us(struct ctlr_info *h)
{
- return (h->access.intr_pending(h) == 0) ||
+ return (!h->access.intr_pending(h)) ||
(h->interrupts_enabled == 0);
}

diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c
index 1a65d65..f9c97e8 100644
--- a/drivers/scsi/isci/host.c
+++ b/drivers/scsi/isci/host.c
@@ -909,7 +909,7 @@ static enum sci_status sci_controller_start_next_phy(struct isci_host *ihost)
/*
* The controller has successfully finished the start process.
* Inform the SCI Core user and transition to the READY state. */
- if (is_controller_start_complete == true) {
+ if (is_controller_start_complete) {
sci_controller_transition_to_ready(ihost, SCI_SUCCESS);
sci_del_timer(&ihost->phy_timer);
ihost->phy_startup_timer_pending = false;
diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h
index 234ab46..584f24b 100644
--- a/drivers/scsi/isci/isci.h
+++ b/drivers/scsi/isci/isci.h
@@ -502,19 +502,19 @@ void sci_init_timer(struct sci_timer *tmr, void (*fn)(unsigned long))
{
tmr->timer.function = fn;
tmr->timer.data = (unsigned long) tmr;
- tmr->cancel = 0;
+ tmr->cancel = false;
init_timer(&tmr->timer);
}

static inline void sci_mod_timer(struct sci_timer *tmr, unsigned long msec)
{
- tmr->cancel = 0;
+ tmr->cancel = false;
mod_timer(&tmr->timer, jiffies + msecs_to_jiffies(msec));
}

static inline void sci_del_timer(struct sci_timer *tmr)
{
- tmr->cancel = 1;
+ tmr->cancel = true;
del_timer(&tmr->timer);
}

diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c
index 7c6ac58..a509d4b 100644
--- a/drivers/scsi/isci/port.c
+++ b/drivers/scsi/isci/port.c
@@ -690,7 +690,7 @@ void sci_port_deactivate_phy(struct isci_port *iport, struct isci_phy *iphy,
writel(iphy->phy_index,
&iport->port_pe_configuration_register[iphy->phy_index]);

- if (do_notify_user == true)
+ if (do_notify_user)
isci_port_link_down(ihost, iphy, iport);
}

@@ -1141,7 +1141,7 @@ enum sci_status sci_port_start(struct isci_port *iport)
* the port's phy mask is in fact legal and supported by the
* silicon.
*/
- if (sci_port_is_phy_mask_valid(iport, phy_mask) == true) {
+ if (sci_port_is_phy_mask_valid(iport, phy_mask)) {
port_state_machine_change(iport,
SCI_PORT_READY);

diff --git a/drivers/scsi/isci/port_config.c b/drivers/scsi/isci/port_config.c
index 6d1e954..9559837 100644
--- a/drivers/scsi/isci/port_config.c
+++ b/drivers/scsi/isci/port_config.c
@@ -566,7 +566,7 @@ static void sci_apc_agent_configure_ports(struct isci_host *ihost,
* Since we have gone through a timeout we are going to restrict the
* choice to the smallest possible port. */
if (
- (start_timer == false)
+ (!start_timer)
&& (apc_activity == SCIC_SDS_APC_START_TIMER)
) {
apc_activity = SCIC_SDS_APC_ADD_PHY;
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 23a2759..2560faf 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -11347,7 +11347,7 @@ lpfc_sli4_fp_handle_rel_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq,
}
}
/* Report warning log message if no match found */
- if (wqid_matched != true)
+ if (!wqid_matched)
lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
"2580 Fast-path wqe consume event carries "
"miss-matched qid: wcqe-qid=x%x\n", fcp_wqid);
@@ -11697,7 +11697,7 @@ lpfc_sli4_intr_handler(int irq, void *dev_id)
fp_handled |= true;
}

- return (fp_handled == true) ? IRQ_HANDLED : sp_irq_rc;
+ return (fp_handled) ? IRQ_HANDLED : sp_irq_rc;
} /* lpfc_sli4_intr_handler */

/**
@@ -14217,7 +14217,7 @@ lpfc_sli4_handle_unsol_abort(struct lpfc_vport *vport,
abts_par = lpfc_sli4_abort_partial_seq(vport, dmabuf);

/* Send abort to ULP if partially seq abort failed */
- if (abts_par == false)
+ if (!abts_par)
lpfc_sli4_send_seq_to_ulp(vport, dmabuf);
else
lpfc_in_buf_free(phba, &dmabuf->dbuf);
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 0029249..8fb9387 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -59,11 +59,11 @@ MODULE_PARM_DESC(trans_mode, "transfer mode (0: BIOS(default) 1: Async 2: Ultra2
#define ASYNC_MODE 1
#define ULTRA20M_MODE 2

-static bool auto_param = 0; /* default: ON */
+static bool auto_param = false; /* default: ON */
module_param (auto_param, bool, 0);
MODULE_PARM_DESC(auto_param, "AutoParameter mode (0: ON(default) 1: OFF)");

-static bool disc_priv = 1; /* default: OFF */
+static bool disc_priv = true; /* default: OFF */
module_param (disc_priv, bool, 0);
MODULE_PARM_DESC(disc_priv, "disconnection privilege mode (0: ON 1: OFF(default))");

@@ -373,7 +373,7 @@ static void nsp32_build_identify(struct scsi_cmnd *SCpnt)
int mode = FALSE;

/* XXX: Auto DiscPriv detection is progressing... */
- if (disc_priv == 0) {
+ if (!disc_priv) {
/* mode = TRUE; */
}

@@ -1035,7 +1035,7 @@ static int nsp32_queuecommand_lck(struct scsi_cmnd *SCpnt, void (*done)(struct s
target->ackwidth);

/* Selection */
- if (auto_param == 0) {
+ if (!auto_param) {
ret = nsp32_selection_autopara(SCpnt);
} else {
ret = nsp32_selection_autoscsi(SCpnt);
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index b61a753..5f42b10 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -70,7 +70,7 @@ module_param(nsp_burst_mode, int, 0);
MODULE_PARM_DESC(nsp_burst_mode, "Burst transfer mode (0=io8, 1=io32, 2=mem32(default))");

/* Release IO ports after configuration? */
-static bool free_ports = 0;
+static bool free_ports = false;
module_param(free_ports, bool, 0);
MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0 (=no))");

diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index 7264116..0c47a67 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -795,7 +795,7 @@ static int pvscsi_host_reset(struct scsi_cmnd *cmd)
use_msg = adapter->use_msg;

if (use_msg) {
- adapter->use_msg = 0;
+ adapter->use_msg = false;
spin_unlock_irqrestore(&adapter->hw_lock, flags);

/*
@@ -1095,10 +1095,10 @@ static void pvscsi_shutdown_intr(struct pvscsi_adapter *adapter)
}
if (adapter->use_msi) {
pci_disable_msi(adapter->dev);
- adapter->use_msi = 0;
+ adapter->use_msi = false;
} else if (adapter->use_msix) {
pci_disable_msix(adapter->dev);
- adapter->use_msix = 0;
+ adapter->use_msix = false;
}
}

@@ -1300,10 +1300,10 @@ static int __devinit pvscsi_probe(struct pci_dev *pdev,
if (!pvscsi_disable_msix &&
pvscsi_setup_msix(adapter, &adapter->irq) == 0) {
printk(KERN_INFO "vmw_pvscsi: using MSI-X\n");
- adapter->use_msix = 1;
+ adapter->use_msix = true;
} else if (!pvscsi_disable_msi && pci_enable_msi(pdev) == 0) {
printk(KERN_INFO "vmw_pvscsi: using MSI\n");
- adapter->use_msi = 1;
+ adapter->use_msi = true;
adapter->irq = pdev->irq;
} else {
printk(KERN_INFO "vmw_pvscsi: using INTx\n");
diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index bec81c2..113486a 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -560,7 +560,7 @@ static void maple_response_none(struct maple_device *mdev)
return;
} else {
if (!started || !fullscan) {
- if (checked[mdev->port] == false) {
+ if (!checked[mdev->port]) {
checked[mdev->port] = true;
empty[mdev->port] = true;
dev_info(&mdev->dev, "no devices"
@@ -579,7 +579,7 @@ static void maple_response_devinfo(struct maple_device *mdev,
{
char submask;
if (!started || (scanning == 2) || !fullscan) {
- if ((mdev->unit == 0) && (checked[mdev->port] == false)) {
+ if ((mdev->unit == 0) && (!checked[mdev->port])) {
checked[mdev->port] = true;
maple_attach_driver(mdev);
} else {
@@ -618,7 +618,7 @@ static void maple_port_rescan(void)

fullscan = 1;
for (i = 0; i < MAPLE_PORTS; i++) {
- if (checked[i] == false) {
+ if (!checked[i]) {
fullscan = 0;
mdev = baseunits[i];
maple_add_packet(mdev, 0, MAPLE_COMMAND_DEVINFO,
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c
index 24cacff..70cc14b 100644
--- a/drivers/spi/spi-fsl-spi.c
+++ b/drivers/spi/spi-fsl-spi.c
@@ -329,21 +329,21 @@ static int fsl_spi_cpm_bufs(struct mpc8xxx_spi *mspi,
struct fsl_spi_reg *reg_base = mspi->reg_base;

if (is_dma_mapped) {
- mspi->map_tx_dma = 0;
- mspi->map_rx_dma = 0;
+ mspi->map_tx_dma = false;
+ mspi->map_rx_dma = false;
} else {
- mspi->map_tx_dma = 1;
- mspi->map_rx_dma = 1;
+ mspi->map_tx_dma = true;
+ mspi->map_rx_dma = true;
}

if (!t->tx_buf) {
mspi->tx_dma = mspi->dma_dummy_tx;
- mspi->map_tx_dma = 0;
+ mspi->map_tx_dma = false;
}

if (!t->rx_buf) {
mspi->rx_dma = mspi->dma_dummy_rx;
- mspi->map_rx_dma = 0;
+ mspi->map_rx_dma = false;
}

if (mspi->map_tx_dma) {
diff --git a/drivers/spi/spi-ti-ssp.c b/drivers/spi/spi-ti-ssp.c
index 3f6f6e8..02a2ffe 100644
--- a/drivers/spi/spi-ti-ssp.c
+++ b/drivers/spi/spi-ti-ssp.c
@@ -362,11 +362,11 @@ static int __devexit ti_ssp_spi_remove(struct platform_device *pdev)
struct ti_ssp_spi *hw = platform_get_drvdata(pdev);
int error;

- hw->shutdown = 1;
+ hw->shutdown = true;
while (!list_empty(&hw->msg_queue)) {
error = wait_for_completion_interruptible(&hw->complete);
if (error < 0) {
- hw->shutdown = 0;
+ hw->shutdown = false;
return error;
}
}
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index bb6317f..8b467ad 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -45,7 +45,7 @@ static DEFINE_MUTEX(buses_mutex);
* these initializations to after early boot has finished.
* It's also used to avoid mutex locking, as that's not
* available and needed early. */
-static bool ssb_is_early_boot = 1;
+static bool ssb_is_early_boot = true;

static void ssb_buses_lock(void);
static void ssb_buses_unlock(void);
@@ -256,7 +256,7 @@ int ssb_devices_freeze(struct ssb_bus *bus, struct ssb_freeze_context *ctx)
continue;
}
sdrv->remove(sdev);
- ctx->device_frozen[i] = 1;
+ ctx->device_frozen[i] = true;
}

return 0;
@@ -1437,7 +1437,7 @@ static int __init ssb_modinit(void)
int err;

/* See the comment at the ssb_is_early_boot definition */
- ssb_is_early_boot = 0;
+ ssb_is_early_boot = false;
err = bus_register(&ssb_bustype);
if (err)
return err;
diff --git a/drivers/ssb/pcmcia.c b/drivers/ssb/pcmcia.c
index c821c6b..96db3ce 100644
--- a/drivers/ssb/pcmcia.c
+++ b/drivers/ssb/pcmcia.c
@@ -546,7 +546,7 @@ static int ssb_pcmcia_sprom_read_all(struct ssb_bus *bus, u16 *sprom)
static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom)
{
int i, err;
- bool failed = 0;
+ bool failed = false;
size_t size = SSB_PCMCIA_SPROM_SIZE;

ssb_printk(KERN_NOTICE PFX
@@ -573,7 +573,7 @@ static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom)
if (err) {
ssb_printk(KERN_NOTICE PFX
"Failed to write to SPROM.\n");
- failed = 1;
+ failed = true;
break;
}
}
@@ -581,7 +581,7 @@ static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom)
if (err) {
ssb_printk(KERN_NOTICE PFX
"Could not disable SPROM write access.\n");
- failed = 1;
+ failed = true;
}
msleep(500);
if (!failed) {
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 9bcf87a..209cd0b 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -61,7 +61,7 @@ EXPORT_SYMBOL(comedi_debug);
module_param(comedi_debug, int, 0644);
#endif

-bool comedi_autoconfig = 1;
+bool comedi_autoconfig = true;
module_param(comedi_autoconfig, bool, 0444);

static int comedi_num_legacy_minors;
@@ -2027,7 +2027,7 @@ static int __init comedi_init(void)
* comedi_num_legacy_minors are zero, so we might as well adjust the
* defaults in that case
*/
- if (comedi_autoconfig == 0 && comedi_num_legacy_minors == 0)
+ if (!comedi_autoconfig && comedi_num_legacy_minors == 0)
comedi_num_legacy_minors = 16;

memset(comedi_file_info_table, 0,
diff --git a/drivers/staging/cptm1217/clearpad_tm1217.c b/drivers/staging/cptm1217/clearpad_tm1217.c
index 5456f82..02d2d33 100644
--- a/drivers/staging/cptm1217/clearpad_tm1217.c
+++ b/drivers/staging/cptm1217/clearpad_tm1217.c
@@ -253,22 +253,22 @@ static void cp_tm1217_get_data(struct cp_tm1217_device *ts)
for (i = 0; i < TOUCH_SUPPORTED; i++) {
if (req[1] & 0x3) {
finger_touched++;
- if (ts->cp_input_info[i].touch.button == 0) {
+ if (!ts->cp_input_info[i].touch.button) {
/* send the button touch event */
input_report_key(
ts->cp_input_info[i].input,
BTN_TOUCH, 1);
- ts->cp_input_info[i].touch.button = 1;
+ ts->cp_input_info[i].touch.button = true;
}
process_touch(ts, i);
} else {
- if (ts->cp_input_info[i].touch.button == 1) {
+ if (ts->cp_input_info[i].touch.button) {
/* send the button release event */
input_report_key(
ts->cp_input_info[i].input,
BTN_TOUCH, 0);
input_sync(ts->cp_input_info[i].input);
- ts->cp_input_info[i].touch.button = 0;
+ ts->cp_input_info[i].touch.button = false;
}
}
req[1] = req[1] >> 2;
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c
index 5acf39e..75c6be6 100644
--- a/drivers/staging/crystalhd/crystalhd_hw.c
+++ b/drivers/staging/crystalhd/crystalhd_hw.c
@@ -1469,7 +1469,7 @@ static void crystalhd_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts)
uint32_t i, list_avail = 0;
enum BC_STATUS comp_sts = BC_STS_NO_DATA;
uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0;
- bool ret = 0;
+ bool ret = false;

if (!hw) {
BCMLOG_ERR("Invalid Arguments\n");
@@ -1800,7 +1800,7 @@ bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
{
uint32_t intr_sts = 0;
uint32_t deco_intr = 0;
- bool rc = 0;
+ bool rc = false;

if (!adp || !hw->dev_started)
return rc;
@@ -1813,7 +1813,7 @@ bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw)

if (intr_sts) {
/* let system know we processed interrupt..*/
- rc = 1;
+ rc = true;
hw->stats.dev_interrupts++;
}

@@ -1833,7 +1833,7 @@ bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, deco_intr);
/* FIXME: jarod: No udelay? might this be the real reason mini pci-e cards were stalling out? */
bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, 0);
- rc = 1;
+ rc = true;
}

/* Rx interrupts */
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 2c4069f..79dbcd5 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -838,11 +838,11 @@ static int et131x_init_eeprom(struct et131x_adapter *adapter)
* gather additional information that normally would
* come from the eeprom, like MAC Address
*/
- adapter->has_eeprom = 0;
+ adapter->has_eeprom = false;
return -EIO;
}
}
- adapter->has_eeprom = 1;
+ adapter->has_eeprom = true;

/* Read the EEPROM for information regarding LED behavior. Refer to
* ET1310_phy.c, et131x_xcvr_init(), for its use.
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
index f8b8e71..9e0929c 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
@@ -304,7 +304,7 @@ int card_download(struct net_device *dev, const u8 *pFileStart,
struct dsp_file_hdr *pFileHdr5;
struct dsp_image_info *pDspImageInfoV6 = NULL;
long requested_version;
- bool bGoodVersion = 0;
+ bool bGoodVersion = false;
struct drv_msg *pMailBoxData;
u16 *pUsData = NULL;
u16 *pUsFile = NULL;
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
index 43b1d36..d24f4ea 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
@@ -633,9 +633,9 @@ static int ft1000_reset_card(struct net_device *dev)

DEBUG("ft1000_hw:ft1000_reset_card called.....\n");

- info->fCondResetPend = 1;
+ info->fCondResetPend = true;
info->CardReady = 0;
- info->fProvComplete = 0;
+ info->fProvComplete = false;

/* Make sure we free any memory reserve for provisioning */
while (list_empty(&info->prov_list) == 0) {
@@ -666,7 +666,7 @@ static int ft1000_reset_card(struct net_device *dev)

info->CardReady = 1;

- info->fCondResetPend = 0;
+ info->fCondResetPend = false;

return TRUE;
}
@@ -752,8 +752,8 @@ int init_ft1000_netdev(struct ft1000_device *ft1000dev)
pInfo->DSP_TIME[1] = 0;
pInfo->DSP_TIME[2] = 0;
pInfo->DSP_TIME[3] = 0;
- pInfo->fAppMsgPend = 0;
- pInfo->fCondResetPend = 0;
+ pInfo->fAppMsgPend = false;
+ pInfo->fCondResetPend = false;
pInfo->usbboot = 0;
pInfo->dspalive = 0;
memset(&pInfo->tempbuf[0], 0, sizeof(pInfo->tempbuf));
@@ -1444,7 +1444,7 @@ static int ft1000_dsp_prov(void *arg)

msleep(100);

- info->fProvComplete = 1;
+ info->fProvComplete = true;
info->CardReady = 1;

return STATUS_SUCCESS;
@@ -1570,12 +1570,12 @@ static int ft1000_proc_drvmsg(struct ft1000_device *dev, u16 size)
* Send provisioning data to DSP
*/
if (list_empty(&info->prov_list) == 0) {
- info->fProvComplete = 0;
+ info->fProvComplete = false;
status = ft1000_dsp_prov(dev);
if (status != STATUS_SUCCESS)
goto out;
} else {
- info->fProvComplete = 1;
+ info->fProvComplete = true;
status =
ft1000_write_register(dev, FT1000_DB_HB,
FT1000_REG_DOORBELL);
@@ -1924,7 +1924,7 @@ int ft1000_poll(void* dev_id) {
else if (tempword & FT1000_DB_COND_RESET) {
DEBUG("ft1000_poll: FT1000_REG_DOORBELL message type: FT1000_DB_COND_RESET\n");

- if (info->fAppMsgPend == 0) {
+ if (!info->fAppMsgPend) {
// Reset ASIC and DSP

status = ft1000_read_dpram16(dev, FT1000_MAG_DSP_TIMER0, (u8 *)&(info->DSP_TIME[0]), FT1000_MAG_DSP_TIMER0_INDX);
@@ -1937,8 +1937,8 @@ int ft1000_poll(void* dev_id) {
info->ft1000_reset(dev->net);
}
else {
- info->fProvComplete = 0;
- info->fCondResetPend = 1;
+ info->fProvComplete = false;
+ info->fCondResetPend = true;
}

ft1000_write_register(dev, FT1000_DB_COND_RESET, FT1000_REG_DOORBELL);
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index eb853f7..ad4df99 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -1279,7 +1279,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
struct vmscsi_request *vm_srb;
struct stor_mem_pools *memp = scmnd->device->hostdata;

- if (storvsc_check_scsi_cmd(scmnd) == false) {
+ if (!storvsc_check_scsi_cmd(scmnd)) {
scmnd->scsi_done(scmnd);
return 0;
}
diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index 98c5c92..f7d5e9a 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -237,7 +237,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
u8 t;

__lis3l02dq_write_data_ready_config(&indio_dev->dev, state);
- if (state == false) {
+ if (!state) {
/*
* A possible quirk with teh handler is currently worked around
* by ensuring outstanding read events are cleared.
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index 6b824a1..16779f1 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -126,7 +126,7 @@ static int sca3000_read_first_n_hw_rb(struct iio_buffer *r,
if (copy_to_user(buf, rx, num_read))
ret = -EFAULT;
kfree(rx);
- r->stufftoread = 0;
+ r->stufftoread = false;
error_ret:
mutex_unlock(&st->lock);

@@ -262,7 +262,7 @@ static struct iio_buffer *sca3000_rb_allocate(struct iio_dev *indio_dev)

ring->private = indio_dev;
buf = &ring->buf;
- buf->stufftoread = 0;
+ buf->stufftoread = false;
buf->attrs = &sca3000_ring_attr;
iio_buffer_init(buf);

diff --git a/drivers/staging/iio/dac/ad5686.c b/drivers/staging/iio/dac/ad5686.c
index ce2d619..e26b8a3 100644
--- a/drivers/staging/iio/dac/ad5686.c
+++ b/drivers/staging/iio/dac/ad5686.c
@@ -233,7 +233,7 @@ static ssize_t ad5686_write_dac_powerdown(struct device *dev,
if (ret)
return ret;

- if (readin == true)
+ if (readin)
st->pwr_down_mask |= (0x3 << (this_attr->address * 2));
else
st->pwr_down_mask &= ~(0x3 << (this_attr->address * 2));
diff --git a/drivers/staging/iio/iio_dummy_evgen.c b/drivers/staging/iio/iio_dummy_evgen.c
index cdbf289..756c8ab 100644
--- a/drivers/staging/iio/iio_dummy_evgen.c
+++ b/drivers/staging/iio/iio_dummy_evgen.c
@@ -108,7 +108,7 @@ int iio_dummy_evgen_get_irq(void)

mutex_lock(&iio_evgen->lock);
for (i = 0; i < IIO_EVENTGEN_NO; i++)
- if (iio_evgen->inuse[i] == false) {
+ if (!iio_evgen->inuse[i]) {
ret = iio_evgen->base + i;
iio_evgen->inuse[i] = true;
break;
diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
index 3158f12..0147b59 100644
--- a/drivers/staging/iio/magnetometer/ak8975.c
+++ b/drivers/staging/iio/magnetometer/ak8975.c
@@ -355,7 +355,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)

mutex_lock(&data->lock);

- if (data->mode == 0) {
+ if (!data->mode) {
dev_err(&client->dev, "Operating mode is in power down mode\n");
ret = -EBUSY;
goto exit;
diff --git a/drivers/staging/media/easycap/easycap_ioctl.c b/drivers/staging/media/easycap/easycap_ioctl.c
index 9413b37..960d089 100644
--- a/drivers/staging/media/easycap/easycap_ioctl.c
+++ b/drivers/staging/media/easycap/easycap_ioctl.c
@@ -501,7 +501,7 @@ int adjust_format(struct easycap *peasycap,
return peasycap_best_format - easycap_format;
/*...........................................................................*/

- if (false != try) {
+ if (try) {
SAM("MISTAKE: true==try where is should be false\n");
return -EINVAL;
}
diff --git a/drivers/staging/media/lirc/lirc_igorplugusb.c b/drivers/staging/media/lirc/lirc_igorplugusb.c
index 7a25017..19e0402 100644
--- a/drivers/staging/media/lirc/lirc_igorplugusb.c
+++ b/drivers/staging/media/lirc/lirc_igorplugusb.c
@@ -62,7 +62,7 @@

/* debugging support */
#ifdef CONFIG_USB_DEBUG
-static bool debug = 1;
+static bool debug = true;
#else
static bool debug;
#endif
diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
index 8dd8897..50e2571 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -109,7 +109,7 @@ static int io;
static int irq;
static bool iommap;
static int ioshift;
-static bool softcarrier = 1;
+static bool softcarrier = true;
static bool share_irq;
static bool debug;
static int sense = -1; /* -1 = auto, 0 = active high, 1 = active low */
@@ -289,7 +289,7 @@ static unsigned long space_width;
/* fetch serial input packet (1 byte) from register offset */
static u8 sinp(int offset)
{
- if (iommap != 0)
+ if (iommap)
/* the register is memory-mapped */
offset <<= ioshift;

@@ -299,7 +299,7 @@ static u8 sinp(int offset)
/* write serial output packet (1 byte) of value to register offset */
static void soutp(int offset, u8 value)
{
- if (iommap != 0)
+ if (iommap)
/* the register is memory-mapped */
offset <<= ioshift;

@@ -859,10 +859,10 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)
* For memory mapped I/O you *might* need to use ioremap() first,
* for the NSLU2 it's done in boot code.
*/
- if (((iommap != 0)
+ if (((iommap)
&& (request_mem_region(iommap, 8 << ioshift,
LIRC_DRIVER_NAME) == NULL))
- || ((iommap == 0)
+ || ((!iommap)
&& (request_region(io, 8, LIRC_DRIVER_NAME) == NULL))) {
printk(KERN_ERR LIRC_DRIVER_NAME
": port %04x already in use\n", io);
@@ -912,7 +912,7 @@ static int __devinit lirc_serial_probe(struct platform_device *dev)
return 0;

exit_release_region:
- if (iommap != 0)
+ if (iommap)
release_mem_region(iommap, 8 << ioshift);
else
release_region(io, 8);
@@ -926,7 +926,7 @@ static int __devexit lirc_serial_remove(struct platform_device *dev)
{
free_irq(irq, (void *)&hardware);

- if (iommap != 0)
+ if (iommap)
release_mem_region(iommap, 8 << ioshift);
else
release_region(io, 8);
diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c
index 3544fee..2da23e1 100644
--- a/drivers/staging/mei/interrupt.c
+++ b/drivers/staging/mei/interrupt.c
@@ -81,7 +81,7 @@ static void _mei_cmpl(struct mei_cl *cl, struct mei_cl_cb *cb_pos)
*/
static void _mei_cmpl_iamthif(struct mei_device *dev, struct mei_cl_cb *cb_pos)
{
- if (dev->iamthif_canceled != 1) {
+ if (!dev->iamthif_canceled) {
dev->iamthif_state = MEI_IAMTHIF_READ_COMPLETE;
dev->iamthif_stall_timer = 0;
memcpy(cb_pos->response_buffer.data,
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 3d91993..3a8a8e2 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -313,7 +313,7 @@ static void dcon_source_switch(struct work_struct *work)
else {
/* Wait up to one second for the scanline interrupt */
wait_event_timeout(dcon_wait_queue,
- dcon->switched == true, HZ);
+ dcon->switched, HZ);
}

if (!dcon->switched)
diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c
index 897a3a9..2dfde59 100644
--- a/drivers/staging/quatech_usb2/quatech_usb2.c
+++ b/drivers/staging/quatech_usb2/quatech_usb2.c
@@ -807,7 +807,7 @@ static int qt2_write_room(struct tty_struct *tty)
int room = 0;
port_extra = qt2_get_port_private(port);

- if (port_extra->close_pending == true) {
+ if (port_extra->close_pending) {
dbg("%s(): port_extra->close_pending == true", __func__);
return -ENODEV;
}
@@ -1274,7 +1274,7 @@ static void qt2_unthrottle(struct tty_struct *tty)
/* Send command to box to start receiving stuff */
if (serial->dev->descriptor.idProduct != QUATECH_SSU2_100) {
qt2_boxstoprx(serial, port->number, 0);
- } else if (dev_extra->ReadBulkStopped == true) {
+ } else if (dev_extra->ReadBulkStopped) {
usb_fill_bulk_urb(port0->read_urb, serial->dev,
usb_rcvbulkpipe(serial->dev,
port0->bulk_in_endpointAddress),
@@ -1489,7 +1489,7 @@ __func__);
* would it know to do so?).
*/

- if (active_extra->close_pending == true) {
+ if (active_extra->close_pending) {
/* We are closing , stop reading */
dbg("%s - (active->close_pending == true", __func__);
if (dev_extra->open_ports <= 0) {
@@ -1640,7 +1640,7 @@ __func__);
i += 1;
break;
} /*end switch*/
- if (escapeflag == true)
+ if (escapeflag)
continue;
/* if we did an escape char, we don't need
* to mess around pushing data through the
@@ -1866,7 +1866,7 @@ static int qt2_boxsethw_flowctl(struct usb_serial *serial,
__u8 MSR_Value = 0;
__u16 MOUT_Value = 0;

- if (bSet == true) {
+ if (bSet) {
MCR_Value = QT2_SERIAL_MCR_RTS;
/* flow control, box will clear RTS line to prevent remote
* device from transmitting more chars */
@@ -1876,7 +1876,7 @@ static int qt2_boxsethw_flowctl(struct usb_serial *serial,
}
MOUT_Value = MCR_Value << 8;

- if (bSet == true) {
+ if (bSet) {
MSR_Value = QT2_SERIAL_MSR_CTS;
/* flow control on, box will inhibit tx data if CTS line is
* asserted */
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 04c2391..b285c42 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -2462,7 +2462,7 @@ void watch_dog_adaptive(unsigned long data)
TxPwrTracking87SE((struct net_device *)data);

/* Perform DIG immediately. */
- if (CheckDig((struct net_device *)data) == true)
+ if (CheckDig((struct net_device *)data))
queue_work(priv->ieee80211->wq, (void *)&priv->ieee80211->hw_dig_wq);
rtl8180_watch_dog((struct net_device *)data);

@@ -2520,7 +2520,7 @@ static void rtl8180_set_channel_map(u8 channel_plan, struct ieee80211_device *ie
}
case COUNTRY_CODE_GLOBAL_DOMAIN:
{
- GET_DOT11D_INFO(ieee)->bEnabled = 0;
+ GET_DOT11D_INFO(ieee)->bEnabled = false;
Dot11d_Reset(ieee);
ieee->bGlobalDomain = true;
break;
@@ -2682,7 +2682,7 @@ short rtl8180_init(struct net_device *dev)
init_timer(&priv->SwAntennaDiversityTimer);
priv->SwAntennaDiversityTimer.data = (unsigned long)dev;
priv->SwAntennaDiversityTimer.function = (void *)SwAntennaDiversityTimerCallback;
- priv->bDigMechanism = 1;
+ priv->bDigMechanism = true;
priv->InitialGain = 6;
priv->bXtalCalibration = false;
priv->XtalCal_Xin = 0;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 0da56c8..5af1c19 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -140,7 +140,7 @@ bool phy_RF8256_Config_ParaFile(struct net_device *dev)

rtStatus = rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF,
(enum rf90_radio_path)eRFPath);
- if (rtStatus != true) {
+ if (!rtStatus) {
RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check "
"Radio[%d] Fail!!\n", eRFPath);
goto phy_RF8256_Config_ParaFile_Fail;
@@ -245,7 +245,7 @@ void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel)
struct r8192_priv *priv = rtllib_priv(dev);

TxAGC = powerlevel;
- if (priv->bDynamicTxLowPower == true) {
+ if (priv->bDynamicTxLowPower) {
if (priv->CustomerID == RT_CID_819x_Netcore)
TxAGC = 0x22;
else
@@ -294,7 +294,7 @@ void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel)
priv->Pwr_Track = writeVal_tmp;
}

- if (priv->bDynamicTxHighPower == true)
+ if (priv->bDynamicTxHighPower)
writeVal = 0x03030303;
else
writeVal = (byte3 << 24) | (byte2 << 16) |
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 808aab6..5cb1498 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -720,7 +720,7 @@ start:
}
priv->pFirmware->firmware_status = FW_STATUS_0_INIT;

- if (priv->RegRfOff == true)
+ if (priv->RegRfOff)
priv->rtllib->eRFPowerState = eRfOff;

ulRegRead = read_nic_dword(dev, CPU_GEN);
@@ -745,7 +745,7 @@ start:
}
RT_TRACE(COMP_INIT, "BB Config Start!\n");
rtStatus = rtl8192_BBConfig(dev);
- if (rtStatus != true) {
+ if (!rtStatus) {
RT_TRACE(COMP_ERR, "BB Config failed\n");
return rtStatus;
}
@@ -856,7 +856,7 @@ start:
if (priv->ResetProgress == RESET_TYPE_NORESET) {
RT_TRACE(COMP_INIT, "RF Config Started!\n");
rtStatus = rtl8192_phy_RFConfig(dev);
- if (rtStatus != true) {
+ if (!rtStatus) {
RT_TRACE(COMP_ERR, "RF Config failed\n");
return rtStatus;
}
@@ -869,7 +869,7 @@ start:

write_nic_byte(dev, 0x87, 0x0);

- if (priv->RegRfOff == true) {
+ if (priv->RegRfOff) {
RT_TRACE((COMP_INIT | COMP_RF | COMP_POWER),
"%s(): Turn off RF for RegRfOff ----------\n",
__func__);
@@ -2208,7 +2208,7 @@ rtl8192_InitializeVariables(struct net_device *dev)
priv->MidHighPwrTHR_L2 = 0x40;
priv->PwrDomainProtect = false;

- priv->bfirst_after_down = 0;
+ priv->bfirst_after_down = false;
}

void rtl8192_EnableInterrupt(struct net_device *dev)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
index 3771985..fd2ac83 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c
@@ -328,7 +328,7 @@ bool init_firmware(struct net_device *dev)
}

rt_status = fw_download_code(dev, mapped_file, file_length);
- if (rt_status != true) {
+ if (!rt_status) {
goto download_firmware_fail;
}

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 3e705ef..7cded98 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -567,7 +567,7 @@ static bool rtl8192_BB_Config_ParaFile(struct net_device *dev)
rtStatus = rtl8192_phy_checkBBAndRF(dev,
(enum hw90_block)eCheckItem,
(enum rf90_radio_path)0);
- if (rtStatus != true) {
+ if (!rtStatus) {
RT_TRACE((COMP_ERR | COMP_PHY), "PHY_RF8256_Config():"
"Check PHY%d Fail!!\n", eCheckItem-1);
return rtStatus;
@@ -1425,7 +1425,7 @@ static bool SetRFPowerState8190(struct net_device *dev,
u8 i = 0, QueueID = 0;
struct rtl8192_tx_ring *ring = NULL;

- if (priv->SetRFPowerStateInProgress == true)
+ if (priv->SetRFPowerStateInProgress)
return false;
RT_TRACE(COMP_PS, "===========> SetRFPowerState8190()!\n");
priv->SetRFPowerStateInProgress = true;
@@ -1443,10 +1443,10 @@ static bool SetRFPowerState8190(struct net_device *dev,
InitilizeCount--;
priv->RegRfOff = false;
rtstatus = NicIFEnableNIC(dev);
- } while ((rtstatus != true) &&
+ } while ((!rtstatus) &&
(InitilizeCount > 0));

- if (rtstatus != true) {
+ if (!rtstatus) {
RT_TRACE(COMP_ERR, "%s():Initialize Ada"
"pter fail,return\n",
__func__);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 71adb6b..cd1822d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -370,7 +370,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
priv->rtllib->RfOffReason &= (~ChangeSource);

if ((ChangeSource == RF_CHANGE_BY_HW) &&
- (priv->bHwRadioOff == true))
+ (priv->bHwRadioOff))
priv->bHwRadioOff = false;

if (!priv->rtllib->RfOffReason) {
@@ -405,7 +405,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
}
}
if ((ChangeSource == RF_CHANGE_BY_HW) &&
- (priv->bHwRadioOff == false))
+ (!priv->bHwRadioOff))
priv->bHwRadioOff = true;
priv->rtllib->RfOffReason |= ChangeSource;
bActionAllowed = true;
@@ -427,7 +427,7 @@ bool MgntActSet_RF_State(struct net_device *dev,
PHY_SetRFPowerState(dev, StateToSet);
if (StateToSet == eRfOn) {

- if (bConnectBySSID && (priv->blinked_ingpio == true)) {
+ if (bConnectBySSID && (priv->blinked_ingpio)) {
queue_delayed_work_rsl(ieee->wq,
&ieee->associate_procedure_wq, 0);
priv->blinked_ingpio = false;
@@ -955,7 +955,7 @@ static int _rtl8192_sta_up(struct net_device *dev, bool is_silent_reset)
RT_TRACE(COMP_INIT, "Bringing up iface");
priv->bfirst_init = true;
init_status = priv->ops->initialize_adapter(dev);
- if (init_status != true) {
+ if (!init_status) {
RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
__func__);
priv->bfirst_init = false;
@@ -1000,7 +1000,7 @@ static int rtl8192_sta_down(struct net_device *dev, bool shutdownrf)
priv->bDriverIsGoingToUnload = true;
priv->up = 0;
priv->rtllib->ieee_up = 0;
- priv->bfirst_after_down = 1;
+ priv->bfirst_after_down = true;
RT_TRACE(COMP_DOWN, "==========>%s()\n", __func__);
if (!netif_queue_stopped(dev))
netif_stop_queue(dev);
@@ -1119,8 +1119,8 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->rtllib->hwscan_sem_up = 1;
priv->rtllib->status = 0;
priv->H2CTxCmdSeq = 0;
- priv->bDisableFrameBursting = 0;
- priv->bDMInitialGainEnable = 1;
+ priv->bDisableFrameBursting = false;
+ priv->bDMInitialGainEnable = true;
priv->polling_timer_on = 0;
priv->up_first_time = 1;
priv->blinked_ingpio = false;
@@ -1162,7 +1162,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->CckPwEnl = 6;
priv->ScanDelay = 50;
priv->ResetProgress = RESET_TYPE_NORESET;
- priv->bForcedSilentReset = 0;
+ priv->bForcedSilentReset = false;
priv->bDisableNormalResetCheck = false;
priv->force_reset = false;
memset(priv->rtllib->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
@@ -1171,7 +1171,7 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
priv->RxCounter = 0;
priv->rtllib->wx_set_enc = 0;
priv->bHwRadioOff = false;
- priv->RegRfOff = 0;
+ priv->RegRfOff = false;
priv->isRFOff = false;
priv->bInPowerSaveMode = false;
priv->rtllib->RfOffReason = 0;
@@ -1647,7 +1647,7 @@ void rtl819x_watchdog_wqcallback(void *data)
bool bHigherBusyRxTraffic = false;
bool bEnterPS = false;

- if (IS_NIC_DOWN(priv) || (priv->bHwRadioOff == true))
+ if (IS_NIC_DOWN(priv) || (priv->bHwRadioOff))
return;

if (priv->rtllib->state >= RTLLIB_LINKED) {
@@ -3048,7 +3048,7 @@ bool NicIFEnableNIC(struct net_device *dev)
RT_TRACE(COMP_PS, "===========>%s()\n", __func__);
priv->bfirst_init = true;
init_status = priv->ops->initialize_adapter(dev);
- if (init_status != true) {
+ if (!init_status) {
RT_TRACE(COMP_ERR, "ERR!!! %s(): initialization is failed!\n",
__func__);
priv->bdisable_nic = false;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index a7fa9aa..0b57357 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -535,7 +535,7 @@ static void dm_TXPowerTrackingCallback_TSSI(struct net_device *dev)
}
}

- if (viviflag == true) {
+ if (viviflag) {
write_nic_byte(dev, Pw_Track_Flag, 0);
viviflag = false;
RT_TRACE(COMP_POWER_TRACKING, "we filted this data\n");
@@ -2265,7 +2265,7 @@ void dm_CheckRfCtrlGPIO(void *data)
return;

if (priv->bfirst_after_down) {
- priv->bfirst_after_down = 1;
+ priv->bfirst_after_down = true;
return;
}

@@ -2273,12 +2273,12 @@ void dm_CheckRfCtrlGPIO(void *data)

eRfPowerStateToSet = (tmp1byte&BIT1) ? eRfOn : eRfOff;

- if ((priv->bHwRadioOff == true) && (eRfPowerStateToSet == eRfOn)) {
+ if ((priv->bHwRadioOff) && (eRfPowerStateToSet == eRfOn)) {
RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio ON\n");
printk(KERN_INFO "gpiochangeRF - HW Radio ON\n");
priv->bHwRadioOff = false;
bActuallySet = true;
- } else if ((priv->bHwRadioOff == false) && (eRfPowerStateToSet == eRfOff)) {
+ } else if ((!priv->bHwRadioOff) && (eRfPowerStateToSet == eRfOff)) {
RT_TRACE(COMP_RF, "gpiochangeRF - HW Radio OFF\n");
printk(KERN_INFO "gpiochangeRF - HW Radio OFF\n");
priv->bHwRadioOff = true;
@@ -2289,7 +2289,7 @@ void dm_CheckRfCtrlGPIO(void *data)
mdelay(1000);
priv->bHwRfOffAction = 1;
MgntActSet_RF_State(dev, eRfPowerStateToSet, RF_CHANGE_BY_HW, true);
- if (priv->bHwRadioOff == true)
+ if (priv->bHwRadioOff)
argv[1] = "RFOFF";
else
argv[1] = "RFON";
@@ -2312,9 +2312,9 @@ void dm_rf_pathcheck_workitemcallback(void *data)

for (i = 0; i < RF90_PATH_MAX; i++) {
if (rfpath & (0x01<<i))
- priv->brfpath_rxenable[i] = 1;
+ priv->brfpath_rxenable[i] = true;
else
- priv->brfpath_rxenable[i] = 0;
+ priv->brfpath_rxenable[i] = false;
}
if (!DM_RxPathSelTable.Enable)
return;
@@ -2947,7 +2947,7 @@ static void dm_dynamic_txpower(struct net_device *dev)
} else {
if (priv->undecorated_smoothed_pwdb <
txlowpower_threshold &&
- priv->bDynamicTxHighPower == true)
+ priv->bDynamicTxHighPower)
priv->bDynamicTxHighPower = false;
if (priv->undecorated_smoothed_pwdb < 35)
priv->bDynamicTxLowPower = true;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 711a096..54045c9 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -264,7 +264,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee,
psearch_list = &ieee->Rx_TS_Admit_List;

for (dir = 0; dir <= DIR_BI_DIR; dir++) {
- if (search_dir[dir] == false)
+ if (!search_dir[dir])
continue;
list_for_each_entry(pRet, psearch_list, List) {
if (memcmp(pRet->Addr, Addr, 6) == 0)
@@ -348,7 +348,7 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
if (*ppTS != NULL) {
return true;
} else {
- if (bAddNewTs == false) {
+ if (!bAddNewTs) {
RTLLIB_DEBUG(RTLLIB_DL_TS, "add new TS failed"
"(tid:%d)\n", UP);
return false;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 6c5061f..67ea1fe 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -869,11 +869,11 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
if (net_ratelimit())
printk(KERN_INFO "%s: find HTCControl!\n", __func__);
hdrlen += 4;
- rx_stats->bContainHTC = 1;
+ rx_stats->bContainHTC = true;
}

if (RTLLIB_QOS_HAS_SEQ(fc))
- rx_stats->bIsQosData = 1;
+ rx_stats->bIsQosData = true;

return hdrlen;
}
@@ -1726,7 +1726,7 @@ static inline void rtllib_extract_country_ie(
network->CountryIeLen = info_element->len;

if (!IS_COUNTRY_IE_VALID(ieee)) {
- if ((rtllib_act_scanning(ieee, false) == true) && (ieee->FirstIe_InScan == 1))
+ if ((rtllib_act_scanning(ieee, false)) && (ieee->FirstIe_InScan))
printk(KERN_INFO "Received beacon ContryIE, SSID: <%s>\n", network->ssid);
Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
}
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1637f11..3eac68d 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -603,7 +603,7 @@ static void rtllib_softmac_scan_wq(void *data)

if (!ieee->ieee_up)
return;
- if (rtllib_act_scanning(ieee, true) == true)
+ if (rtllib_act_scanning(ieee, true))
return;

down(&ieee->scan_sem);
@@ -704,7 +704,7 @@ static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
ieee->scan_watch_dog = 0;
if (ieee->scanning_continue == 1) {
ieee->scanning_continue = 0;
- ieee->actscanning = 0;
+ ieee->actscanning = false;

cancel_delayed_work(&ieee->softmac_scan_wq);
}
@@ -1201,7 +1201,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,

if ((ieee->rtllib_ap_sec_type &&
(ieee->rtllib_ap_sec_type(ieee) & SEC_ALG_TKIP)) ||
- (ieee->bForcedBgMode == true)) {
+ (ieee->bForcedBgMode)) {
ieee->pHTInfo->bEnableHT = 0;
ieee->mode = WIRELESS_MODE_G;
}
@@ -1534,7 +1534,7 @@ static void rtllib_associate_complete_wq(void *data)
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
(&(ieee->PowerSaveControl));
printk(KERN_INFO "Associated successfully\n");
- if (ieee->is_silent_reset == 0) {
+ if (!ieee->is_silent_reset) {
printk(KERN_INFO "normal associate\n");
notify_wx_assoc_event(ieee);
}
@@ -1571,9 +1571,9 @@ static void rtllib_associate_complete_wq(void *data)
pPSC->LpsIdleCount = 0;
ieee->link_change(ieee->dev);

- if (ieee->is_silent_reset == 1) {
+ if (ieee->is_silent_reset) {
printk(KERN_INFO "silent reset associate\n");
- ieee->is_silent_reset = 0;
+ ieee->is_silent_reset = false;
}

if (ieee->data_hard_resume)
@@ -2003,7 +2003,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
return 0;

if (time) {
- if (ieee->bAwakePktSent == true) {
+ if (ieee->bAwakePktSent) {
pPSC->LPSAwakeIntvl = 1;
} else {
u8 MaxPeriod = 1;
@@ -2338,7 +2338,7 @@ inline int rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,

if (ieee->current_network.mode ==
IEEE_N_24G &&
- bHalfSupportNmode == true) {
+ bHalfSupportNmode) {
printk(KERN_INFO "======>enter "
"half N mode\n");
ieee->bHalfWirelessN24GMode =
@@ -3103,7 +3103,7 @@ void rtllib_softmac_init(struct rtllib_device *ieee)
ieee->sta_edca_param[2] = 0x005E4342;
ieee->sta_edca_param[3] = 0x002F3262;
ieee->aggregation = true;
- ieee->enable_rx_imm_BA = 1;
+ ieee->enable_rx_imm_BA = true;
ieee->tx_pending.txb = NULL;

_setup_timer(&ieee->associate_timer,
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index f451bfc..9063f06 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -910,7 +910,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->data_rate = CURRENT_RATE(ieee->mode,
ieee->rate, ieee->HTCurrentOperaRate);

- if (bdhcp == true) {
+ if (bdhcp) {
if (ieee->pHTInfo->IOTAction &
HT_IOT_ACT_WA_IOT_Broadcom) {
tcb_desc->data_rate =
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index c27ff7e..df617ed 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -753,7 +753,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee,
/* leave break out intentionly */

case IW_MLME_DISASSOC:
- if (deauth == true)
+ if (deauth)
printk(KERN_INFO "disauth packet !\n");
else
printk(KERN_INFO "dis associate packet!\n");
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index c9bdc7f..01cad0e 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -950,7 +950,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
if(net_ratelimit())
printk("find HTCControl\n");
hdrlen += 4;
- rx_stats->bContainHTC = 1;
+ rx_stats->bContainHTC = true;
}

//IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA, skb->data, skb->len);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index c2ab5fa..f82544b 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1361,14 +1361,14 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
ieee->LinkDetectInfo.NumRecvDataInPeriod= 1;
}
ieee->link_change(ieee->dev);
- if(ieee->is_silent_reset == 0){
+ if(!ieee->is_silent_reset){
printk("============>normal associate\n");
notify_wx_assoc_event(ieee);
}
- else if(ieee->is_silent_reset == 1)
+ else if(ieee->is_silent_reset)
{
printk("==================>silent reset associate\n");
- ieee->is_silent_reset = 0;
+ ieee->is_silent_reset = false;
}

if (ieee->data_hard_resume)
@@ -2048,7 +2048,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
ieee->SetWirelessMode(ieee->dev, IEEE_G);
}

- if (ieee->current_network.mode == IEEE_N_24G && bHalfSupportNmode == true)
+ if (ieee->current_network.mode == IEEE_N_24G && bHalfSupportNmode)
{
printk("===============>entern half N mode\n");
ieee->bHalfWirelessN24GMode = true;
@@ -2714,7 +2714,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
ieee->sta_edca_param[2] = 0x005E4342;
ieee->sta_edca_param[3] = 0x002F3262;
ieee->aggregation = true;
- ieee->enable_rx_imm_BA = 1;
+ ieee->enable_rx_imm_BA = true;
ieee->tx_pending.txb = NULL;

init_timer(&ieee->associate_timer);
diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
index 957ce4e..e7c8e7f 100644
--- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c
@@ -285,7 +285,7 @@ PTS_COMMON_INFO SearchAdmitTRStream(struct ieee80211_device *ieee, u8* Addr, u8
//for(dir = DIR_UP; dir <= DIR_BI_DIR; dir++)
for(dir = 0; dir <= DIR_BI_DIR; dir++)
{
- if(search_dir[dir] ==false )
+ if(!search_dir[dir])
continue;
list_for_each_entry(pRet, psearch_list, List){
// IEEE80211_DEBUG(IEEE80211_DL_TS, "ADD:%pM, TID:%d, dir:%d\n", pRet->Addr, pRet->TSpec.f.TSInfo.field.ucTSID, pRet->TSpec.f.TSInfo.field.ucDirection);
@@ -402,7 +402,7 @@ bool GetTs(
}
else
{
- if(bAddNewTs == false)
+ if(!bAddNewTs)
{
IEEE80211_DEBUG(IEEE80211_DL_TS, "add new TS failed(tid:%d)\n", UP);
return false;
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index c09be0a..fa4f53e 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -229,7 +229,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv)
}
case COUNTRY_CODE_GLOBAL_DOMAIN:
{
- GET_DOT11D_INFO(ieee)->bEnabled = 0;//this flag enabled to follow 11d country IE setting, otherwise, it shall follow global domain settings.
+ GET_DOT11D_INFO(ieee)->bEnabled = false;//this flag enabled to follow 11d country IE setting, otherwise, it shall follow global domain settings.
Dot11d_Reset(ieee);
ieee->bGlobalDomain = true;
break;
@@ -2723,7 +2723,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
//for silent reset
priv->IrpPendingCount = 1;
priv->ResetProgress = RESET_TYPE_NORESET;
- priv->bForcedSilentReset = 0;
+ priv->bForcedSilentReset = false;
priv->bDisableNormalResetCheck = false;
priv->force_reset = false;

diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 2dde9fa..6513e07 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -3002,9 +3002,9 @@ extern void dm_rf_pathcheck_workitemcallback(struct work_struct *work)
for (i = 0; i < RF90_PATH_MAX; i++)
{
if (rfpath & (0x01<<i))
- priv->brfpath_rxenable[i] = 1;
+ priv->brfpath_rxenable[i] = true;
else
- priv->brfpath_rxenable[i] = 0;
+ priv->brfpath_rxenable[i] = false;
}
if(!DM_RxPathSelTable.Enable)
return;
@@ -3810,7 +3810,7 @@ static void dm_dynamic_txpower(struct net_device *dev)
else
{
// high power state check
- if(priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower == true)
+ if(priv->undecorated_smoothed_pwdb < txlowpower_threshold && priv->bDynamicTxHighPower)
{
priv->bDynamicTxHighPower = false;
}
diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
index 4bb5fff..77e490b 100644
--- a/drivers/staging/rtl8192u/r819xU_firmware.c
+++ b/drivers/staging/rtl8192u/r819xU_firmware.c
@@ -343,7 +343,7 @@ bool init_firmware(struct net_device *dev)
#ifdef RTL8190P
// To initialize IMEM, CPU move code from 0x80000080, hence, we send 0x80 byte packet
rt_status = fwSendNullPacket(dev, RTL8190_CPU_START_OFFSET);
- if(rt_status != true)
+ if(!rt_status)
{
RT_TRACE(COMP_INIT, "fwSendNullPacket() fail ! \n");
goto download_firmware_fail;
diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index c4586b0..34f5eb2 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1066,7 +1066,7 @@ bool rtl8192_SetRFPowerState(struct net_device *dev, RT_RF_POWER_STATE eRFPowerS
if(eRFPowerState == priv->ieee80211->eRFPowerState)
return false;

- if(priv->SetRFPowerStateInProgress == true)
+ if(priv->SetRFPowerStateInProgress)
return false;

priv->SetRFPowerStateInProgress = true;
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 6b3d156..07e7e74 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -1523,7 +1523,7 @@ static int sep_prepare_input_dma_table(struct sep_device *sep,
}

/* Check if the pages are in Kernel Virtual Address layout */
- if (is_kva == true)
+ if (is_kva)
/* Lock the pages in the kernel */
error = sep_lock_kernel_pages(sep, app_virt_addr,
data_size, &lli_array_ptr, SEP_DRIVER_IN_FLAG);
@@ -1928,7 +1928,7 @@ static int sep_prepare_input_output_dma_table(struct sep_device *sep,
sep->dma_res_arr[sep->nr_dcb_creat].out_page_array = NULL;

/* Lock the pages of the buffer and translate them to pages */
- if (is_kva == true) {
+ if (is_kva) {
error = sep_lock_kernel_pages(sep, app_virt_in_addr,
data_size, &lli_in_array, SEP_DRIVER_IN_FLAG);

@@ -2077,11 +2077,11 @@ static int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep,
dcb_table_ptr->tail_data_size = 0;
dcb_table_ptr->out_vr_tail_pt = 0;

- if (isapplet == true) {
+ if (isapplet) {

/* Check if there is enough data for DMA operation */
if (data_in_size < SEP_DRIVER_MIN_DATA_SIZE_PER_TABLE) {
- if (is_kva == true) {
+ if (is_kva) {
memcpy(dcb_table_ptr->tail_data,
(void *)app_in_address, data_in_size);
} else {
@@ -2122,7 +2122,7 @@ static int sep_prepare_input_output_dma_table_in_dcb(struct sep_device *sep,
if (tail_size) {
if (tail_size > sizeof(dcb_table_ptr->tail_data))
return -EINVAL;
- if (is_kva == true) {
+ if (is_kva) {
memcpy(dcb_table_ptr->tail_data,
(void *)(app_in_address + data_in_size -
tail_size), tail_size);
@@ -2215,7 +2215,7 @@ static int sep_free_dma_tables_and_dcb(struct sep_device *sep, bool isapplet,
unsigned long pt_hold;
void *tail_pt;

- if (isapplet == true) {
+ if (isapplet) {
/* Set pointer to first DCB table */
dcb_table_ptr = (struct sep_dcblock *)
(sep->shared_addr +
@@ -2226,7 +2226,7 @@ static int sep_free_dma_tables_and_dcb(struct sep_device *sep, bool isapplet,
if (dcb_table_ptr->out_vr_tail_pt) {
pt_hold = (unsigned long)dcb_table_ptr->out_vr_tail_pt;
tail_pt = (void *)pt_hold;
- if (is_kva == true) {
+ if (is_kva) {
memcpy(tail_pt,
dcb_table_ptr->tail_data,
dcb_table_ptr->tail_data_size);
diff --git a/drivers/staging/tidspbridge/dynload/cload.c b/drivers/staging/tidspbridge/dynload/cload.c
index fe1ef0a..e695658 100644
--- a/drivers/staging/tidspbridge/dynload/cload.c
+++ b/drivers/staging/tidspbridge/dynload/cload.c
@@ -1101,7 +1101,7 @@ static int relocate_packet(struct dload_state *dlthis,
/* If trampoline(s) were generated, we need to do an update of the
* trampoline copy of the packet since a 2nd phase relo will be done
* later. */
- if (*tramps_generated == true) {
+ if (*tramps_generated) {
dload_tramp_pkt_udpate(dlthis,
(dlthis->image_secn -
dlthis->ldr_sections),
@@ -1242,7 +1242,7 @@ static void dload_data(struct dload_state *dlthis)
* trampoline was generated. Otherwise it
*will be done during trampoline finalize. */

- if (tramp_generated == false) {
+ if (!tramp_generated) {

/* stuff the result into target
* memory */
diff --git a/drivers/staging/tidspbridge/dynload/reloc.c b/drivers/staging/tidspbridge/dynload/reloc.c
index 7b28c07..769c318 100644
--- a/drivers/staging/tidspbridge/dynload/reloc.c
+++ b/drivers/staging/tidspbridge/dynload/reloc.c
@@ -184,7 +184,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
* relocation doesn't guarantee that data is coming from an
* image_packet_t structure. See cload.c, dload_data for how img_data is
* set. If that changes this needs to be updated!!! */
- if (second_pass == false)
+ if (!second_pass)
img_pkt = (struct image_packet_t *)((u8 *) data -
sizeof(struct
image_packet_t));
@@ -226,7 +226,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
if (RFV_SYM(reloc_info)) { /* relocation uses a symbol reference */
/* If this is first pass, use the module local symbol table,
* else use the trampoline symbol table. */
- if (second_pass == false) {
+ if (!second_pass) {
if ((u32) rp->SYMNDX < dlthis->dfile_hdr.df_no_syms) {
/* real symbol reference */
svp = &dlthis->local_symtab[rp->SYMNDX];
@@ -444,7 +444,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t * data,
/* Check to see if this relo can be trampolined,
* but only in first phase relocation. 2nd phase
* relocation cannot trampoline. */
- if ((second_pass == false) &&
+ if ((!second_pass) &&
(dload_tramp_avail(dlthis, rp) == true)) {

/* Before generating the trampoline, restore
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index 385740b..81afbb8 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -407,7 +407,7 @@ static int __devexit omap34_xx_bridge_remove(struct platform_device *pdev)
/* Put the DSP in reset state */
ret = dsp_deinit(driver_context);
driver_context = 0;
- DBC_ASSERT(ret == true);
+ DBC_ASSERT(ret);
}

kfree(drv_datap);
diff --git a/drivers/staging/tidspbridge/rmgr/mgr.c b/drivers/staging/tidspbridge/rmgr/mgr.c
index d635c01..9245845 100644
--- a/drivers/staging/tidspbridge/rmgr/mgr.c
+++ b/drivers/staging/tidspbridge/rmgr/mgr.c
@@ -255,7 +255,7 @@ int mgr_enum_processor_info(u32 processor_id,
proc_index++;
/* Get the Object properties to find the Device/Processor
* Type */
- if (proc_detect != false)
+ if (proc_detect)
continue;

status2 = dcd_get_object_def(pmgr_obj->dcd_mgr,
@@ -294,7 +294,7 @@ int mgr_enum_processor_info(u32 processor_id,
}
}
*pu_num_procs = proc_index;
- if (proc_detect == false) {
+ if (!proc_detect) {
dev_dbg(bridge, "%s: Failed to get proc info from DCD, so use "
"CFG registry\n", __func__);
processor_info->processor_type = DSPTYPE64;
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 1e1c6e3..73a73b3 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -1879,7 +1879,7 @@ BBvCaculateParameter (
break;

case RATE_5M :
- if (bCCK == false)
+ if (!bCCK)
cbBitCount ++;
cbUsCount = (cbBitCount * 10) / 55;
cbTmp = (cbUsCount * 55) / 10;
@@ -1893,7 +1893,7 @@ BBvCaculateParameter (

case RATE_11M :

- if (bCCK == false)
+ if (!bCCK)
cbBitCount ++;
cbUsCount = cbBitCount / 11;
cbTmp = cbUsCount * 11;
diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index 577599e..e80e3fe 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -160,9 +160,9 @@ BSSpSearchBSSList(
// match BSSID first
for (ii = 0; ii <MAX_BSS_NUM; ii++) {
pCurrBSS = &(pMgmt->sBSSList[ii]);
-if(pDevice->bLinkPass==false) pCurrBSS->bSelected = false;
+if(!pDevice->bLinkPass) pCurrBSS->bSelected = false;
if ((pCurrBSS->bActive) &&
- (pCurrBSS->bSelected == false)) {
+ (!pCurrBSS->bSelected)) {
if (!compare_ether_addr(pCurrBSS->abyBSSID, pbyBSSID)) {
if (pSSID != NULL) {
// compare ssid
@@ -446,7 +446,7 @@ BSSbInsertToBSSList (
if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
} else {
- if (pBSSList->sERP.bERPExist == true) {
+ if (pBSSList->sERP.bERPExist) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
} else {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -489,7 +489,7 @@ BSSbInsertToBSSList (
}
}

- if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) {
+ if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid)) {

PSKeyItem pTransmitKey = NULL;
bool bIs802_1x = false;
@@ -500,12 +500,12 @@ BSSbInsertToBSSList (
break;
}
}
- if ((bIs802_1x == true) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) &&
+ if ((bIs802_1x) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) &&
( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) {

bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj);

- if ((pDevice->bLinkPass == true) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
+ if ((pDevice->bLinkPass) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == true) ||
(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == true)) {
pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList;
@@ -527,12 +527,12 @@ BSSbInsertToBSSList (
}

if ((pIE_Country != NULL) &&
- (pMgmt->b11hEnable == true)) {
+ (pMgmt->b11hEnable)) {
set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
pIE_Country);
}

- if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
+ if ((bParsingQuiet) && (pIE_Quiet != NULL)) {
if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
(((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
// valid EID
@@ -558,7 +558,7 @@ BSSbInsertToBSSList (
}
}

- if ((bParsingQuiet == true) &&
+ if ((bParsingQuiet) &&
(pQuiet != NULL)) {
CARDbStartQuiet(pMgmt->pAdapter);
}
@@ -646,7 +646,7 @@ BSSbUpdateToBSSList (
if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
} else {
- if (pBSSList->sERP.bERPExist == true) {
+ if (pBSSList->sERP.bERPExist) {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
} else {
pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -703,12 +703,12 @@ BSSbUpdateToBSSList (
}

if ((pIE_Country != NULL) &&
- (pMgmt->b11hEnable == true)) {
+ (pMgmt->b11hEnable)) {
set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
pIE_Country);
}

- if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
+ if ((bParsingQuiet) && (pIE_Quiet != NULL)) {
if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
(((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
// valid EID
@@ -734,7 +734,7 @@ BSSbUpdateToBSSList (
}
}

- if ((bParsingQuiet == true) &&
+ if ((bParsingQuiet) &&
(pQuiet != NULL)) {
CARDbStartQuiet(pMgmt->pAdapter);
}
@@ -1027,12 +1027,12 @@ BSSvSecondCallBack(
//2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
-if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == false))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == true)))&&(cc==false)){
+if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(!pDevice->bHWRadioOff))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff)))&&(!cc)){
cc=true;
}
-else if(cc==true){
+else if(cc){

-if(pDevice->bHWRadioOff == true){
+if(pDevice->bHWRadioOff){
if ( !(pDevice->byGPIO & GPIO0_DATA))
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==1) goto start;
@@ -1085,7 +1085,7 @@ start:

{
pDevice->byReAssocCount++;
- if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) { //10 sec timeout
+ if((pDevice->byReAssocCount > 10) && (!pDevice->bLinkPass)) { //10 sec timeout
printk("Re-association timeout!!!\n");
pDevice->byReAssocCount = 0;
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
@@ -1099,7 +1099,7 @@ start:
}
#endif
}
- else if(pDevice->bLinkPass == true)
+ else if(pDevice->bLinkPass)
pDevice->byReAssocCount = 0;
}

@@ -1307,7 +1307,7 @@ start:
pDevice->uAutoReConnectTime++;
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
//network manager support need not do Roaming scan???
- if(pDevice->bWPASuppWextEnabled ==true)
+ if(pDevice->bWPASuppWextEnabled)
pDevice->uAutoReConnectTime = 0;
#endif
}
@@ -1686,7 +1686,7 @@ RxCnt = pDevice->scStatistic.RxFcsErrCnt +
TxOkRatio = (TxCnt < 6) ? 4000:((pDevice->scStatistic.TxNoRetryOkCount * 4000) / TxCnt);
RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt);
//decide link quality
-if(pDevice->bLinkPass !=true)
+if(!pDevice->bLinkPass)
{
// printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n");
pDevice->scStatistic.LinkQuality = 0;
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 2721e07..93ac4c4 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -1093,7 +1093,7 @@ CARDbAdd_PMKID_Candidate (
for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii];
if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) {
- if ((bRSNCapExist == true) && (wRSNCap & BIT0)) {
+ if ((bRSNCapExist) && (wRSNCap & BIT0)) {
pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
} else {
pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -1104,7 +1104,7 @@ CARDbAdd_PMKID_Candidate (

// New Candidate
pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates];
- if ((bRSNCapExist == true) && (wRSNCap & BIT0)) {
+ if ((bRSNCapExist) && (wRSNCap & BIT0)) {
pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
} else {
pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -1230,7 +1230,7 @@ CARDbStartMeasure (
}
} while (pDevice->uNumOfMeasureEIDs != 0);

- if (bExpired == false) {
+ if (!bExpired) {
MACvSelectPage1(pDevice->PortOffset);
VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART, LODWORD(qwStartTSF));
VNSvOutPortD(pDevice->PortOffset + MAC_REG_MSRSTART + 4, HIDWORD(qwStartTSF));
@@ -1322,7 +1322,7 @@ CARDbSetQuiet (
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii = 0;

- if (bResetQuiet == true) {
+ if (bResetQuiet) {
MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
pDevice->sQuiet[ii].bEnable = false;
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index 47c156b..4abedf1 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -444,8 +444,8 @@ void init_channel_table(void *pDeviceHandler)
break;
}

- if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == true)) {
- if (bMultiBand == true) {
+ if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable)) {
+ if (bMultiBand) {
for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
sChannelTbl[ii+1].bValid = true;
pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
@@ -466,7 +466,7 @@ void init_channel_table(void *pDeviceHandler)
}
}
} else if (pDevice->byZoneType <= CCODE_MAX) {
- if (bMultiBand == true) {
+ if (bMultiBand) {
for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
sChannelTbl[ii+1].bValid = true;
@@ -535,7 +535,7 @@ bool set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
return bResult;
}

- if (sChannelTbl[uConnectionChannel].bValid == false) {
+ if (!sChannelTbl[uConnectionChannel].bValid) {
return (false);
}

@@ -563,7 +563,7 @@ bool set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel);

// Init Synthesizer Table
- if (pDevice->bEnablePSMode == true)
+ if (pDevice->bEnablePSMode)
RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel);


@@ -784,7 +784,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)

if (ePHYType == PHY_TYPE_11A) {
for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) {
- if (sChannelTbl[ii].bValid == true) {
+ if (sChannelTbl[ii].bValid) {
if (byOptionChannel == 0) {
byOptionChannel = (unsigned char) ii;
}
@@ -798,7 +798,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
} else {
byOptionChannel = 0;
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
- if (sChannelTbl[ii].bValid == true) {
+ if (sChannelTbl[ii].bValid) {
if (sChannelTbl[ii].byMAP == 0) {
aiWeight[ii] += 100;
} else if (sChannelTbl[ii].byMAP & 0x01) {
@@ -825,7 +825,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
}
}
for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
- if ((sChannelTbl[ii].bValid == true) &&
+ if ((sChannelTbl[ii].bValid) &&
(aiWeight[ii] > aiWeight[byOptionChannel])) {
byOptionChannel = (unsigned char) ii;
}
diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c
index efbb8f4..c43955e 100644
--- a/drivers/staging/vt6655/datarate.c
+++ b/drivers/staging/vt6655/datarate.c
@@ -233,7 +233,7 @@ unsigned int uRateLen;
for (ii = 0; ii < uRateLen; ii++) {
byRate = (unsigned char)(pItemRates->abyRates[ii]);
if (WLAN_MGMT_IS_BASICRATE(byRate) &&
- (bUpdateBasicRate == true)) {
+ (bUpdateBasicRate)) {
// Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
@@ -346,7 +346,7 @@ bool bAutoRate[MAX_RATE] = {true,true,true,true,false,false,true,true,true,tr

for(ii=0;ii<MAX_RATE;ii++) {
if (psNodeDBTable->wSuppRate & (0x0001<<ii)) {
- if (bAutoRate[ii] == true) {
+ if (bAutoRate[ii]) {
wIdxUpRate = (unsigned short) ii;
}
} else {
@@ -372,7 +372,7 @@ bool bAutoRate[MAX_RATE] = {true,true,true,true,false,false,true,true,true,tr
for(ii = psNodeDBTable->wTxDataRate; ii > 0;) {
ii--;
if ( (dwThroughputTbl[ii] > dwThroughput) &&
- (bAutoRate[ii]==true) ) {
+ (bAutoRate[ii]) ) {
dwThroughput = dwThroughputTbl[ii];
wIdxDownRate = (unsigned short) ii;
}
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 3e8283c..74ee6fd 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -597,7 +597,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
pDevice->byTxAntennaMode = ANT_B;
pDevice->dwTxAntennaSel = 1;
pDevice->dwRxAntennaSel = 1;
- if (pDevice->bTxRxAntInv == true)
+ if (pDevice->bTxRxAntInv)
pDevice->byRxAntennaMode = ANT_A;
else
pDevice->byRxAntennaMode = ANT_B;
@@ -618,13 +618,13 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
pDevice->dwRxAntennaSel = 0;
if (byValue & EEP_ANTENNA_AUX) {
pDevice->byTxAntennaMode = ANT_A;
- if (pDevice->bTxRxAntInv == true)
+ if (pDevice->bTxRxAntInv)
pDevice->byRxAntennaMode = ANT_B;
else
pDevice->byRxAntennaMode = ANT_A;
} else {
pDevice->byTxAntennaMode = ANT_B;
- if (pDevice->bTxRxAntInv == true)
+ if (pDevice->bTxRxAntInv)
pDevice->byRxAntennaMode = ANT_A;
else
pDevice->byRxAntennaMode = ANT_B;
@@ -682,7 +682,7 @@ else
pDevice->byRFType &= RF_MASK;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRFType = %x\n", pDevice->byRFType);

- if (pDevice->bZoneRegExist == false) {
+ if (!pDevice->bZoneRegExist) {
pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byZoneType = %x\n", pDevice->byZoneType);
@@ -796,7 +796,7 @@ if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = true;}
if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = false;}

}
- if ( (pDevice->bRadioControlOff == true)) {
+ if ( (pDevice->bRadioControlOff)) {
CARDbRadioPowerOff(pDevice);
}
else CARDbRadioPowerOn(pDevice);
@@ -806,7 +806,7 @@ else CARDbRadioPowerOn(pDevice);
pDevice->bHWRadioOff = true;
}
}
- if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) {
+ if ((pDevice->bHWRadioOff) || (pDevice->bRadioControlOff)) {
CARDbRadioPowerOff(pDevice);
}

@@ -870,7 +870,7 @@ static bool device_release_WPADEV(PSDevice pDevice)
int ii=0;
// wait_queue_head_t Set_wait;
//send device close to wpa_supplicnat layer
- if (pDevice->bWPADEVUp==true) {
+ if (pDevice->bWPADEVUp) {
wpahdr = (viawget_wpa_header *)pDevice->skb->data;
wpahdr->type = VIAWGET_DEVICECLOSE_MSG;
wpahdr->resp_ie_len = 0;
@@ -887,7 +887,7 @@ static bool device_release_WPADEV(PSDevice pDevice)
//wait release WPADEV
// init_waitqueue_head(&Set_wait);
// wait_event_timeout(Set_wait, ((pDevice->wpadev==NULL)&&(pDevice->skb == NULL)),5*HZ); //1s wait
- while((pDevice->bWPADEVUp==true)) {
+ while((pDevice->bWPADEVUp)) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout (HZ/20); //wait 50ms
ii++;
@@ -959,7 +959,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
#ifdef DEBUG
printk("Before get pci_info memaddr is %x\n",pDevice->memaddr);
#endif
- if (device_get_pci_info(pDevice,pcid) == false) {
+ if (!device_get_pci_info(pDevice, pcid)) {
printk(KERN_ERR DEVICE_NAME ": Failed to find PCI device.\n");
device_free_info(pDevice);
return -ENODEV;
@@ -1781,7 +1781,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
bFull = true;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]);
}
- if (netif_queue_stopped(pDevice->dev) && (bFull==false)){
+ if (netif_queue_stopped(pDevice->dev) && (!bFull)){
netif_wake_queue(pDevice->dev);
}
}
@@ -1989,7 +1989,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n");
pDevice->byReAssocCount = 0;
pDevice->bWPADEVUp = false;
// Patch: if WEP key already set by iwconfig but device not yet open
- if ((pDevice->bEncryptionEnable == true) && (pDevice->bTransmitKey == true)) {
+ if ((pDevice->bEncryptionEnable) && (pDevice->bTransmitKey)) {
KeybSetDefaultKey(&(pDevice->sKey),
(unsigned long)(pDevice->byKeyIndex | (1 << 31)),
pDevice->uKeyLength,
@@ -2094,7 +2094,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
return 0;
}

- if (pDevice->bStopTx0Pkt == true) {
+ if (pDevice->bStopTx0Pkt) {
dev_kfree_skb_irq(skb);
spin_unlock_irq(&pDevice->lock);
return 0;
@@ -2127,7 +2127,7 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
// unsigned char byKeyIndex = 0;


- if (pDevice->bStopTx0Pkt == true) {
+ if (pDevice->bStopTx0Pkt) {
dev_kfree_skb_irq(skb);
return false;
}
@@ -2200,14 +2200,14 @@ bool device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
} else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
byPktType = PK_TYPE_11A;
} else {
- if (pDevice->bProtectMode == true) {
+ if (pDevice->bProtectMode) {
byPktType = PK_TYPE_11GB;
} else {
byPktType = PK_TYPE_11GA;
}
}

- if (pDevice->bEncryptionEnable == true)
+ if (pDevice->bEncryptionEnable)
bNeedEncryption = true;

if (pDevice->bEnableHostWEP) {
@@ -2286,7 +2286,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {


spin_lock_irq(&pDevice->lock);
- if (pDevice->bLinkPass == false) {
+ if (!pDevice->bLinkPass) {
dev_kfree_skb_irq(skb);
spin_unlock_irq(&pDevice->lock);
return 0;
@@ -2341,7 +2341,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}
}

- if (bNodeExist == false) {
+ if (!bNodeExist) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Unknown STA not found in node DB \n");
dev_kfree_skb_irq(skb);
spin_unlock_irq(&pDevice->lock);
@@ -2362,7 +2362,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
}


- if (pDevice->bEncryptionEnable == true) {
+ if (pDevice->bEncryptionEnable) {
bNeedEncryption = true;
// get Transmit key
do {
@@ -2411,7 +2411,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {

if (pDevice->bEnableHostWEP) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex);
- if (pDevice->bEncryptionEnable == true) {
+ if (pDevice->bEncryptionEnable) {
pTransmitKey = &STempKey;
pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
@@ -2519,7 +2519,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
} else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
byPktType = PK_TYPE_11A;
} else {
- if (pDevice->bProtectMode == true) {
+ if (pDevice->bProtectMode) {
byPktType = PK_TYPE_11GB;
} else {
byPktType = PK_TYPE_11GA;
@@ -2530,7 +2530,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
// printk("FIX RATE:CurrentRate is %d");
//#endif

- if (bNeedEncryption == true) {
+ if (bNeedEncryption) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) {
bNeedEncryption = false;
@@ -2540,7 +2540,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n");
}
else {
- if (bTKIP_UseGTK == true) {
+ if (bTKIP_UseGTK) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n");
}
else {
@@ -2745,7 +2745,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage0(pDevice->PortOffset);
//xxxx
// WCMDbFlushCommandQueue(pDevice->pMgmt, true);
- if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == true) {
+ if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel)) {
pDevice->bMeasureInProgress = true;
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY);
@@ -2796,12 +2796,12 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (pDevice->dwIsr & ISR_QUIETSTART) {
do {
;
- } while (CARDbStartQuiet(pDevice) == false);
+ } while (!CARDbStartQuiet(pDevice));
}
}

if (pDevice->dwIsr & ISR_TBTT) {
- if (pDevice->bEnableFirstQuiet == true) {
+ if (pDevice->bEnableFirstQuiet) {
pDevice->byQuietStartCount--;
if (pDevice->byQuietStartCount == 0) {
pDevice->bEnableFirstQuiet = false;
@@ -2810,7 +2810,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage0(pDevice->PortOffset);
}
}
- if ((pDevice->bChannelSwitch == true) &&
+ if ((pDevice->bChannelSwitch) &&
(pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
@@ -2827,7 +2827,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
if (pDevice->eOPMode == OP_MODE_ADHOC) {
//pDevice->bBeaconSent = false;
} else {
- if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == true) && (pDevice->uCurrRSSI != 0)) {
+ if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass) && (pDevice->uCurrRSSI != 0)) {
long ldBm;

RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm);
@@ -2897,7 +2897,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
}
pDevice->bBeaconSent = true;

- if (pDevice->bChannelSwitch == true) {
+ if (pDevice->bChannelSwitch) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) {
pDevice->bChannelSwitch = false;
@@ -3555,7 +3555,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
netif_stop_queue(pDevice->dev);
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
- if(pDevice->bWPASuppWextEnabled !=true)
+ if(!pDevice->bWPASuppWextEnabled)
#endif
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
@@ -3698,7 +3698,7 @@ viawget_resume(struct pci_dev *pcid)
spin_lock_irq(&pDevice->lock);
MACvRestoreContext(pDevice->PortOffset, pDevice->abyMacContext);
device_init_registers(pDevice, DEVICE_INIT_DXPL);
- if (pMgmt->sNodeDBTable[0].bActive == true) { // Assoc with BSS
+ if (pMgmt->sNodeDBTable[0].bActive) { // Assoc with BSS
pMgmt->sNodeDBTable[0].bActive = false;
pDevice->bLinkPass = false;
if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index c0fab4b..d4bf2f3 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -413,7 +413,7 @@ device_receive_frame (

pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8);
//PLICE_DEBUG<-
- if (pDevice->bMeasureInProgress == true) {
+ if (pDevice->bMeasureInProgress) {
if ((*pbyRsr & RSR_CRCOK) != 0) {
pDevice->byBasicMap |= 0x01;
}
@@ -470,7 +470,7 @@ device_receive_frame (
}

if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
- if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == true) {
+ if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex)) {
return false;
}
}
@@ -652,7 +652,7 @@ device_receive_frame (
}
else {
// discard DATA packet while not associate || BSSID error
- if ((pDevice->bLinkPass == false) ||
+ if ((!pDevice->bLinkPass) ||
!(*pbyRsr & RSR_BSSIDOK)) {
if (bDeFragRx) {
if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
@@ -705,7 +705,7 @@ device_receive_frame (
// Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
if (pDevice->bDiversityEnable && (FrameSize>50) &&
(pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
- (pDevice->bLinkPass == true)) {
+ (pDevice->bLinkPass)) {
//printk("device_receive_frame: RxRate is %d\n",*pbyRxRate);
BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0);
}
@@ -732,7 +732,7 @@ device_receive_frame (

// -----------------------------------------------

- if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){
+ if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x)){
unsigned char abyMacHdr[24];

// Only 802.1x packet incoming allowed
@@ -747,7 +747,7 @@ device_receive_frame (
if (wEtherType == ETH_P_PAE) {
skb->dev = pDevice->apdev;

- if (bIsWEP == true) {
+ if (bIsWEP) {
// strip IV header(8)
memcpy(&abyMacHdr[0], (skb->data + 4), 24);
memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24);
@@ -824,7 +824,7 @@ device_receive_frame (


if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) ||
- (pDevice->bRxMICFail == true)) {
+ (pDevice->bRxMICFail)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
pDevice->bRxMICFail = false;
//pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++;
@@ -952,13 +952,7 @@ device_receive_frame (
return false;

if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
- if (s_bAPModeRxData(pDevice,
- skb,
- FrameSize,
- cbHeaderOffset,
- iSANodeIndex,
- iDANodeIndex
- ) == false) {
+ if (!s_bAPModeRxData(pDevice, skb, FrameSize, cbHeaderOffset, iSANodeIndex, iDANodeIndex)) {

if (bDeFragRx) {
if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
@@ -1200,7 +1194,7 @@ static bool s_bHandleRxEncryption (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
- } else if (pDevice->bLinkPass == true) {
+ } else if (pDevice->bLinkPass) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
return false;
@@ -1208,7 +1202,7 @@ static bool s_bHandleRxEncryption (
if (byDecMode != pKey->byCipherSuite) {
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
- } else if (pDevice->bLinkPass == true) {
+ } else if (pDevice->bLinkPass) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
*pKeyOut = NULL;
@@ -1315,7 +1309,7 @@ static bool s_bHostWepRxEncryption (
if (byDecMode != pKey->byCipherSuite) {
if (byDecMode == KEY_CTL_WEP) {
// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
- } else if (pDevice->bLinkPass == true) {
+ } else if (pDevice->bLinkPass) {
// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
}
return false;
@@ -1326,7 +1320,7 @@ static bool s_bHostWepRxEncryption (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n");
if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
(((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true) ||
- (bOnFly == false)) {
+ (!bOnFly)) {
// Software WEP
// 1. 3253A
// 2. WEP 256
@@ -1359,7 +1353,7 @@ static bool s_bHostWepRxEncryption (

if (byDecMode == KEY_CTL_TKIP) {

- if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == false)) {
+ if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (!bOnFly)) {
// Software TKIP
// 1. 3253 A
// 2. NotOnFly
@@ -1379,7 +1373,7 @@ static bool s_bHostWepRxEncryption (
}

if (byDecMode == KEY_CTL_CCMP) {
- if (bOnFly == false) {
+ if (!bOnFly) {
// Software CCMP
// NotOnFly
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_CCMP\n");
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index 7735027..3f5f55d 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -521,10 +521,7 @@ static int hostap_set_encryption(PSDevice pDevice,
if (param->u.crypt.alg == WPA_ALG_NONE) {

if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) {
- if (KeybRemoveKey(&(pDevice->sKey),
- param->sta_addr,
- pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex,
- pDevice->PortOffset) == false) {
+ if (!KeybRemoveKey(&(pDevice->sKey), param->sta_addr, pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex, pDevice->PortOffset)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybRemoveKey fail \n");
}
pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false;
@@ -575,15 +572,7 @@ static int hostap_set_encryption(PSDevice pDevice,
} else {
// 8021x enable, individual key
dwKeyIndex |= (1 << 30); // set pairwise key
- if (KeybSetKey(&(pDevice->sKey),
- &param->sta_addr[0],
- dwKeyIndex & ~(USE_KEYRSC),
- param->u.crypt.key_len,
- (PQWORD) &(KeyRSC),
- (unsigned char *)abyKey,
- KEY_CTL_WEP,
- pDevice->PortOffset,
- pDevice->byLocalID) == true) {
+ if (KeybSetKey(&(pDevice->sKey), &param->sta_addr[0], dwKeyIndex & ~(USE_KEYRSC), param->u.crypt.key_len, (PQWORD) & (KeyRSC), (unsigned char *)abyKey, KEY_CTL_WEP, pDevice->PortOffset, pDevice->byLocalID)) {

pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;

@@ -644,15 +633,7 @@ static int hostap_set_encryption(PSDevice pDevice,

} else {
dwKeyIndex |= (1 << 30); // set pairwise key
- if (KeybSetKey(&(pDevice->sKey),
- &param->sta_addr[0],
- dwKeyIndex,
- param->u.crypt.key_len,
- (PQWORD) &(KeyRSC),
- (unsigned char *)abyKey,
- byKeyDecMode,
- pDevice->PortOffset,
- pDevice->byLocalID) == true) {
+ if (KeybSetKey(&(pDevice->sKey), &param->sta_addr[0], dwKeyIndex, param->u.crypt.key_len, (PQWORD) & (KeyRSC), (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID)) {

pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;

@@ -665,7 +646,7 @@ static int hostap_set_encryption(PSDevice pDevice,

}

- if (bKeyTableFull == true) {
+ if (bKeyTableFull) {
wKeyCtl &= 0x7F00; // clear all key control filed
wKeyCtl |= (byKeyDecMode << 4);
wKeyCtl |= (byKeyDecMode);
diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
index 0ff8d7b..22c70d5 100644
--- a/drivers/staging/vt6655/key.c
+++ b/drivers/staging/vt6655/key.c
@@ -64,12 +64,12 @@ s_vCheckKeyTableValid (PSKeyManagement pTable, unsigned long dwIoBase)
int i;

for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
- (pTable->KeyTable[i].PairwiseKey.bKeyValid == false) &&
- (pTable->KeyTable[i].GroupKey[0].bKeyValid == false) &&
- (pTable->KeyTable[i].GroupKey[1].bKeyValid == false) &&
- (pTable->KeyTable[i].GroupKey[2].bKeyValid == false) &&
- (pTable->KeyTable[i].GroupKey[3].bKeyValid == false)
+ if ((pTable->KeyTable[i].bInUse) &&
+ (!pTable->KeyTable[i].PairwiseKey.bKeyValid) &&
+ (!pTable->KeyTable[i].GroupKey[0].bKeyValid) &&
+ (!pTable->KeyTable[i].GroupKey[1].bKeyValid) &&
+ (!pTable->KeyTable[i].GroupKey[2].bKeyValid) &&
+ (!pTable->KeyTable[i].GroupKey[3].bKeyValid)
) {

pTable->KeyTable[i].bInUse = false;
@@ -144,10 +144,10 @@ bool KeybGetKey (

*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
+ if ((pTable->KeyTable[i].bInUse) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
if (dwKeyIndex == 0xFFFFFFFF) {
- if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
+ if (pTable->KeyTable[i].PairwiseKey.bKeyValid) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
return (true);
}
@@ -155,7 +155,7 @@ bool KeybGetKey (
return (false);
}
} else if (dwKeyIndex < MAX_GROUP_KEY) {
- if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) {
+ if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid) {
*pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]);
return (true);
}
@@ -210,12 +210,12 @@ bool KeybSetKey (

j = (MAX_KEY_TABLE-1);
for (i=0;i<(MAX_KEY_TABLE-1);i++) {
- if ((pTable->KeyTable[i].bInUse == false) &&
+ if ((!pTable->KeyTable[i].bInUse) &&
(j == (MAX_KEY_TABLE-1))) {
// found empty table
j = i;
}
- if ((pTable->KeyTable[i].bInUse == true) &&
+ if ((pTable->KeyTable[i].bInUse) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
// found table already exist
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
@@ -397,7 +397,7 @@ bool KeybRemoveKey (
}

for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
+ if ((pTable->KeyTable[i].bInUse) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
@@ -444,7 +444,7 @@ bool KeybRemoveAllKey (
int i,u;

for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
+ if ((pTable->KeyTable[i].bInUse) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
for(u=0;u<MAX_GROUP_KEY;u++) {
@@ -478,7 +478,7 @@ void KeyvRemoveWEPKey (
{

if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
- if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == true) {
+ if (pTable->KeyTable[MAX_KEY_TABLE - 1].bInUse) {
if (pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].byCipherSuite == KEY_CTL_WEP) {
pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) {
@@ -528,12 +528,12 @@ bool KeybGetTransmitKey (

*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
+ if ((pTable->KeyTable[i].bInUse) &&
!compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {

if (dwKeyType == PAIRWISE_KEY) {

- if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
+ if (pTable->KeyTable[i].PairwiseKey.bKeyValid) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -556,7 +556,7 @@ bool KeybGetTransmitKey (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n");
return false;
}
- if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == true) {
+ if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex & 0x000000FF)].bKeyValid) {
*pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]);

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -606,8 +606,8 @@ bool KeybCheckPairewiseKey (

*pKey = NULL;
for (i=0;i<MAX_KEY_TABLE;i++) {
- if ((pTable->KeyTable[i].bInUse == true) &&
- (pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) {
+ if ((pTable->KeyTable[i].bInUse) &&
+ (pTable->KeyTable[i].PairwiseKey.bKeyValid)) {
*pKey = &(pTable->KeyTable[i].PairwiseKey);
return (true);
}
@@ -678,7 +678,7 @@ bool KeybSetDefaultKey (
pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000; // disable on-fly disable address match
pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = true;
} else {
- if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == false)
+ if (!pTable->KeyTable[MAX_KEY_TABLE - 1].bSoftWEP)
pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000; // enable on-fly disable address match
}

@@ -764,7 +764,7 @@ bool KeybSetAllGroupKey (
}

for (i=0; i < MAX_KEY_TABLE-1; i++) {
- if (pTable->KeyTable[i].bInUse == true) {
+ if (pTable->KeyTable[i].bInUse) {
// found table already exist
// Group key
pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index f8d1651..85e83c1 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -968,13 +968,13 @@ bool MACbSafeStop (unsigned long dwIoBase)
{
MACvRegBitsOff(dwIoBase, MAC_REG_TCR, TCR_AUTOBCNTX);

- if (MACbSafeRxOff(dwIoBase) == false) {
+ if (!MACbSafeRxOff(dwIoBase)) {
DBG_PORT80(0xA1);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeRxOff == false)\n");
MACbSafeSoftwareReset(dwIoBase);
return false;
}
- if (MACbSafeTxOff(dwIoBase) == false) {
+ if (!MACbSafeTxOff(dwIoBase)) {
DBG_PORT80(0xA2);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" MACbSafeTxOff == false)\n");
MACbSafeSoftwareReset(dwIoBase);
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 4c0b02e..0ef4e44 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -307,16 +307,16 @@ PSbSendNullPacket(
unsigned int uIdx;


- if (pDevice->bLinkPass == false) {
+ if (!pDevice->bLinkPass) {
return false;
}
#ifdef TxInSleep
- if ((pDevice->bEnablePSMode == false) &&
- (pDevice->fTxDataInSleep == false)){
+ if ((!pDevice->bEnablePSMode) &&
+ (!pDevice->fTxDataInSleep)){
return false;
}
#else
- if (pDevice->bEnablePSMode == false) {
+ if (!pDevice->bEnablePSMode) {
return false;
}
#endif
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index b8ec783..94552ab 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -1115,7 +1115,7 @@ unsigned char byPwrdBm = 0;
}
bResult = RFbRawSetPower(pDevice, byPwr, uRATE);
// }
- if (bResult == true) {
+ if (bResult) {
pDevice->byCurPwr = byPwr;
}
return bResult;
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 6935b37..3149fc9 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -453,20 +453,20 @@ s_uGetDataDuration (
unsigned char byFBOption
)
{
- bool bLastFrag = 0;
+ bool bLastFrag = false;
unsigned int uAckTime =0, uNextPktTime = 0;



if (uFragIdx == (uMACfragNum-1)) {
- bLastFrag = 1;
+ bLastFrag = true;
}


switch (byDurType) {

case DATADUR_B: //DATADUR_B
- if (((uMACfragNum == 1)) || (bLastFrag == 1)) {//Non Frag or Last Frag
+ if (((uMACfragNum == 1)) || (bLastFrag)) {//Non Frag or Last Frag
if (bNeedAck) {
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate);
return (pDevice->uSIFS + uAckTime);
@@ -490,7 +490,7 @@ s_uGetDataDuration (
break;

case DATADUR_A: //DATADUR_A
- if (((uMACfragNum==1)) || (bLastFrag==1)) {//Non Frag or Last Frag
+ if (((uMACfragNum==1)) || (bLastFrag)) {//Non Frag or Last Frag
if(bNeedAck){
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime);
@@ -514,7 +514,7 @@ s_uGetDataDuration (
break;

case DATADUR_A_F0: //DATADUR_A_F0
- if (((uMACfragNum==1)) || (bLastFrag==1)) {//Non Frag or Last Frag
+ if (((uMACfragNum==1)) || (bLastFrag)) {//Non Frag or Last Frag
if(bNeedAck){
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime);
@@ -557,7 +557,7 @@ s_uGetDataDuration (
break;

case DATADUR_A_F1: //DATADUR_A_F1
- if (((uMACfragNum==1)) || (bLastFrag==1)) {//Non Frag or Last Frag
+ if (((uMACfragNum==1)) || (bLastFrag)) {//Non Frag or Last Frag
if(bNeedAck){
uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate);
return (pDevice->uSIFS + uAckTime);
@@ -1390,7 +1390,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
cbMACHdLen = WLAN_HDR_ADDR3_LEN;


- if ((bNeedEncrypt == true) && (pTransmitKey != NULL)) {
+ if ((bNeedEncrypt) && (pTransmitKey != NULL)) {
if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
cbIVlen = 4;
cbICVlen = 4;
@@ -1418,7 +1418,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT

cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen;

- if ((bNeedACK == false) ||
+ if ((!bNeedACK) ||
(cbFrameSize < pDevice->wRTSThreshold) ||
((cbFrameSize >= pDevice->wFragmentationThreshold) && (pDevice->wFragmentationThreshold <= pDevice->wRTSThreshold))
) {
@@ -1444,7 +1444,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet

if (byFBOption == AUTO_FB_NONE) {
- if (bRTS == true) {//RTS_need
+ if (bRTS) {//RTS_need
pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
pvRTS = (PSRTS_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1462,7 +1462,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
}
} else {
// Auto Fall Back
- if (bRTS == true) {//RTS_need
+ if (bRTS) {//RTS_need
pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1483,7 +1483,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
else {//802.11a/b packet

if (byFBOption == AUTO_FB_NONE) {
- if (bRTS == true) {
+ if (bRTS) {
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1501,7 +1501,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
}
} else {
// Auto Fall Back
- if (bRTS == true) {//RTS_need
+ if (bRTS) {//RTS_need
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
pvRTS = (PSRTS_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1522,7 +1522,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));

//////////////////////////////////////////////////////////////////
- if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
+ if ((bNeedEncrypt) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
@@ -1549,7 +1549,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding);

- if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true) && (bIsWEP256 == false)) {
+ if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK) && (!bIsWEP256)) {
// Fragmentation
// FragThreshold = Fragment size(Hdr+(IV)+fragment payload+(MIC)+(ICV)+FCS)
cbFragmentSize = pDevice->wFragmentationThreshold;
@@ -1584,7 +1584,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);

- if (bNeedEncrypt == true) {
+ if (bNeedEncrypt) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1636,7 +1636,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT

uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len;

- if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
+ if ((bNeedEncrypt) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize);
MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize);

@@ -1689,7 +1689,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);

- if (bNeedEncrypt == true) {
+ if (bNeedEncrypt) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbLastFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1718,7 +1718,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
memcpy(pbyBuffer, (void *)psTxBufHd, uLength);

// Copy the Packet into a tx Buffer
- if (bMIC2Frag == false) {
+ if (!bMIC2Frag) {

memcpy((pbyBuffer + uLength),
(pPacket + 14 + uTotalCopyLength),
@@ -1728,11 +1728,11 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
uTmpLen = cbLastFragPayloadSize - cbMIClen;

}
- if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
+ if ((bNeedEncrypt) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n",
uMICFragLen, cbLastFragPayloadSize, uTmpLen);

- if (bMIC2Frag == false) {
+ if (!bMIC2Frag) {
if (uTmpLen != 0)
MIC_vAppend((pbyBuffer + uLength), uTmpLen);
pdwMIC_L = (unsigned long *)(pbyBuffer + uLength + uTmpLen);
@@ -1820,7 +1820,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
wFragType, uDMAIdx, uFragIdx);


- if (bNeedEncrypt == true) {
+ if (bNeedEncrypt) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1861,7 +1861,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT

uTotalCopyLength += uTmpLen;

- if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
+ if ((bNeedEncrypt) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {

MIC_vAppend((pbyBuffer + uLength), uTmpLen);

@@ -1949,7 +1949,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, 0);

- if (bNeedEncrypt == true) {
+ if (bNeedEncrypt) {
//Fill TXKEY
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (unsigned short)cbFrameBodySize, (unsigned char *)pMICHDR);
@@ -1998,7 +1998,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
cbFrameBodySize - cb802_1_H_len
);

- if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){
+ if ((bNeedEncrypt) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){

DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength);
/*
@@ -2017,7 +2017,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
MIC_vUnInit();


- if (pDevice->bTxMICFail == true) {
+ if (pDevice->bTxMICFail) {
*pdwMIC_L = 0;
*pdwMIC_R = 0;
pDevice->bTxMICFail = false;
@@ -2145,7 +2145,7 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
pTxBufHead->wFIFOCtl |= FIFOCTL_11GA;
}
//Set FIFOCTL_GrpAckPolicy
- if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
+ if (pDevice->bGrpAckPolicy) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}

@@ -2454,7 +2454,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen;

//Set FIFOCTL_GrpAckPolicy
- if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
+ if (pDevice->bGrpAckPolicy) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}
//the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -2524,7 +2524,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
//}
do {
if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
- (pDevice->bLinkPass == true)) {
+ (pDevice->bLinkPass)) {
pbyBSSID = pDevice->abyBSSID;
// get pairwise key
if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == false) {
@@ -2738,7 +2738,7 @@ cbGetFragCount (
cbMACHdLen = WLAN_HDR_ADDR3_LEN;


- if (pDevice->bEncryptionEnable == true) {
+ if (pDevice->bEncryptionEnable) {

if (pTransmitKey == NULL) {
if ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) ||
@@ -2768,7 +2768,7 @@ cbGetFragCount (

cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen;

- if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true)) {
+ if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK)) {
// Fragmentation
cbFragmentSize = pDevice->wFragmentationThreshold;
cbFragPayloadSize = cbFragmentSize - cbMACHdLen - cbIVlen - cbICVlen - cbFCSlen;
@@ -2992,7 +2992,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen + cbExtSuppRate;

//Set FIFOCTL_GrpAckPolicy
- if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
+ if (pDevice->bGrpAckPolicy) {//0000 0100 0000 0000
pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
}
//the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -3105,7 +3105,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
MIC_vUnInit();

- if (pDevice->bTxMICFail == true) {
+ if (pDevice->bTxMICFail) {
*pdwMIC_L = 0;
*pdwMIC_R = 0;
pDevice->bTxMICFail = false;
diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c
index 0491d0b..71e3435 100644
--- a/drivers/staging/vt6655/vntwifi.c
+++ b/drivers/staging/vt6655/vntwifi.c
@@ -510,7 +510,7 @@ VNTWIFIvUpdateNodeTxCounter(
}
}
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts++;
- if (bTxOk == true) {
+ if (bTxOk) {
// transmit success, TxAttempts at least plus one
pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wRate]++;
@@ -603,7 +603,7 @@ VNTWIFIbyGetKeyCypher(
{
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;

- if (bGroupKey == true) {
+ if (bGroupKey) {
return (pMgmt->byCSSGK);
} else {
return (pMgmt->byCSSPK);
@@ -759,7 +759,7 @@ VNTWIFIbMeasureReport(
pMgmt->uLengthOfRepEIDs += (2 + pMgmt->pCurrMeasureEIDRep->len);
pMgmt->pCurrMeasureEIDRep = (PWLAN_IE_MEASURE_REP) pbyCurrentEID;
}
- if (bEndOfReport == true) {
+ if (bEndOfReport) {
IEEE11hbMSRRepTx(pMgmt);
}
//spin_unlock_irq(&pDevice->lock);
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index bab3b01..d18e60c 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -355,7 +355,7 @@ vCommandTimer (

if (pDevice->dwDiagRefCount != 0)
return;
- if (pDevice->bCmdRunning != true)
+ if (!pDevice->bCmdRunning)
return;

spin_lock_irq(&pDevice->lock);
@@ -365,7 +365,7 @@ vCommandTimer (
case WLAN_CMD_SCAN_START:

pDevice->byReAssocCount = 0;
- if (pDevice->bRadioOff == true) {
+ if (pDevice->bRadioOff) {
s_bCommandComplete(pDevice);
spin_unlock_irq(&pDevice->lock);
return;
@@ -432,7 +432,7 @@ vCommandTimer (

vAdHocBeaconStop(pDevice);

- if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == true) {
+ if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel);
} else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel);
@@ -450,7 +450,7 @@ vCommandTimer (
}


- if ((pMgmt->b11hEnable == false) ||
+ if ((!pMgmt->b11hEnable) ||
(pMgmt->uScanChannel < CB_MAX_CHANNEL_24G)) {
s_vProbeChannel(pDevice);
spin_unlock_irq(&pDevice->lock);
@@ -540,7 +540,7 @@ vCommandTimer (

case WLAN_CMD_SSID_START:
pDevice->byReAssocCount = 0;
- if (pDevice->bRadioOff == true) {
+ if (pDevice->bRadioOff) {
s_bCommandComplete(pDevice);
spin_unlock_irq(&pDevice->lock);
return;
@@ -720,7 +720,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
netif_wake_queue(pDevice->dev);
}
#ifdef TxInSleep
- if(pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time
+ if(pDevice->IsTxDataTrigger) { //TxDataTimer is not triggered at the first time
// printk("Re-initial TxDataTimer****\n");
del_timer(&pDevice->sTimerTxData);
init_timer(&pDevice->sTimerTxData);
@@ -772,7 +772,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
pMgmt->eCurrState = WMAC_STATE_IDLE;
pMgmt->eCurrMode = WMAC_MODE_STANDBY;
pDevice->bLinkPass = false;
- if (pDevice->bEnableHostWEP == true)
+ if (pDevice->bEnableHostWEP)
BSSvClearNodeDBTable(pDevice, 1);
else
BSSvClearNodeDBTable(pDevice, 0);
@@ -857,7 +857,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS

case WLAN_CMD_RADIO_START :
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
- if (pDevice->bRadioCmd == true)
+ if (pDevice->bRadioCmd)
CARDbRadioPowerOn(pDevice);
else
CARDbRadioPowerOff(pDevice);
@@ -1038,7 +1038,7 @@ bool bScheduleCommand (
ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE);
pDevice->cbFreeCmdQueue--;

- if (pDevice->bCmdRunning == false) {
+ if (!pDevice->bCmdRunning) {
s_bCommandComplete(pDevice);
}
else {
@@ -1126,8 +1126,8 @@ BSSvSecondTxData(

spin_lock_irq(&pDevice->lock);
#if 1
- if(((pDevice->bLinkPass ==true)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
- (pDevice->fWPA_Authened == true)) { //wpa linking
+ if(((pDevice->bLinkPass)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
+ (pDevice->fWPA_Authened)) { //wpa linking
#else
if(pDevice->bLinkPass ==true) {
#endif
diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c
index c096583..08381e4 100644
--- a/drivers/staging/vt6655/wctl.c
+++ b/drivers/staging/vt6655/wctl.c
@@ -113,7 +113,7 @@ unsigned int WCTLuSearchDFCB (PSDevice pDevice, PS802_11Header pMACHeader)
unsigned int ii;

for(ii=0;ii<pDevice->cbDFCB;ii++) {
- if ((pDevice->sRxDFCB[ii].bInUse == true) &&
+ if ((pDevice->sRxDFCB[ii].bInUse) &&
(!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0])))
) {
//
@@ -145,7 +145,7 @@ unsigned int ii;
if (pDevice->cbFreeDFCB == 0)
return(pDevice->cbDFCB);
for(ii=0;ii<pDevice->cbDFCB;ii++) {
- if (pDevice->sRxDFCB[ii].bInUse == false) {
+ if (!pDevice->sRxDFCB[ii].bInUse) {
pDevice->cbFreeDFCB--;
pDevice->sRxDFCB[ii].uLifetime = pDevice->dwMaxReceiveLifetime;
pDevice->sRxDFCB[ii].bInUse = true;
@@ -180,7 +180,7 @@ bool WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, unsigned
unsigned int uHeaderSize;


- if (bWEP == true) {
+ if (bWEP) {
uHeaderSize = 28;
if (bExtIV)
// ExtIV
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index c46d519..0217306 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -488,15 +488,15 @@ vMgrAssocBeginSta(
// ERP Phy (802.11g) should support short preamble.
if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
- if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) {
+ if (CARDbIsShorSlotTime(pMgmt->pAdapter)) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
}
} else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
- if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) {
+ if (CARDbIsShortPreamble(pMgmt->pAdapter)) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
}
}
- if (pMgmt->b11hEnable == true)
+ if (pMgmt->b11hEnable)
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);

/* build an assocreq frame and send it */
@@ -567,15 +567,15 @@ vMgrReAssocBeginSta(
// ERP Phy (802.11g) should support short preamble.
if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
- if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) {
+ if (CARDbIsShorSlotTime(pMgmt->pAdapter)) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
}
} else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
- if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) {
+ if (CARDbIsShortPreamble(pMgmt->pAdapter)) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
}
}
- if (pMgmt->b11hEnable == true)
+ if (pMgmt->b11hEnable)
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);


@@ -771,7 +771,7 @@ s_vMgrRxAssocRequest(
pDevice->bProtectMode = true;
pDevice->bNonERPPresent = true;
}
- if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) {
+ if (!pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble) {
pDevice->bBarkerPreambleMd = true;
}

@@ -931,7 +931,7 @@ s_vMgrRxReAssocRequest(
pDevice->bProtectMode = true;
pDevice->bNonERPPresent = true;
}
- if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) {
+ if (!pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble) {
pDevice->bBarkerPreambleMd = true;
}

@@ -1932,7 +1932,7 @@ s_vMgrRxBeacon(
bChannelHit = true;
}
//2008-0730-01<Add>by MikeLiu
-if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
+if(ChannelExceedZoneType(pDevice, byCurrChannel))
return;

if (sFrame.pERP != NULL) {
@@ -2058,8 +2058,8 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
}

if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) &&
- (bIsBSSIDEqual == true) &&
- (bIsSSIDEqual == true) &&
+ (bIsBSSIDEqual) &&
+ (bIsSSIDEqual) &&
(pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
(pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
// add state check to prevent reconnect fail since we'll receive Beacon
@@ -2105,7 +2105,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
#ifdef PLICE_DEBUG
//printk("RxBeacon:MaxSuppRate is %d\n",pMgmt->sNodeDBTable[0].wMaxSuppRate);
#endif
- if (bUpdatePhyParameter == true) {
+ if (bUpdatePhyParameter) {
CARDbSetPhyParameter( pMgmt->pAdapter,
pMgmt->eCurrentPHYMode,
pMgmt->wCurrCapInfo,
@@ -2127,7 +2127,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
sFrame.pIE_CHSW->byCount
);

- } else if (bIsChannelEqual == false) {
+ } else if (!bIsChannelEqual) {
set_channel(pMgmt->pAdapter, pBSSList->uChannel);
}
}
@@ -2176,13 +2176,13 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)


// if infra mode
- if (bIsAPBeacon == true) {
+ if (bIsAPBeacon) {

// Infra mode: Local TSF always follow AP's TSF if Difference huge.
if (bTSFLargeDiff)
bUpdateTSF = true;

- if ((pDevice->bEnablePSMode == true) &&(sFrame.pTIM != 0)) {
+ if ((pDevice->bEnablePSMode) &&(sFrame.pTIM != 0)) {

// deal with DTIM, analysis TIM
pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? true : false ;
@@ -2224,7 +2224,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
else {
pMgmt->bInTIMWake = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Not In TIM..\n");
- if (pDevice->bPWBitOn == false) {
+ if (!pDevice->bPWBitOn) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n");
if (PSbSendNullPacket(pDevice))
pDevice->bPWBitOn = true;
@@ -2456,10 +2456,10 @@ vMgrCreateOwnIBSS(


// Disable Protect Mode
- pDevice->bProtectMode = 0;
+ pDevice->bProtectMode = false;
MACvDisableProtectMD(pDevice->PortOffset);

- pDevice->bBarkerPreambleMd = 0;
+ pDevice->bBarkerPreambleMd = false;
MACvDisableBarkerPreambleMd(pDevice->PortOffset);

// Kyle Test 2003.11.04
@@ -2609,7 +2609,7 @@ vMgrCreateOwnIBSS(
pMgmt->wCurrCapInfo &= (~WLAN_SET_CAP_INFO_SHORTPREAMBLE(1));
}

- if ((pMgmt->b11hEnable == true) &&
+ if ((pMgmt->b11hEnable) &&
(pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
} else {
@@ -2663,7 +2663,7 @@ vMgrJoinBSSBegin(


for (ii = 0; ii < MAX_BSS_NUM; ii++) {
- if (pMgmt->sBSSList[ii].bActive == true)
+ if (pMgmt->sBSSList[ii].bActive)
break;
}

@@ -2793,7 +2793,7 @@ vMgrJoinBSSBegin(
if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
bool bResult = bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult);
- if (bResult == false) {
+ if (!bResult) {
vFlush_PMKID_Candidate((void *)pDevice);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 4\n");
bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj);
@@ -2820,13 +2820,13 @@ vMgrJoinBSSBegin(
if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {

if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
- if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == false) {
+ if (!WPA_SearchRSN(0, WPA_TKIP, pCurr)) {
// encryption mode error
pMgmt->eCurrState = WMAC_STATE_IDLE;
return;
}
} else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
- if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == false) {
+ if (!WPA_SearchRSN(0, WPA_AESCCMP, pCurr)) {
// encryption mode error
pMgmt->eCurrState = WMAC_STATE_IDLE;
return;
@@ -2924,10 +2924,7 @@ s_vMgrSynchBSS (

*pStatus = CMD_STATUS_FAILURE;

- if (s_bCipherMatch(pCurr,
- pDevice->eEncryptionStatus,
- &(pMgmt->byCSSPK),
- &(pMgmt->byCSSGK)) == false) {
+ if (!s_bCipherMatch(pCurr, pDevice->eEncryptionStatus, &(pMgmt->byCSSPK), &(pMgmt->byCSSGK))) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "s_bCipherMatch Fail .......\n");
return;
}
@@ -3018,18 +3015,12 @@ s_vMgrSynchBSS (
CARDbSetBSSID(pMgmt->pAdapter, pCurr->abyBSSID, OP_MODE_ADHOC);
}

- if (CARDbSetPhyParameter( pMgmt->pAdapter,
- ePhyType,
- pCurr->wCapInfo,
- pCurr->sERP.byERP,
- pMgmt->abyCurrSuppRates,
- pMgmt->abyCurrExtSuppRates
- ) != true) {
+ if (!CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, pCurr->wCapInfo, pCurr->sERP.byERP, pMgmt->abyCurrSuppRates, pMgmt->abyCurrExtSuppRates)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType);
return;
}
// set channel and clear NAV
- if (set_channel(pMgmt->pAdapter, pCurr->uChannel) == false) {
+ if (!set_channel(pMgmt->pAdapter, pCurr->uChannel)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel);
return;
}
@@ -3083,7 +3074,7 @@ s_vMgrSynchBSS (
// if( uSameBssidNum>=2) { //we only check AP in hidden sssid mode
if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || //networkmanager 0.7.0 does not give the pairwise-key selsection,
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) { // so we need re-selsect it according to real pairwise-key info.
- if(pCurr->bWPAValid == true) { //WPA-PSK
+ if(pCurr->bWPAValid) { //WPA-PSK
pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK;
if(pCurr->abyPKType[0] == WPA_TKIP) {
pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP
@@ -3094,7 +3085,7 @@ s_vMgrSynchBSS (
PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n");
}
}
- else if(pCurr->bWPA2Valid == true) { //WPA2-PSK
+ else if(pCurr->bWPA2Valid) { //WPA2-PSK
pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK;
if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) {
pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP
@@ -3317,7 +3308,7 @@ s_MgrMakeBeacon(
}
}

- if ((pMgmt->b11hEnable == true) &&
+ if ((pMgmt->b11hEnable) &&
(pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
// Country IE
pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
@@ -3331,7 +3322,7 @@ s_MgrMakeBeacon(
((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0;
pbyBuffer += (1) + WLAN_IEHDR_LEN;
uLength += (1) + WLAN_IEHDR_LEN;
- if (pMgmt->bSwitchChannel == true) {
+ if (pMgmt->bSwitchChannel) {
// Channel Switch IE
((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH;
((PWLAN_IE_CH_SW) pbyBuffer)->len = 3;
@@ -3360,7 +3351,7 @@ s_MgrMakeBeacon(
pbyBuffer += (7) + WLAN_IEHDR_LEN;
uLength += (7) + WLAN_IEHDR_LEN;
for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) {
- if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) {
+ if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer + 1)) {
pbyBuffer += 2;
uLength += 2;
pIBSSDFS->len += 2;
@@ -3376,11 +3367,11 @@ s_MgrMakeBeacon(
sFrame.pERP->byElementID = WLAN_EID_ERP;
sFrame.pERP->len = 1;
sFrame.pERP->byContext = 0;
- if (pDevice->bProtectMode == true)
+ if (pDevice->bProtectMode)
sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
- if (pDevice->bNonERPPresent == true)
+ if (pDevice->bNonERPPresent)
sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
- if (pDevice->bBarkerPreambleMd == true)
+ if (pDevice->bBarkerPreambleMd)
sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
}
if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
@@ -3392,7 +3383,7 @@ s_MgrMakeBeacon(
);
}
// hostapd wpa/wpa2 IE
- if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) {
+ if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd)) {
if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
if (pMgmt->wWPAIELen != 0) {
sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
@@ -3513,15 +3504,15 @@ s_MgrMakeProbeResponse(
sFrame.pERP->byElementID = WLAN_EID_ERP;
sFrame.pERP->len = 1;
sFrame.pERP->byContext = 0;
- if (pDevice->bProtectMode == true)
+ if (pDevice->bProtectMode)
sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
- if (pDevice->bNonERPPresent == true)
+ if (pDevice->bNonERPPresent)
sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
- if (pDevice->bBarkerPreambleMd == true)
+ if (pDevice->bBarkerPreambleMd)
sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
}

- if ((pMgmt->b11hEnable == true) &&
+ if ((pMgmt->b11hEnable) &&
(pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
// Country IE
pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
@@ -3535,7 +3526,7 @@ s_MgrMakeProbeResponse(
((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0;
pbyBuffer += (1) + WLAN_IEHDR_LEN;
uLength += (1) + WLAN_IEHDR_LEN;
- if (pMgmt->bSwitchChannel == true) {
+ if (pMgmt->bSwitchChannel) {
// Channel Switch IE
((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH;
((PWLAN_IE_CH_SW) pbyBuffer)->len = 3;
@@ -3564,7 +3555,7 @@ s_MgrMakeProbeResponse(
pbyBuffer += (7) + WLAN_IEHDR_LEN;
uLength += (7) + WLAN_IEHDR_LEN;
for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) {
- if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) {
+ if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer + 1)) {
pbyBuffer += 2;
uLength += 2;
pIBSSDFS->len += 2;
@@ -3585,7 +3576,7 @@ s_MgrMakeProbeResponse(
}

// hostapd wpa/wpa2 IE
- if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) {
+ if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd)) {
if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
if (pMgmt->wWPAIELen != 0) {
sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
@@ -3687,7 +3678,7 @@ s_MgrMakeAssocRequest(
pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN;

// for 802.11h
- if (pMgmt->b11hEnable == true) {
+ if (pMgmt->b11hEnable) {
if (sFrame.pCurrPowerCap == NULL) {
sFrame.pCurrPowerCap = (PWLAN_IE_PW_CAP)(sFrame.pBuf + sFrame.len);
sFrame.len += (2 + WLAN_IEHDR_LEN);
@@ -3832,7 +3823,7 @@ s_MgrMakeAssocRequest(
sFrame.pRSN->len +=6;

// RSN Capabilites
- if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
+ if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist) {
memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
} else {
sFrame.pRSN->abyRSN[16] = 0;
@@ -3840,7 +3831,7 @@ s_MgrMakeAssocRequest(
}
sFrame.pRSN->len +=2;

- if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
+ if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
// RSN PMKID
pbyRSN = &sFrame.pRSN->abyRSN[18];
pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count
@@ -4088,7 +4079,7 @@ s_MgrMakeReAssocRequest(
sFrame.pRSN->len +=6;

// RSN Capabilites
- if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
+ if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist) {
memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
} else {
sFrame.pRSN->abyRSN[16] = 0;
@@ -4096,7 +4087,7 @@ s_MgrMakeReAssocRequest(
}
sFrame.pRSN->len +=2;

- if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
+ if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
// RSN PMKID
pbyRSN = &sFrame.pRSN->abyRSN[18];
pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count
@@ -4343,7 +4334,7 @@ s_vMgrRxProbeResponse(
}

//2008-0730-01<Add>by MikeLiu
-if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
+if(ChannelExceedZoneType(pDevice, byCurrChannel))
return;

if (sFrame.pERP != NULL) {
@@ -4804,7 +4795,7 @@ bAdd_PMKID_Candidate (
for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii];
if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) {
- if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) {
+ if ((psRSNCapObj->bRSNCapExist) && (psRSNCapObj->wRSNCap & BIT0)) {
pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
} else {
pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -4815,7 +4806,7 @@ bAdd_PMKID_Candidate (

// New Candidate
pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates];
- if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) {
+ if ((psRSNCapObj->bRSNCapExist) && (psRSNCapObj->wRSNCap & BIT0)) {
pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
} else {
pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -4876,7 +4867,7 @@ s_bCipherMatch (
}

if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
- (pBSSNode->bWPA2Valid == true) &&
+ (pBSSNode->bWPA2Valid) &&
//20080123-01,<Add> by Einsn Liu
((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) {
//WPA2
@@ -4910,7 +4901,7 @@ s_bCipherMatch (
}

} else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
- (pBSSNode->bWPAValid == true) &&
+ (pBSSNode->bWPAValid) &&
((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) {
//WPA
// check Group Key Cipher
diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c
index 61ac46f..c109b3d 100644
--- a/drivers/staging/vt6655/wpa.c
+++ b/drivers/staging/vt6655/wpa.c
@@ -247,7 +247,7 @@ WPA_SearchRSN (
int ii;
unsigned char byPKType = WPA_NONE;

- if (pBSSList->bWPAValid == false)
+ if (!pBSSList->bWPAValid)
return false;

switch(byCmd) {
diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c
index 744799c..4e9623e 100644
--- a/drivers/staging/vt6655/wpa2.c
+++ b/drivers/staging/vt6655/wpa2.c
@@ -195,7 +195,7 @@ WPA2vParseRSN (
break;
} //for

- if (bUseGK == true) {
+ if (bUseGK) {
if (j != 1) {
// invalid CSS, This should be only PK CSS.
return;
@@ -339,7 +339,7 @@ WPA2uSetIEs(
pRSNIEs->len +=2;

if ((pMgmt->gsPMKIDCache.BSSIDInfoCount > 0) &&
- (pMgmt->bRoaming == true) &&
+ (pMgmt->bRoaming) &&
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
// RSN PMKID
pwPMKID = (unsigned short *)(&pRSNIEs->abyRSN[18]); // Point to PMKID count
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index 732ba88..411380d 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -357,22 +357,8 @@ spin_lock_irq(&pDevice->lock);
// If is_broadcast_ether_addr, set the key as every key entry's group key.
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n");

- if ((KeybSetAllGroupKey(&(pDevice->sKey),
- dwKeyIndex,
- param->u.wpa_key.key_len,
- (PQWORD) &(KeyRSC),
- (unsigned char *)abyKey,
- byKeyDecMode,
- pDevice->PortOffset,
- pDevice->byLocalID) == true) &&
- (KeybSetDefaultKey(&(pDevice->sKey),
- dwKeyIndex,
- param->u.wpa_key.key_len,
- (PQWORD) &(KeyRSC),
- (unsigned char *)abyKey,
- byKeyDecMode,
- pDevice->PortOffset,
- pDevice->byLocalID) == true) ) {
+ if ((KeybSetAllGroupKey(&(pDevice->sKey), dwKeyIndex, param->u.wpa_key.key_len, (PQWORD) & (KeyRSC), (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID)) &&
+ (KeybSetDefaultKey(&(pDevice->sKey), dwKeyIndex, param->u.wpa_key.key_len, (PQWORD) & (KeyRSC), (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID)) ) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n");

} else {
@@ -397,15 +383,7 @@ spin_lock_irq(&pDevice->lock);
//spin_unlock_irq(&pDevice->lock);
return -EINVAL;
}
- if (KeybSetKey(&(pDevice->sKey),
- &param->addr[0],
- dwKeyIndex,
- param->u.wpa_key.key_len,
- (PQWORD) &(KeyRSC),
- (unsigned char *)abyKey,
- byKeyDecMode,
- pDevice->PortOffset,
- pDevice->byLocalID) == true) {
+ if (KeybSetKey(&(pDevice->sKey), &param->addr[0], dwKeyIndex, param->u.wpa_key.key_len, (PQWORD) & (KeyRSC), (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID)) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n");

} else {
@@ -857,7 +835,7 @@ else
else
pDevice->bEncryptionEnable = false;
if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
- ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==true))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP
+ ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP
KeyvInitTable(&pDevice->sKey, pDevice->PortOffset);
spin_lock_irq(&pDevice->lock);
pDevice->bLinkPass = false;
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
index ef7c52b..db95a0e 100644
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@ -218,7 +218,7 @@ static struct zbud_page *zbud_alloc_raw_page(void)
{
struct zbud_page *zbpg = NULL;
struct zbud_hdr *zh0, *zh1;
- bool recycled = 0;
+ bool recycled = false;

/* if any pages on the zbpg list, use one */
spin_lock(&zbpg_unused_list_spinlock);
@@ -227,7 +227,7 @@ static struct zbud_page *zbud_alloc_raw_page(void)
struct zbud_page, bud_list);
list_del_init(&zbpg->bud_list);
zcache_zbpg_unused_list_count--;
- recycled = 1;
+ recycled = true;
}
spin_unlock(&zbpg_unused_list_spinlock);
if (zbpg == NULL)
@@ -946,7 +946,7 @@ int zcache_new_client(uint16_t cli_id)
goto out;
if (cli->allocated)
goto out;
- cli->allocated = 1;
+ cli->allocated = true;
#ifdef CONFIG_FRONTSWAP
cli->xvpool = xv_create_pool();
if (cli->xvpool == NULL)
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 4426290..935ec9b 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -3243,10 +3243,10 @@ static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd)
len = sprintf(buf, "TargetAddress="
"%s%s%s:%hu,%hu",
(np->np_sockaddr.ss_family == AF_INET6) ?
- "[" : "", (inaddr_any == false) ?
+ "[" : "", (!inaddr_any) ?
np->np_ip : conn->local_ip,
(np->np_sockaddr.ss_family == AF_INET6) ?
- "]" : "", (inaddr_any == false) ?
+ "]" : "", (!inaddr_any) ?
np->np_port : conn->local_port,
tpg->tpgt);
len += 1;
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 58cea07..2d0b0fa 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4006,7 +4006,7 @@ void target_get_sess_cmd(struct se_session *se_sess, struct se_cmd *se_cmd,
* fabric acknowledgement that requires two target_put_sess_cmd()
* invocations before se_cmd descriptor release.
*/
- if (ack_kref == true)
+ if (ack_kref)
kref_get(&se_cmd->cmd_kref);

spin_lock_irqsave(&se_sess->sess_cmd_lock, flags);
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index 18b48cd..40f3398 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -2139,7 +2139,7 @@ static void isr_rxdata(struct slgt_info *info)
if (desc_complete(info->rbufs[i])) {
/* all buffers full */
rx_stop(info);
- info->rx_restart = 1;
+ info->rx_restart = true;
continue;
}
info->rbufs[i].buf[count++] = (unsigned char)reg;
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index a7efe53..8cc640a 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -456,7 +456,7 @@ static int synclinkmp_device_count = 0;
* .text section address and breakpoint on module load.
* This is useful for use with gdb and add-symbol-file command.
*/
-static bool break_on_load = 0;
+static bool break_on_load = false;

/*
* Driver major number, defaults to zero to get auto
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 70d69d0..6cedc21 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1019,11 +1019,11 @@ static int usbtmc_probe(struct usb_interface *intf,
usb_set_intfdata(intf, data);
kref_init(&data->kref);
mutex_init(&data->io_mutex);
- data->zombie = 0;
+ data->zombie = false;

/* Initialize USBTMC bTag and other fields */
data->bTag = 1;
- data->TermCharEnabled = 0;
+ data->TermCharEnabled = false;
data->TermChar = '\n';

/* USBTMC devices have only one setting, so use that */
@@ -1091,7 +1091,7 @@ static void usbtmc_disconnect(struct usb_interface *intf)
sysfs_remove_group(&intf->dev.kobj, &capability_attr_grp);
sysfs_remove_group(&intf->dev.kobj, &data_attr_grp);
mutex_lock(&data->io_mutex);
- data->zombie = 1;
+ data->zombie = true;
mutex_unlock(&data->io_mutex);
kref_put(&data->kref, usbtmc_delete);
}
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index a0613d8..500a614 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -102,7 +102,7 @@ static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
static struct task_struct *khubd_task;

/* cycle leds on hubs that aren't blinking for attention */
-static bool blinkenlights = 0;
+static bool blinkenlights = false;
module_param (blinkenlights, bool, S_IRUGO);
MODULE_PARM_DESC (blinkenlights, "true to cycle leds on hubs");

@@ -131,12 +131,12 @@ MODULE_PARM_DESC(initial_descriptor_timeout,
* otherwise the new scheme is used. If that fails and "use_both_schemes"
* is set, then the driver will make another attempt, using the other scheme.
*/
-static bool old_scheme_first = 0;
+static bool old_scheme_first = false;
module_param(old_scheme_first, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(old_scheme_first,
"start with the old device initialization scheme");

-static bool use_both_schemes = 1;
+static bool use_both_schemes = true;
module_param(use_both_schemes, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(use_both_schemes,
"try the other device initialization scheme if the "
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index c16ff55..265e5a1 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -152,9 +152,9 @@ static const char *ep_string[] = {
};

/* DMA usage flag */
-static bool use_dma = 1;
+static bool use_dma = true;
/* packet per buffer dma */
-static bool use_dma_ppb = 1;
+static bool use_dma_ppb = true;
/* with per descr. update */
static bool use_dma_ppb_du;
/* buffer fill mode */
@@ -3171,7 +3171,7 @@ static int init_dma_pools(struct udc *dev)
if (use_dma_ppb) {
use_dma_bufferfill_mode = 0;
} else {
- use_dma_ppb_du = 0;
+ use_dma_ppb_du = false;
use_dma_bufferfill_mode = 1;
}

diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index a28f6ff..de0846c 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -250,7 +250,7 @@ static struct usb_configuration rndis_config_driver = {
/*-------------------------------------------------------------------------*/

#ifdef CONFIG_USB_ETH_EEM
-static bool use_eem = 1;
+static bool use_eem = true;
#else
static bool use_eem;
#endif
diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/f_eem.c
index 1a7b2dd..10e0b92 100644
--- a/drivers/usb/gadget/f_eem.c
+++ b/drivers/usb/gadget/f_eem.c
@@ -213,7 +213,7 @@ static int eem_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
/* zlps should not occur because zero-length EEM packets
* will be inserted in those cases where they would occur
*/
- eem->port.is_zlp_ok = 1;
+ eem->port.is_zlp_ok = true;
eem->port.cdc_filter = DEFAULT_FILTER;
DBG(cdev, "activate eem\n");
net = gether_connect(&eem->port);
diff --git a/drivers/usb/gadget/f_hid.c b/drivers/usb/gadget/f_hid.c
index b211342..6fd455c 100644
--- a/drivers/usb/gadget/f_hid.c
+++ b/drivers/usb/gadget/f_hid.c
@@ -181,7 +181,7 @@ static void f_hidg_req_complete(struct usb_ep *ep, struct usb_request *req)
"End Point Request ERROR: %d\n", req->status);
}

- hidg->write_pending = 0;
+ hidg->write_pending = false;
wake_up(&hidg->write_queue);
}

@@ -226,13 +226,13 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
hidg->req->length = count;
hidg->req->complete = f_hidg_req_complete;
hidg->req->context = hidg;
- hidg->write_pending = 1;
+ hidg->write_pending = true;

status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
if (status < 0) {
ERROR(hidg->func.config->cdev,
"usb_ep_queue error on int endpoint %zd\n", status);
- hidg->write_pending = 0;
+ hidg->write_pending = false;
wake_up(&hidg->write_queue);
} else {
status = count;
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 47766f0..c47ed32 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3226,7 +3226,7 @@ static int __init check_parameters(struct fsg_dev *fsg)
* disable stalls.
*/
if (gadget_is_at91(fsg->gadget))
- mod_data.can_stall = 0;
+ mod_data.can_stall = false;

if (mod_data.release == 0xffff) { // Parameter wasn't set
gcnum = usb_gadget_controller_number(fsg->gadget);
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index f97e737..372dbee 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -1474,7 +1474,7 @@ udc_prime_status(struct mv_udc *udc, u8 direction, u16 status, bool empty)
req = udc->status_req;

/* fill in the reqest structure */
- if (empty == false) {
+ if (!empty) {
*((u16 *) req->req.buf) = cpu_to_le16(status);
req->req.length = 2;
} else
@@ -1707,7 +1707,7 @@ static void handle_setup_packet(struct mv_udc *udc, u8 ep_num,
delegate = true;

/* delegate USB standard requests to the gadget driver */
- if (delegate == true) {
+ if (delegate) {
/* USB requests handled by gadget */
if (setup->wLength) {
/* DATA phase from gadget, STATUS phase from udc */
diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c
index 7322d29..03cd6c7 100644
--- a/drivers/usb/gadget/net2272.c
+++ b/drivers/usb/gadget/net2272.c
@@ -69,7 +69,7 @@ static const char * const ep_name[] = {
*
* If use_dma is disabled, pio will be used instead.
*/
-static bool use_dma = 0;
+static bool use_dma = false;
module_param(use_dma, bool, 0644);

/*
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index cdedd13..acffe30 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -90,8 +90,8 @@ static const char *const ep_name [] = {
* Some gadget drivers work better with the dma support here than others.
* These two parameters let you use PIO or more aggressive DMA.
*/
-static bool use_dma = 1;
-static bool use_dma_chaining = 0;
+static bool use_dma = true;
+static bool use_dma_chaining = false;

/* "modprobe net2280 use_dma=n" etc */
module_param (use_dma, bool, S_IRUGO);
@@ -112,7 +112,7 @@ module_param (fifo_mode, ushort, 0644);
* USB suspend requests will be ignored. This is acceptable for
* self-powered devices
*/
-static bool enable_suspend = 0;
+static bool enable_suspend = false;

/* "modprobe net2280 enable_suspend=1" etc */
module_param (enable_suspend, bool, S_IRUGO);
@@ -2886,7 +2886,7 @@ MODULE_LICENSE ("GPL");
static int __init init (void)
{
if (!use_dma)
- use_dma_chaining = 0;
+ use_dma_chaining = false;
return pci_register_driver (&net2280_pci_driver);
}
module_init (init);
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 576cd85..a57f834 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -98,7 +98,7 @@ module_param (fifo_mode, uint, 0);
MODULE_PARM_DESC (fifo_mode, "endpoint configuration");

#ifdef USE_DMA
-static bool use_dma = 1;
+static bool use_dma = true;

/* "modprobe omap_udc use_dma=y", or else as a kernel
* boot parameter "omap_udc:use_dma=y"
@@ -3122,7 +3122,7 @@ static int __init udc_init(void)
{
/* Disable DMA for omap7xx -- it doesn't work right. */
if (cpu_is_omap7xx())
- use_dma = 0;
+ use_dma = false;

INFO("%s, version: " DRIVER_VERSION
#ifdef USE_ISO
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 31d3483..8d06024 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -81,7 +81,7 @@ module_param(buflen, uint, 0);
* work better with hosts where config changes are problematic or
* controllers (like original superh) that only support one config.
*/
-static bool loopdefault = 0;
+static bool loopdefault = false;
module_param(loopdefault, bool, S_IRUGO|S_IWUSR);

/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index a007a9f..e850b57 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -112,7 +112,7 @@ module_param (park, uint, S_IRUGO);
MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");

/* for flakey hardware, ignore overcurrent indicators */
-static bool ignore_oc = 0;
+static bool ignore_oc = false;
module_param (ignore_oc, bool, S_IRUGO);
MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 34b9edd..0a2c2d2 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -115,13 +115,13 @@ static inline void sb800_prefetch(struct ohci_hcd *ohci, int on)


/* Some boards misreport power switching/overcurrent */
-static bool distrust_firmware = 1;
+static bool distrust_firmware = true;
module_param (distrust_firmware, bool, 0);
MODULE_PARM_DESC (distrust_firmware,
"true to distrust firmware power/overcurrent setup");

/* Some boards leave IR set wrongly, since they fail BIOS/SMM handshakes */
-static bool no_handshake = 0;
+static bool no_handshake = false;
module_param (no_handshake, bool, 0);
MODULE_PARM_DESC (no_handshake, "true (not default) disables BIOS handshake");

diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index 16dd6a6..4280a63 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -74,7 +74,7 @@ MODULE_LICENSE("GPL");
#define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444)
INT_MODULE_PARM(testing, 0);
/* Some boards misreport power switching/overcurrent*/
-static bool distrust_firmware = 1;
+static bool distrust_firmware = true;
module_param(distrust_firmware, bool, 0);
MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren"
"t setup");
diff --git a/drivers/usb/host/whci/qset.c b/drivers/usb/host/whci/qset.c
index 76083ae..9ba984a 100644
--- a/drivers/usb/host/whci/qset.c
+++ b/drivers/usb/host/whci/qset.c
@@ -396,7 +396,7 @@ static void urb_dequeue_work(struct work_struct *work)
struct whc *whc = qset->whc;
unsigned long flags;

- if (wurb->is_async == true)
+ if (wurb->is_async)
asl_update(whc, WUSBCMD_ASYNC_UPDATED
| WUSBCMD_ASYNC_SYNCED_DB
| WUSBCMD_ASYNC_QSET_RM);
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6bbe3c3..5e5d28e 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -2448,7 +2448,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
if (timeleft <= 0) {
xhci_warn(xhci, "%s while waiting for %s command\n",
timeleft == 0 ? "Timeout" : "Signal",
- ctx_change == 0 ?
+ !ctx_change ?
"configure endpoint" :
"evaluate context");
/* FIXME cancel the configure endpoint command */
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c
index a4a3c7c..2671fcf 100644
--- a/drivers/usb/misc/ftdi-elan.c
+++ b/drivers/usb/misc/ftdi-elan.c
@@ -53,7 +53,7 @@ MODULE_AUTHOR("Tony Olech");
MODULE_DESCRIPTION("FTDI ELAN driver");
MODULE_LICENSE("GPL");
#define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444)
-static bool distrust_firmware = 1;
+static bool distrust_firmware = true;
module_param(distrust_firmware, bool, 0);
MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren"
"t setup");
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 4fd0dc8..aba4e79 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");

/* Module parameters */
static DEFINE_MUTEX(iowarrior_mutex);
-static bool debug = 0;
+static bool debug = false;
module_param(debug, bool, 0644);
MODULE_PARM_DESC(debug, "debug=1 enables debugging messages");

diff --git a/drivers/usb/musb/cppi_dma.c b/drivers/usb/musb/cppi_dma.c
index 66bc376..3a5af9a 100644
--- a/drivers/usb/musb/cppi_dma.c
+++ b/drivers/usb/musb/cppi_dma.c
@@ -750,7 +750,7 @@ cppi_next_tx_segment(struct musb *musb, struct cppi_channel *tx)
* So this module parameter lets the heuristic be disabled. When using
* gadgetfs, the heuristic will probably need to be disabled.
*/
-static bool cppi_rx_rndis = 1;
+static bool cppi_rx_rndis = true;

module_param(cppi_rx_rndis, bool, 0);
MODULE_PARM_DESC(cppi_rx_rndis, "enable/disable RX RNDIS heuristic");
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 3d11cf64..e8acd08 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1589,7 +1589,7 @@ irqreturn_t musb_interrupt(struct musb *musb)
EXPORT_SYMBOL_GPL(musb_interrupt);

#ifndef CONFIG_MUSB_PIO_ONLY
-static bool __initdata use_dma = 1;
+static bool __initdata use_dma = true;

/* "modprobe ... use_dma=0" etc */
module_param(use_dma, bool, 0);
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 3077a44..9bdc072 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -34,7 +34,7 @@


#ifdef CONFIG_USB_SERIAL_DEBUG
-static bool debug = 1;
+static bool debug = true;
#else
static bool debug;
#endif
@@ -406,7 +406,7 @@ static void iuu_led_activity_on(struct urb *urb)
int result;
char *buf_ptr = port->write_urb->transfer_buffer;
*buf_ptr++ = IUU_SET_LED;
- if (xmas == 1) {
+ if (xmas) {
get_random_bytes(buf_ptr, 6);
*(buf_ptr+7) = 1;
} else {
@@ -426,7 +426,7 @@ static void iuu_led_activity_off(struct urb *urb)
struct usb_serial_port *port = urb->context;
int result;
char *buf_ptr = port->write_urb->transfer_buffer;
- if (xmas == 1) {
+ if (xmas) {
iuu_rxcmd(urb);
return;
} else {
@@ -671,7 +671,7 @@ static int iuu_bulk_write(struct usb_serial_port *port)
buf_len = priv->writelen;
priv->writelen = 0;
spin_unlock_irqrestore(&priv->lock, flags);
- if (debug == 1) {
+ if (debug) {
for (i = 0; i < buf_len; i++)
sprintf(priv->dbgbuf + i*2 ,
"%02X", priv->writebuf[i]);
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 03b5e24..98346ca 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -2055,7 +2055,7 @@ static void mos7840_change_port_settings(struct tty_struct *tty,
Data = 0x0c;
mos7840_set_uart_reg(port, INTERRUPT_ENABLE_REGISTER, Data);

- if (mos7840_port->read_urb_busy == false) {
+ if (!mos7840_port->read_urb_busy) {
mos7840_port->read_urb_busy = true;
status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
if (status) {
@@ -2126,7 +2126,7 @@ static void mos7840_set_termios(struct tty_struct *tty,
return;
}

- if (mos7840_port->read_urb_busy == false) {
+ if (!mos7840_port->read_urb_busy) {
mos7840_port->read_urb_busy = true;
status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC);
if (status) {
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index d074b37..d1d5f82 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -82,7 +82,7 @@
#endif

static bool debug;
-static bool safe = 1;
+static bool safe = true;
static bool padded = CONFIG_USB_SERIAL_SAFE_PADDED;

#define DRIVER_VERSION "v0.1"
@@ -295,7 +295,7 @@ static int safe_startup(struct usb_serial *serial)
case LINEO_SAFESERIAL_CRC:
break;
case LINEO_SAFESERIAL_CRC_PADDED:
- padded = 1;
+ padded = true;
break;
default:
return -EINVAL;
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index b4a7167..34ba15f 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -186,7 +186,7 @@ static void skel_read_bulk_callback(struct urb *urb)
} else {
dev->bulk_in_filled = urb->actual_length;
}
- dev->ongoing_read = 0;
+ dev->ongoing_read = false;
spin_unlock(&dev->err_lock);

complete(&dev->bulk_in_completion);
@@ -207,7 +207,7 @@ static int skel_do_read_io(struct usb_skel *dev, size_t count)
dev);
/* tell everybody to leave the URB alone */
spin_lock_irq(&dev->err_lock);
- dev->ongoing_read = 1;
+ dev->ongoing_read = true;
spin_unlock_irq(&dev->err_lock);

/* do it */
@@ -218,7 +218,7 @@ static int skel_do_read_io(struct usb_skel *dev, size_t count)
dev->bulk_in_filled = 0;
rv = (rv == -ENOMEM) ? rv : -EIO;
spin_lock_irq(&dev->err_lock);
- dev->ongoing_read = 0;
+ dev->ongoing_read = false;
spin_unlock_irq(&dev->err_lock);
}

@@ -272,7 +272,7 @@ retry:
* we must finish now
*/
dev->bulk_in_copied = 0;
- dev->processed_urb = 1;
+ dev->processed_urb = true;
}

if (!dev->processed_urb) {
@@ -282,7 +282,7 @@ retry:
*/
wait_for_completion(&dev->bulk_in_completion);
dev->bulk_in_copied = 0;
- dev->processed_urb = 1;
+ dev->processed_urb = true;
}

/* errors must be reported */
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index b0b2ac3..f6182c1 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1661,7 +1661,7 @@ static int __devinit aty128fb_setup(char *options)
}
#ifdef CONFIG_MTRR
if(!strncmp(this_opt, "nomtrr", 6)) {
- mtrr = 0;
+ mtrr = false;
continue;
}
#endif
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 622f12b..0e67607 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -3854,10 +3854,10 @@ static int __init atyfb_setup(char *options)

while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "noaccel", 7)) {
- noaccel = 1;
+ noaccel = true;
#ifdef CONFIG_MTRR
} else if (!strncmp(this_opt, "nomtrr", 6)) {
- nomtrr = 1;
+ nomtrr = true;
#endif
} else if (!strncmp(this_opt, "vram:", 5))
vram = simple_strtoul(this_opt + 5, NULL, 0);
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index ce1506b..f2aaf69 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -263,16 +263,16 @@ static reg_val common_regs[] = {

static char *mode_option;
static char *monitor_layout;
-static bool noaccel = 0;
+static bool noaccel = false;
static int default_dynclk = -2;
-static bool nomodeset = 0;
-static bool ignore_edid = 0;
-static bool mirror = 0;
+static bool nomodeset = false;
+static bool ignore_edid = false;
+static bool mirror = false;
static int panel_yres = 0;
-static bool force_dfp = 0;
-static bool force_measure_pll = 0;
+static bool force_dfp = false;
+static bool force_measure_pll = false;
#ifdef CONFIG_MTRR
-static bool nomtrr = 0;
+static bool nomtrr = false;
#endif
static bool force_sleep;
static bool ignore_devlist;
@@ -899,12 +899,12 @@ static int radeonfb_ioctl (struct fb_info *info, unsigned int cmd,
tmp = INREG(CRTC_EXT_CNTL);
tmp |= CRTC_CRT_ON;

- mirror = 1;
+ mirror = true;
} else {
tmp = INREG(CRTC_EXT_CNTL);
tmp &= ~CRTC_CRT_ON;

- mirror = 0;
+ mirror = false;
}

OUTREG(CRTC_EXT_CNTL, tmp);
@@ -2485,30 +2485,30 @@ static int __init radeonfb_setup (char *options)
continue;

if (!strncmp(this_opt, "noaccel", 7)) {
- noaccel = 1;
+ noaccel = true;
} else if (!strncmp(this_opt, "mirror", 6)) {
- mirror = 1;
+ mirror = true;
} else if (!strncmp(this_opt, "force_dfp", 9)) {
- force_dfp = 1;
+ force_dfp = true;
} else if (!strncmp(this_opt, "panel_yres:", 11)) {
panel_yres = simple_strtoul((this_opt+11), NULL, 0);
} else if (!strncmp(this_opt, "backlight:", 10)) {
backlight = simple_strtoul(this_opt+10, NULL, 0);
#ifdef CONFIG_MTRR
} else if (!strncmp(this_opt, "nomtrr", 6)) {
- nomtrr = 1;
+ nomtrr = true;
#endif
} else if (!strncmp(this_opt, "nomodeset", 9)) {
- nomodeset = 1;
+ nomodeset = true;
} else if (!strncmp(this_opt, "force_measure_pll", 17)) {
- force_measure_pll = 1;
+ force_measure_pll = true;
} else if (!strncmp(this_opt, "ignore_edid", 11)) {
- ignore_edid = 1;
+ ignore_edid = true;
#if defined(CONFIG_PM) && defined(CONFIG_X86)
} else if (!strncmp(this_opt, "force_sleep", 11)) {
- force_sleep = 1;
+ force_sleep = true;
} else if (!strncmp(this_opt, "ignore_devlist", 14)) {
- ignore_devlist = 1;
+ ignore_devlist = true;
#endif
} else
mode_option = this_opt;
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 738c8ce..e766011 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -2381,7 +2381,7 @@ static int __init cirrusfb_setup(char *options)
continue;

if (!strcmp(this_opt, "noaccel"))
- noaccel = 1;
+ noaccel = true;
else if (!strncmp(this_opt, "mode:", 5))
mode_option = this_opt + 5;
else
diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c
index c645f92..905b29d 100644
--- a/drivers/video/hgafb.c
+++ b/drivers/video/hgafb.c
@@ -133,7 +133,7 @@ static struct fb_fix_screeninfo hga_fix __devinitdata = {
/* Don't assume that tty1 will be the initial current console. */
static int release_io_port = 0;
static int release_io_ports = 0;
-static bool nologo = 0;
+static bool nologo = false;

/* -------------------------------------------------------------------------
*
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index b83f361..a9e6cb6 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1965,13 +1965,13 @@ static int __devinit i810fb_setup(char *options)

while ((this_opt = strsep(&options, ",")) != NULL) {
if (!strncmp(this_opt, "mtrr", 4))
- mtrr = 1;
+ mtrr = true;
else if (!strncmp(this_opt, "accel", 5))
- accel = 1;
+ accel = true;
else if (!strncmp(this_opt, "extvga", 6))
- extvga = 1;
+ extvga = true;
else if (!strncmp(this_opt, "sync", 4))
- sync = 1;
+ sync = true;
else if (!strncmp(this_opt, "vram:", 5))
vram = (simple_strtoul(this_opt+5, NULL, 0));
else if (!strncmp(this_opt, "voffset:", 8))
@@ -1997,7 +1997,7 @@ static int __devinit i810fb_setup(char *options)
else if (!strncmp(this_opt, "vsync2:", 7))
vsync2 = simple_strtoul(this_opt+7, NULL, 0);
else if (!strncmp(this_opt, "dcolor", 6))
- dcolor = 1;
+ dcolor = true;
else if (!strncmp(this_opt, "ddc3", 4))
ddc3 = true;
else
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 02fd226..a091aba 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -230,15 +230,15 @@ MODULE_DESCRIPTION("Framebuffer driver for Intel(R) " SUPPORTED_CHIPSETS
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DEVICE_TABLE(pci, intelfb_pci_table);

-static bool accel = 1;
+static bool accel = true;
static int vram = 4;
-static bool hwcursor = 0;
-static bool mtrr = 1;
-static bool fixed = 0;
-static bool noinit = 0;
-static bool noregister = 0;
-static bool probeonly = 0;
-static bool idonly = 0;
+static bool hwcursor = false;
+static bool mtrr = true;
+static bool fixed = false;
+static bool noinit = false;
+static bool noregister = false;
+static bool probeonly = false;
+static bool idonly = false;
static int bailearly = 0;
static int voffset = 48;
static char *mode = NULL;
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index fb3f673..9754500 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -2215,15 +2215,15 @@ static int __init neofb_setup(char *options)
continue;

if (!strncmp(this_opt, "internal", 8))
- internal = 1;
+ internal = true;
else if (!strncmp(this_opt, "external", 8))
- external = 1;
+ external = true;
else if (!strncmp(this_opt, "nostretch", 9))
- nostretch = 1;
+ nostretch = true;
else if (!strncmp(this_opt, "nopciburst", 10))
- nopciburst = 1;
+ nopciburst = true;
else if (!strncmp(this_opt, "libretto", 8))
- libretto = 1;
+ libretto = true;
else
mode_option = this_opt;
}
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index b291bfa..a1b7005 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -47,7 +47,7 @@ static unsigned int def_rotate;
static unsigned int def_mirror;

#ifdef CONFIG_FB_OMAP_MANUAL_UPDATE
-static bool manual_update = 1;
+static bool manual_update = true;
#else
static bool manual_update;
#endif
@@ -1952,7 +1952,7 @@ static int __init omapfb_setup(char *options)
else if (!strncmp(this_opt, "mirror:", 7))
def_mirror = (simple_strtoul(this_opt + 7, NULL, 0));
else if (!strncmp(this_opt, "manual_update", 13))
- manual_update = 1;
+ manual_update = true;
else {
pr_debug("omapfb: invalid option\n");
r = -1;
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 00c5c61..c6822f2 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -1186,7 +1186,7 @@ static int taal_power_on(struct omap_dss_device *dssdev)
if (r)
goto err;

- td->enabled = 1;
+ td->enabled = true;

if (!td->intro_printed) {
dev_info(&dssdev->dev, "%s panel revision %02x.%02x.%02x\n",
@@ -1229,7 +1229,7 @@ static void taal_power_off(struct omap_dss_device *dssdev)

omapdss_dsi_display_disable(dssdev, true, false);

- td->enabled = 0;
+ td->enabled = false;
}

static int taal_panel_reset(struct omap_dss_device *dssdev)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index e1626a1..7f35462 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -1761,7 +1761,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
{
struct omap_overlay *ovl = omap_dss_get_overlay(plane);
bool five_taps = true;
- bool fieldmode = 0;
+ bool fieldmode = false;
int r, cconv = 0;
unsigned offset0, offset1;
s32 row_inc;
@@ -1787,7 +1787,7 @@ int dispc_ovl_setup(enum omap_plane plane, struct omap_overlay_info *oi,
outh = oi->out_height == 0 ? oi->height : oi->out_height;

if (ilace && oi->height == outh)
- fieldmode = 1;
+ fieldmode = true;

if (ilace) {
if (fieldmode)
@@ -1993,7 +1993,7 @@ static void dispc_mgr_enable_digit_out(bool enable)
* wait for the extra sync losts */
init_completion(&frame_done_completion);

- if (src == DSS_HDMI_M_PCLK && enable == false) {
+ if (src == DSS_HDMI_M_PCLK && !enable) {
irq_mask = DISPC_IRQ_FRAMEDONETV;
num_irqs = 1;
} else {
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 52f36ec..981efa3 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1378,7 +1378,7 @@ retry:

memset(&cur, 0, sizeof(cur));
cur.clkin = dss_sys_clk;
- cur.use_sys_clk = 1;
+ cur.use_sys_clk = true;
cur.highfreq = 0;

/* no highfreq: 0.75MHz < Fint = clkin / regn < 2.1MHz */
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index ce15831..1bbb6ce 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -1350,7 +1350,7 @@ static void omapfb_free_fbmem(struct fb_info *fbi)

rg->vaddr = NULL;
rg->paddr = 0;
- rg->alloc = 0;
+ rg->alloc = false;
rg->size = 0;
}

@@ -1434,7 +1434,7 @@ static int omapfb_alloc_fbmem(struct fb_info *fbi, unsigned long size,
rg->paddr = paddr;
rg->vaddr = vaddr;
rg->size = size;
- rg->alloc = 1;
+ rg->alloc = true;

return 0;
}
@@ -2431,7 +2431,7 @@ static int omapfb_probe(struct platform_device *pdev)
* available for OMAP2 and OMAP3
*/
if (def_vrfb && !cpu_is_omap24xx() && !cpu_is_omap34xx()) {
- def_vrfb = 0;
+ def_vrfb = false;
dev_warn(&pdev->dev, "VRFB is not supported on this hardware, "
"ignoring the module parameter vrfb=y\n");
}
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c
index 9441e2e..55c2836 100644
--- a/drivers/video/omap2/vram.c
+++ b/drivers/video/omap2/vram.c
@@ -482,7 +482,7 @@ static __init int omap_vram_init(void)
{
int i;

- vram_initialized = 1;
+ vram_initialized = true;

for (i = 0; i < postponed_cnt; i++)
omap_vram_add_region(postponed_regions[i].paddr,
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index df31a24..ea15a84 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -1788,17 +1788,17 @@ static int __init pm2fb_setup(char *options)
if (!*this_opt)
continue;
if (!strcmp(this_opt, "lowhsync"))
- lowhsync = 1;
+ lowhsync = true;
else if (!strcmp(this_opt, "lowvsync"))
- lowvsync = 1;
+ lowvsync = true;
else if (!strncmp(this_opt, "hwcursor=", 9))
hwcursor = simple_strtoul(this_opt + 9, NULL, 0);
#ifdef CONFIG_MTRR
else if (!strncmp(this_opt, "nomtrr", 6))
- nomtrr = 1;
+ nomtrr = true;
#endif
else if (!strncmp(this_opt, "noaccel", 7))
- noaccel = 1;
+ noaccel = true;
else
mode_option = this_opt;
}
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 055e527..1195165 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -1533,12 +1533,12 @@ static int __init pm3fb_setup(char *options)
if (!*this_opt)
continue;
else if (!strncmp(this_opt, "noaccel", 7))
- noaccel = 1;
+ noaccel = true;
else if (!strncmp(this_opt, "hwcursor=", 9))
hwcursor = simple_strtoul(this_opt + 9, NULL, 0);
#ifdef CONFIG_MTRR
else if (!strncmp(this_opt, "nomtrr", 6))
- nomtrr = 1;
+ nomtrr = true;
#endif
else
mode_option = this_opt;
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 2f58cf9..cada4ed 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -207,9 +207,9 @@ MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
/* command line data, set in rivafb_setup() */
static int flatpanel __devinitdata = -1; /* Autodetect later */
static int forceCRTC __devinitdata = -1;
-static bool noaccel __devinitdata = 0;
+static bool noaccel __devinitdata = false;
#ifdef CONFIG_MTRR
-static bool nomtrr __devinitdata = 0;
+static bool nomtrr __devinitdata = false;
#endif
#ifdef CONFIG_PMAC_BACKLIGHT
static int backlight __devinitdata = 1;
@@ -218,7 +218,7 @@ static int backlight __devinitdata = 0;
#endif

static char *mode_option __devinitdata = NULL;
-static bool strictmode = 0;
+static bool strictmode = false;

static struct fb_fix_screeninfo __devinitdata rivafb_fix = {
.type = FB_TYPE_PACKED_PIXELS,
@@ -2169,12 +2169,12 @@ static int __devinit rivafb_setup(char *options)
backlight = simple_strtoul(this_opt+10, NULL, 0);
#ifdef CONFIG_MTRR
} else if (!strncmp(this_opt, "nomtrr", 6)) {
- nomtrr = 1;
+ nomtrr = true;
#endif
} else if (!strncmp(this_opt, "strictmode", 10)) {
- strictmode = 1;
+ strictmode = true;
} else if (!strncmp(this_opt, "noaccel", 7)) {
- noaccel = 1;
+ noaccel = true;
} else
mode_option = this_opt;
}
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 111fb32..e5ef994 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -95,7 +95,7 @@

static bool vgapass; /* enable VGA passthrough cable */
static int mem; /* mem size in MB, 0 = autodetect */
-static bool clipping = 1; /* use clipping (slower, safer) */
+static bool clipping = true; /* use clipping (slower, safer) */
static int gfxclk; /* force FBI freq in Mhz . Dangerous */
static bool slowpci; /* slow PCI settings */

@@ -1284,17 +1284,17 @@ static int __devinit sstfb_setup(char *options)
f_ddprintk("option %s\n", this_opt);

if (!strcmp(this_opt, "vganopass"))
- vgapass = 0;
+ vgapass = false;
else if (!strcmp(this_opt, "vgapass"))
- vgapass = 1;
+ vgapass = true;
else if (!strcmp(this_opt, "clipping"))
- clipping = 1;
+ clipping = true;
else if (!strcmp(this_opt, "noclipping"))
- clipping = 0;
+ clipping = false;
else if (!strcmp(this_opt, "fastpci"))
- slowpci = 0;
+ slowpci = false;
else if (!strcmp(this_opt, "slowpci"))
- slowpci = 1;
+ slowpci = true;
else if (!strncmp(this_opt, "mem:",4))
mem = simple_strtoul (this_opt+4, NULL, 0);
else if (!strncmp(this_opt, "gfxclk:",7))
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index e026724..b7e5482 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -1608,7 +1608,7 @@ static void __init tdfxfb_setup(char *options)
hwcursor = simple_strtoul(this_opt + 9, NULL, 0);
#ifdef CONFIG_MTRR
} else if (!strncmp(this_opt, "nomtrr", 6)) {
- nomtrr = 1;
+ nomtrr = true;
#endif
} else {
mode_option = this_opt;
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c
index a197731..f42b9f4 100644
--- a/drivers/video/udlfb.c
+++ b/drivers/video/udlfb.c
@@ -69,9 +69,9 @@ static struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);

/* module options */
-static bool console = 1; /* Allow fbcon to open framebuffer */
-static bool fb_defio = 1; /* Detect mmap writes using page faults */
-static bool shadow = 1; /* Optionally disable shadow framebuffer */
+static bool console = true; /* Allow fbcon to open framebuffer */
+static bool fb_defio = true; /* Detect mmap writes using page faults */
+static bool shadow = true; /* Optionally disable shadow framebuffer */

/* dlfb keeps a list of urbs for efficient bulk transfers */
static void dlfb_urb_completion(struct urb *urb);
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index e7f69ef..fc5cc2c 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -44,7 +44,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = {
};

static int mtrr __devinitdata = 3; /* enable mtrr by default */
-static bool blank = 1; /* enable blanking by default */
+static bool blank = true; /* enable blanking by default */
static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */
static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */
static bool nocrtc __devinitdata; /* ignore CRTC settings */
@@ -1882,19 +1882,19 @@ static int __devinit uvesafb_setup(char *options)
else if (!strcmp(this_opt, "ywrap"))
ypan = 2;
else if (!strcmp(this_opt, "vgapal"))
- pmi_setpal = 0;
+ pmi_setpal = false;
else if (!strcmp(this_opt, "pmipal"))
- pmi_setpal = 1;
+ pmi_setpal = true;
else if (!strncmp(this_opt, "mtrr:", 5))
mtrr = simple_strtoul(this_opt+5, NULL, 0);
else if (!strcmp(this_opt, "nomtrr"))
mtrr = 0;
else if (!strcmp(this_opt, "nocrtc"))
- nocrtc = 1;
+ nocrtc = true;
else if (!strcmp(this_opt, "noedid"))
- noedid = 1;
+ noedid = true;
else if (!strcmp(this_opt, "noblank"))
- blank = 0;
+ blank = false;
else if (!strncmp(this_opt, "vtotal:", 7))
vram_total = simple_strtoul(this_opt + 7, NULL, 0);
else if (!strncmp(this_opt, "vremap:", 7))
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c
index 501a922..d92f61c 100644
--- a/drivers/video/vfb.c
+++ b/drivers/video/vfb.c
@@ -110,7 +110,7 @@ static struct fb_fix_screeninfo vfb_fix __devinitdata = {
.accel = FB_ACCEL_NONE,
};

-static bool vfb_enable __initdata = 0; /* disabled by default */
+static bool vfb_enable __initdata = false; /* disabled by default */
module_param(vfb_enable, bool, 0);

static int vfb_check_var(struct fb_var_screeninfo *var,
@@ -453,12 +453,12 @@ static int __init vfb_setup(char *options)
{
char *this_opt;

- vfb_enable = 0;
+ vfb_enable = false;

if (!options)
return 1;

- vfb_enable = 1;
+ vfb_enable = true;

if (!*options)
return 1;
@@ -468,7 +468,7 @@ static int __init vfb_setup(char *options)
continue;
/* Test disable for backwards compatibility */
if (!strcmp(this_opt, "disable"))
- vfb_enable = 0;
+ vfb_enable = false;
}
return 1;
}
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 20feb4d..3e87419 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -55,7 +55,7 @@ module_param(timeout, ushort, 0);
MODULE_PARM_DESC(timeout,
"Watchdog timeout in ticks. (0<timeout<65536, default=65535)");

-static bool reset = 1;
+static bool reset = true;
module_param(reset, bool, 0);
MODULE_PARM_DESC(reset,
"Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset");
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index bcb884e..9bc10be 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1549,7 +1549,7 @@ static size_t get_note_info_size(struct elf_note_info *info)
static int write_note_info(struct elf_note_info *info,
struct file *file, loff_t *foffset)
{
- bool first = 1;
+ bool first = true;
struct elf_thread_core_info *t = info->thread;

do {
@@ -1568,7 +1568,7 @@ static int write_note_info(struct elf_note_info *info,
!writenote(&t->notes[i], file, foffset))
return 0;

- first = 0;
+ first = false;
t = t->next;
} while (t);

diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index fe4cd0f..c122a18 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -53,8 +53,8 @@ static inline void btrfs_init_delayed_node(
delayed_node->inode_id = inode_id;
atomic_set(&delayed_node->refs, 0);
delayed_node->count = 0;
- delayed_node->in_list = 0;
- delayed_node->inode_dirty = 0;
+ delayed_node->in_list = false;
+ delayed_node->inode_dirty = false;
delayed_node->ins_root = RB_ROOT;
delayed_node->del_root = RB_ROOT;
mutex_init(&delayed_node->mutex);
@@ -178,7 +178,7 @@ static void btrfs_queue_delayed_node(struct btrfs_delayed_root *root,
list_add_tail(&node->p_list, &root->prepare_list);
atomic_inc(&node->refs); /* inserted into list */
root->nodes++;
- node->in_list = 1;
+ node->in_list = true;
}
spin_unlock(&root->lock);
}
@@ -194,7 +194,7 @@ static void btrfs_dequeue_delayed_node(struct btrfs_delayed_root *root,
list_del_init(&node->n_list);
if (!list_empty(&node->p_list))
list_del_init(&node->p_list);
- node->in_list = 0;
+ node->in_list = false;
}
spin_unlock(&root->lock);
}
@@ -1051,7 +1051,7 @@ static void btrfs_release_delayed_inode(struct btrfs_delayed_node *delayed_node)

if (delayed_node && delayed_node->inode_dirty) {
BUG_ON(!delayed_node->root);
- delayed_node->inode_dirty = 0;
+ delayed_node->inode_dirty = false;
delayed_node->count--;

delayed_root = delayed_node->root->fs_info->delayed_root;
@@ -1790,7 +1790,7 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans,
goto release_node;

fill_stack_inode_item(trans, &delayed_node->inode_item, inode);
- delayed_node->inode_dirty = 1;
+ delayed_node->inode_dirty = true;
delayed_node->count++;
atomic_inc(&root->fs_info->delayed_root->items);
release_node:
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 8b7794c..543cbbf 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -4434,7 +4434,7 @@ findFirstRetry:
psrch_inf->unicode = false;

psrch_inf->ntwrk_buf_start = (char *)pSMBr;
- psrch_inf->smallBuf = 0;
+ psrch_inf->smallBuf = false;
psrch_inf->srch_entries_start =
(char *) &pSMBr->hdr.Protocol +
le16_to_cpu(pSMBr->t2.DataOffset);
@@ -4567,7 +4567,7 @@ int CIFSFindNext(const int xid, struct cifs_tcon *tcon,
cifs_buf_release(psrch_inf->ntwrk_buf_start);
psrch_inf->srch_entries_start = response_data;
psrch_inf->ntwrk_buf_start = (char *)pSMB;
- psrch_inf->smallBuf = 0;
+ psrch_inf->smallBuf = false;
if (parms->EndofSearch)
psrch_inf->endOfSearch = true;
else
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 9c28865..6b0333f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -963,9 +963,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,

/* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */
/* default is always to request posix paths. */
- vol->posix_paths = 1;
+ vol->posix_paths = true;
/* default to using server inode numbers where available */
- vol->server_ino = 1;
+ vol->server_ino = true;

vol->actimeo = CIFS_DEF_ACTIMEO;

@@ -997,9 +997,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,

/* Have to parse this before we parse for "user" */
if (strnicmp(data, "user_xattr", 10) == 0) {
- vol->no_xattr = 0;
+ vol->no_xattr = false;
} else if (strnicmp(data, "nouser_xattr", 12) == 0) {
- vol->no_xattr = 1;
+ vol->no_xattr = true;
} else if (strnicmp(data, "user", 4) == 0) {
if (!value) {
printk(KERN_WARNING
@@ -1007,7 +1007,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
goto cifs_parse_mount_err;
} else if (!*value) {
/* null user, ie anonymous, authentication */
- vol->nullauth = 1;
+ vol->nullauth = true;
}
if (strnlen(value, MAX_USERNAME_SIZE) <
MAX_USERNAME_SIZE) {
@@ -1158,7 +1158,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
vol->secFlg |= CIFSSEC_MAY_LANMAN;
#endif
} else if (strnicmp(value, "none", 4) == 0) {
- vol->nullauth = 1;
+ vol->nullauth = true;
} else {
cERROR(1, "bad security option: %s", value);
goto cifs_parse_mount_err;
@@ -1334,7 +1334,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
cERROR(1, "no socket option specified");
continue;
} else if (strnicmp(value, "TCP_NODELAY", 11) == 0) {
- vol->sockopt_tcp_nodelay = 1;
+ vol->sockopt_tcp_nodelay = true;
}
} else if (strnicmp(data, "netbiosname", 4) == 0) {
if (!value || !*value || (*value == ' ')) {
@@ -1408,9 +1408,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
} else if (strnicmp(data, "ro", 2) == 0) {
/* ignore */
} else if (strnicmp(data, "noblocksend", 11) == 0) {
- vol->noblocksnd = 1;
+ vol->noblocksnd = true;
} else if (strnicmp(data, "noautotune", 10) == 0) {
- vol->noautotune = 1;
+ vol->noautotune = true;
} else if ((strnicmp(data, "suid", 4) == 0) ||
(strnicmp(data, "nosuid", 6) == 0) ||
(strnicmp(data, "exec", 4) == 0) ||
@@ -1426,34 +1426,34 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
is ok to just ignore them */
continue;
} else if (strnicmp(data, "hard", 4) == 0) {
- vol->retry = 1;
+ vol->retry = true;
} else if (strnicmp(data, "soft", 4) == 0) {
- vol->retry = 0;
+ vol->retry = false;
} else if (strnicmp(data, "perm", 4) == 0) {
- vol->noperm = 0;
+ vol->noperm = false;
} else if (strnicmp(data, "noperm", 6) == 0) {
- vol->noperm = 1;
+ vol->noperm = true;
} else if (strnicmp(data, "mapchars", 8) == 0) {
- vol->remap = 1;
+ vol->remap = true;
} else if (strnicmp(data, "nomapchars", 10) == 0) {
- vol->remap = 0;
+ vol->remap = false;
} else if (strnicmp(data, "sfu", 3) == 0) {
- vol->sfu_emul = 1;
+ vol->sfu_emul = true;
} else if (strnicmp(data, "nosfu", 5) == 0) {
- vol->sfu_emul = 0;
+ vol->sfu_emul = false;
} else if (strnicmp(data, "nodfs", 5) == 0) {
- vol->nodfs = 1;
+ vol->nodfs = true;
} else if (strnicmp(data, "posixpaths", 10) == 0) {
- vol->posix_paths = 1;
+ vol->posix_paths = true;
} else if (strnicmp(data, "noposixpaths", 12) == 0) {
- vol->posix_paths = 0;
+ vol->posix_paths = false;
} else if (strnicmp(data, "nounix", 6) == 0) {
- vol->no_linux_ext = 1;
+ vol->no_linux_ext = true;
} else if (strnicmp(data, "nolinux", 7) == 0) {
- vol->no_linux_ext = 1;
+ vol->no_linux_ext = true;
} else if ((strnicmp(data, "nocase", 6) == 0) ||
(strnicmp(data, "ignorecase", 10) == 0)) {
- vol->nocase = 1;
+ vol->nocase = true;
} else if (strnicmp(data, "mand", 4) == 0) {
/* ignore */
} else if (strnicmp(data, "nomand", 6) == 0) {
@@ -1461,10 +1461,10 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
} else if (strnicmp(data, "_netdev", 7) == 0) {
/* ignore */
} else if (strnicmp(data, "brl", 3) == 0) {
- vol->nobrl = 0;
+ vol->nobrl = false;
} else if ((strnicmp(data, "nobrl", 5) == 0) ||
(strnicmp(data, "nolock", 6) == 0)) {
- vol->nobrl = 1;
+ vol->nobrl = true;
/* turn off mandatory locking in mode
if remote locking is turned off since the
local vfs will do advisory */
@@ -1481,43 +1481,43 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
negotiated this has no effect since mandatory locks
would be used (mandatory locks is all that those
those servers support) */
- vol->mand_lock = 1;
+ vol->mand_lock = true;
} else if (strnicmp(data, "setuids", 7) == 0) {
- vol->setuids = 1;
+ vol->setuids = true;
} else if (strnicmp(data, "nosetuids", 9) == 0) {
- vol->setuids = 0;
+ vol->setuids = false;
} else if (strnicmp(data, "dynperm", 7) == 0) {
vol->dynperm = true;
} else if (strnicmp(data, "nodynperm", 9) == 0) {
vol->dynperm = false;
} else if (strnicmp(data, "nohard", 6) == 0) {
- vol->retry = 0;
+ vol->retry = false;
} else if (strnicmp(data, "nosoft", 6) == 0) {
- vol->retry = 1;
+ vol->retry = true;
} else if (strnicmp(data, "nointr", 6) == 0) {
- vol->intr = 0;
+ vol->intr = false;
} else if (strnicmp(data, "intr", 4) == 0) {
- vol->intr = 1;
+ vol->intr = true;
} else if (strnicmp(data, "nostrictsync", 12) == 0) {
- vol->nostrictsync = 1;
+ vol->nostrictsync = true;
} else if (strnicmp(data, "strictsync", 10) == 0) {
- vol->nostrictsync = 0;
+ vol->nostrictsync = false;
} else if (strnicmp(data, "serverino", 7) == 0) {
- vol->server_ino = 1;
+ vol->server_ino = true;
} else if (strnicmp(data, "noserverino", 9) == 0) {
- vol->server_ino = 0;
+ vol->server_ino = false;
} else if (strnicmp(data, "rwpidforward", 12) == 0) {
- vol->rwpidforward = 1;
+ vol->rwpidforward = true;
} else if (strnicmp(data, "cifsacl", 7) == 0) {
- vol->cifs_acl = 1;
+ vol->cifs_acl = true;
} else if (strnicmp(data, "nocifsacl", 9) == 0) {
- vol->cifs_acl = 0;
+ vol->cifs_acl = false;
} else if (strnicmp(data, "acl", 3) == 0) {
- vol->no_psx_acl = 0;
+ vol->no_psx_acl = false;
} else if (strnicmp(data, "noacl", 5) == 0) {
- vol->no_psx_acl = 1;
+ vol->no_psx_acl = true;
} else if (strnicmp(data, "locallease", 6) == 0) {
- vol->local_lease = 1;
+ vol->local_lease = true;
} else if (strnicmp(data, "sign", 4) == 0) {
vol->secFlg |= CIFSSEC_MUST_SIGN;
} else if (strnicmp(data, "seal", 4) == 0) {
@@ -1525,13 +1525,13 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
is a per tree connection (mount) not a per socket
or per-smb connection option in the protocol */
/* vol->secFlg |= CIFSSEC_MUST_SEAL; */
- vol->seal = 1;
+ vol->seal = true;
} else if (strnicmp(data, "direct", 6) == 0) {
- vol->direct_io = 1;
+ vol->direct_io = true;
} else if (strnicmp(data, "forcedirectio", 13) == 0) {
- vol->direct_io = 1;
+ vol->direct_io = true;
} else if (strnicmp(data, "strictcache", 11) == 0) {
- vol->strict_io = 1;
+ vol->strict_io = true;
} else if (strnicmp(data, "noac", 4) == 0) {
printk(KERN_WARNING "CIFS: Mount option noac not "
"supported. Instead set "
@@ -2270,7 +2270,7 @@ cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb_vol *volume_info)

/* ntlmv2 is much stronger than ntlm security, and has been broadly
supported for many years, time to update default security mechanism */
- if ((volume_info->secFlg == 0) && warned_on_ntlm == false) {
+ if ((volume_info->secFlg == 0) && !warned_on_ntlm) {
warned_on_ntlm = true;
cERROR(1, "default security mechanism requested. The default "
"security mechanism will be upgraded from ntlm to "
@@ -2859,13 +2859,13 @@ void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,

if (vol_info && vol_info->no_linux_ext) {
tcon->fsUnixInfo.Capability = 0;
- tcon->unix_ext = 0; /* Unix Extensions disabled */
+ tcon->unix_ext = false; /* Unix Extensions disabled */
cFYI(1, "Linux protocol extensions disabled");
return;
} else if (vol_info)
- tcon->unix_ext = 1; /* Unix Extensions supported */
+ tcon->unix_ext = true; /* Unix Extensions supported */

- if (tcon->unix_ext == 0) {
+ if (!tcon->unix_ext) {
cFYI(1, "Unix extensions disabled so not set on reconnect");
return;
}
@@ -2903,7 +2903,7 @@ void reset_cifs_unix_caps(int xid, struct cifs_tcon *tcon,
CIFS_MOUNT_POSIXACL;
}

- if (vol_info && vol_info->posix_paths == 0)
+ if (vol_info && !vol_info->posix_paths)
cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP;
else if (cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
cFYI(1, "negotiate posix pathnames");
@@ -3441,7 +3441,7 @@ try_mount_again:
goto mount_fail_check;
}
} else
- tcon->unix_ext = 0; /* server does not support them */
+ tcon->unix_ext = false; /* server does not support them */

/* do not care if following two calls succeed - informational */
if (!tcon->ipc) {
@@ -3685,7 +3685,7 @@ CIFSTCon(unsigned int xid, struct cifs_ses *ses,
if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') &&
(bcc_ptr[2] == 'C')) {
cFYI(1, "IPC connection");
- tcon->ipc = 1;
+ tcon->ipc = true;
}
} else if (length == 2) {
if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) {
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 4dd9283..c50ab24 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2859,7 +2859,7 @@ void cifs_oplock_break(struct work_struct *work)
else
break_lease(inode, O_WRONLY);
rc = filemap_fdatawrite(inode->i_mapping);
- if (cinode->clientCanCacheRead == 0) {
+ if (!cinode->clientCanCacheRead) {
rc = filemap_fdatawait(inode->i_mapping);
mapping_set_error(inode->i_mapping, rc);
invalidate_remote_inode(inode);
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 551d0c2..ddc210c 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -45,7 +45,7 @@ static bool is_first_ses_reconnect(struct cifs_ses *ses)
list_for_each(tmp, &ses->server->smb_ses_list) {
tmp_ses = list_entry(tmp, struct cifs_ses,
smb_ses_list);
- if (tmp_ses->need_reconnect == false)
+ if (!tmp_ses->need_reconnect)
return false;
}
/* could not find a session that was already connected,
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index d22cd16..512599e 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -116,7 +116,7 @@ static int parse_options(char *options, struct exofs_mountopt *opts)
EXOFS_MIN_PID);
return -EINVAL;
}
- s_pid = 1;
+ s_pid = true;
break;
case Opt_to:
if (match_int(&args[0], &option))
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 066836e..253d77a 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -308,7 +308,7 @@ int __generic_block_fiemap(struct inode *inode,
*/
if (!past_eof &&
blk_to_logical(inode, start_blk) >= isize)
- past_eof = 1;
+ past_eof = true;

/*
* First hole after going past the EOF, this is our
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 54cea8a..8e8d1c6 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -386,7 +386,7 @@ static bool referring_call_exists(struct nfs_client *clp,
uint32_t nrclists,
struct referring_call_list *rclists)
{
- bool status = 0;
+ bool status = false;
int i, j;
struct nfs4_session *session;
struct nfs4_slot_table *tbl;
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 31778f7..77875b7 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1203,7 +1203,7 @@ nfs4_find_client_no_ident(const struct sockaddr *addr)

spin_lock(&nfs_client_lock);
list_for_each_entry(clp, &nfs_client_list, cl_share_link) {
- if (nfs4_cb_match_client(addr, clp, 0) == false)
+ if (!nfs4_cb_match_client(addr, clp, 0))
continue;
atomic_inc(&clp->cl_count);
spin_unlock(&nfs_client_lock);
@@ -1247,7 +1247,7 @@ nfs4_find_client_sessionid(const struct sockaddr *addr,

spin_lock(&nfs_client_lock);
list_for_each_entry(clp, &nfs_client_list, cl_share_link) {
- if (nfs4_cb_match_client(addr, clp, 1) == false)
+ if (!nfs4_cb_match_client(addr, clp, 1))
continue;

if (!nfs4_has_session(clp))
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index f0c849c..e47c6d9 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6021,7 +6021,7 @@ nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data, bool sync)
task = rpc_run_task(&task_setup_data);
if (IS_ERR(task))
return PTR_ERR(task);
- if (sync == false)
+ if (!sync)
goto out;
status = nfs4_wait_for_completion_rpc_task(task);
if (status != 0)
diff --git a/fs/nfs/objlayout/objio_osd.c b/fs/nfs/objlayout/objio_osd.c
index 55d0128..2f8567b 100644
--- a/fs/nfs/objlayout/objio_osd.c
+++ b/fs/nfs/objlayout/objio_osd.c
@@ -334,7 +334,7 @@ objio_alloc_io_state(struct pnfs_layout_hdr *pnfs_layout_type, bool is_reading,
ios->private = aos;
BUG_ON(ios->nr_pages > (pgbase + count + PAGE_SIZE - 1) >> PAGE_SHIFT);

- aos->objios.sync = 0;
+ aos->objios.sync = false;
aos->objios.ios = ios;
*outp = &aos->objios;
return 0;
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 896da74..ef38797 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -196,7 +196,7 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o
__be32 status;

fh_init(&resfh, NFS4_FHSIZE);
- open->op_truncate = 0;
+ open->op_truncate = false;

if (open->op_create) {
/* FIXME: check session persistence and pnfs flags.
@@ -313,7 +313,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
/* We don't yet support WANT bits: */
open->op_share_access &= NFS4_SHARE_ACCESS_MASK;

- open->op_created = 0;
+ open->op_created = false;
/*
* RFC5661 18.51.3
* Before RECLAIM_COMPLETE done, server should deny new lock
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 0ec5a1b..7b96c9a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3532,7 +3532,7 @@ int nfsd4_check_resp_size(struct nfsd4_compoundres *resp, u32 pad)
if (length > session->se_fchannel.maxresp_sz)
return nfserr_rep_too_big;

- if (slot->sl_cachethis == 1 &&
+ if (slot->sl_cachethis &&
length > session->se_fchannel.maxresp_cached)
return nfserr_rep_too_big_to_cache;

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index edf6d3e..88cda07 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1490,7 +1490,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
goto out_nfserr;
}
if (created)
- *created = 1;
+ *created = true;

nfsd_check_ignore_resizing(iap);

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 32df2b6..bd0ca92 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -616,7 +616,7 @@ static inline bool ata_id_has_flush(const u16 *id)

static inline bool ata_id_flush_enabled(const u16 *id)
{
- if (ata_id_has_flush(id) == 0)
+ if (!ata_id_has_flush(id))
return false;
if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
return false;
@@ -632,7 +632,7 @@ static inline bool ata_id_has_flush_ext(const u16 *id)

static inline bool ata_id_flush_ext_enabled(const u16 *id)
{
- if (ata_id_has_flush_ext(id) == 0)
+ if (!ata_id_has_flush_ext(id))
return false;
if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
return false;
@@ -699,7 +699,7 @@ static inline bool ata_id_has_lba48(const u16 *id)

static inline bool ata_id_lba48_enabled(const u16 *id)
{
- if (ata_id_has_lba48(id) == 0)
+ if (!ata_id_has_lba48(id))
return false;
if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
return false;
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 611cd60..4bac914 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -329,7 +329,7 @@ bool noirqdebug __read_mostly;

int noirqdebug_setup(char *str)
{
- noirqdebug = 1;
+ noirqdebug = true;
printk(KERN_INFO "IRQ lockup detection disabled\n");

return 1;
diff --git a/kernel/printk.c b/kernel/printk.c
index 13c0a11..ce14a53 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -525,7 +525,7 @@ static bool __read_mostly ignore_loglevel;

static int __init ignore_loglevel_setup(char *str)
{
- ignore_loglevel = 1;
+ ignore_loglevel = true;
printk(KERN_INFO "debug: ignoring loglevel setting.\n");

return 0;
@@ -696,9 +696,9 @@ static void zap_locks(void)
}

#if defined(CONFIG_PRINTK_TIME)
-static bool printk_time = 1;
+static bool printk_time = true;
#else
-static bool printk_time = 0;
+static bool printk_time = false;
#endif
module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);

@@ -1098,12 +1098,12 @@ int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, cha
return -1;
}

-bool console_suspend_enabled = 1;
+bool console_suspend_enabled = true;
EXPORT_SYMBOL(console_suspend_enabled);

static int __init console_suspend_disable(char *str)
{
- console_suspend_enabled = 0;
+ console_suspend_enabled = false;
return 1;
}
__setup("no_console_suspend", console_suspend_disable);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 5255c9d..ee1dd3e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4576,7 +4576,7 @@ bool __sched yield_to(struct task_struct *p, bool preempt)
struct task_struct *curr = current;
struct rq *rq, *p_rq;
unsigned long flags;
- bool yielded = 0;
+ bool yielded = false;

local_irq_save(flags);
rq = this_rq();
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f487f25..214fe52 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2812,7 +2812,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
int err = 0;
- bool first = 1;
+ bool first = true;
size_t left = *lenp;
unsigned long bitmap_len = table->maxlen;
unsigned long *bitmap = (unsigned long *) table->data;
@@ -2887,7 +2887,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
while (val_a <= val_b)
set_bit(val_a++, tmp_bitmap);

- first = 0;
+ first = false;
proc_skip_char(&kbuf, &left, '\n');
}
free_page(page);
@@ -2918,7 +2918,7 @@ int proc_do_large_bitmap(struct ctl_table *table, int write,
break;
}

- first = 0; bit_b++;
+ first = false; bit_b++;
}
if (!err)
err = proc_put_char(&buffer, &left, '\n');
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a3f1bc5..fc8bf9d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -827,7 +827,7 @@ __acquires(kernel_lock)
tracing_set_tracer(type->name);
default_bootup_tracer = NULL;
/* disable other selftests, since this will break it. */
- tracing_selftest_disabled = 1;
+ tracing_selftest_disabled = true;
#ifdef CONFIG_FTRACE_STARTUP_TEST
printk(KERN_INFO "Disabling FTRACE selftests due to running tracer '%s'\n",
type->name);
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 8e75003..6eab76f 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1870,7 +1870,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
break;

base = 10;
- is_sign = 0;
+ is_sign = false;

switch (*fmt++) {
case 'c':
@@ -1916,7 +1916,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
case 'i':
base = 0;
case 'd':
- is_sign = 1;
+ is_sign = true;
case 'u':
break;
case '%':
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index b6f4b99..10c6d2d 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -269,7 +269,7 @@ void wait_for_unix_gc(void)
*/
if (unix_tot_inflight > UNIX_INFLIGHT_TRIGGER_GC && !gc_in_progress)
unix_gc();
- wait_event(unix_gc_wait, gc_in_progress == false);
+ wait_event(unix_gc_wait, !gc_in_progress);
}

/* The external entry point: unix_gc() */
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 97ce8fa..b22e027 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -719,7 +719,7 @@ module_param_call(audit, param_set_audit, param_get_audit,
/* Determines if audit header is included in audited messages. This
* provides more context if the audit daemon is not running
*/
-bool aa_g_audit_header = 1;
+bool aa_g_audit_header = true;
module_param_named(audit_header, aa_g_audit_header, aabool,
S_IRUSR | S_IWUSR);

@@ -742,7 +742,7 @@ module_param_named(path_max, aa_g_path_max, aauint, S_IRUSR | S_IWUSR);
/* Determines how paranoid loading of policy is and how much verification
* on the loaded policy is done.
*/
-bool aa_g_paranoid_load = 1;
+bool aa_g_paranoid_load = true;
module_param_named(paranoid_load, aa_g_paranoid_load, aabool,
S_IRUSR | S_IWUSR);

@@ -902,7 +902,7 @@ static int __init apparmor_init(void)

if (!apparmor_enabled || !security_module_enable(&apparmor_ops)) {
aa_info_message("AppArmor disabled by boot time parameter");
- apparmor_enabled = 0;
+ apparmor_enabled = false;
return 0;
}

@@ -944,7 +944,7 @@ register_security_out:
alloc_out:
aa_destroy_aafs();

- apparmor_enabled = 0;
+ apparmor_enabled = false;
return error;
}

diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index d45061d..d941e94 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -81,7 +81,7 @@ static DEFINE_MUTEX(ima_measure_mutex);
static bool ima_use_tcb __initdata;
static int __init default_policy_setup(char *str)
{
- ima_use_tcb = 1;
+ ima_use_tcb = true;
return 1;
}
__setup("ima_tcb", default_policy_setup);
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index fbf9c58..6a9d7d4 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -532,7 +532,7 @@ int mls_compute_sid(struct context *scontext,
return mls_range_set(newcontext, r);
/* Fallthrough */
case AVTAB_CHANGE:
- if ((tclass == policydb.process_class) || (sock == true))
+ if ((tclass == policydb.process_class) || (sock))
/* Use the process MLS attributes. */
return mls_context_cpy(newcontext, scontext);
else
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 185f849..7e50765 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1451,7 +1451,7 @@ static int security_compute_sid(u32 ssid,
}

/* Set the role and type to default values. */
- if ((tclass == policydb.process_class) || (sock == true)) {
+ if ((tclass == policydb.process_class) || (sock)) {
/* Use the current role and type of process. */
newcontext.role = scontext->role;
newcontext.type = scontext->type;
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index c47d3ce..6c63c58 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -1015,7 +1015,7 @@ static bool tomoyo_select_domain(struct tomoyo_io_buffer *head,
if (domain)
head->r.domain = &domain->list;
else
- head->r.eof = 1;
+ head->r.eof = true;
tomoyo_io_printf(head, "# select %s\n", data);
if (domain && domain->is_deleted)
tomoyo_io_printf(head, "# This is a deleted domain.\n");
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 08fde00..91fb06d 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -47,7 +47,7 @@

static int dsp_map[SNDRV_CARDS];
static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
-static bool nonblock_open = 1;
+static bool nonblock_open = true;

MODULE_AUTHOR("Jaroslav Kysela <perex@xxxxxxxx>, Abramo Bagnara <abramo@xxxxxxxxxxxxxxxx>");
MODULE_DESCRIPTION("PCM OSS emulation for ALSA.");
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index ad9434f..76e7bc9 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -66,9 +66,9 @@ static int pcm_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
//static int midi_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
#ifdef CONFIG_HIGH_RES_TIMERS
-static bool hrtimer = 1;
+static bool hrtimer = true;
#endif
-static bool fake_buffer = 1;
+static bool fake_buffer = true;

module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for dummy soundcard.");
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 6839953..2932fd6 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -32,7 +32,7 @@ MODULE_AUTHOR("Uros Bizjak <uros@xxxxxxxxxxx>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("ALSA driver for OPL3 FM synth");

-bool use_internal_drums = 0;
+bool use_internal_drums = false;
module_param(use_internal_drums, bool, 0444);
MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums.");

diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c
index 99704e6..4a77c0f 100644
--- a/sound/drivers/pcsp/pcsp.c
+++ b/sound/drivers/pcsp/pcsp.c
@@ -54,7 +54,7 @@ static int __devinit snd_pcsp_create(struct snd_card *card)
printk(KERN_ERR "PCSP: Make sure you have HPET and ACPI "
"enabled.\n");
printk(KERN_ERR "PCSP: Turned into nopcm mode.\n");
- nopcm = 1;
+ nopcm = true;
}
}

diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index c24594c..ffeaf8f 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -61,7 +61,7 @@ static int dma2 = SNDRV_DEFAULT_DMA1; /* 0,1,3 */
static int wss;
static int ide;
#ifdef CONFIG_PNP
-static bool isapnp = 1; /* Enable ISA PnP detection */
+static bool isapnp = true; /* Enable ISA PnP detection */
#endif

module_param(index, int, 0444);
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index 98d23bd..e7fe1a9 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -1918,7 +1918,7 @@ int ad1848_detect(struct resource *ports, int *ad_flags, int *osp)
for (i = 0; i < 16; i++) {
if ((tmp1 = ad_read(devc, i)) != (tmp2 = ad_read(devc, i + 16))) {
DDB(printk("ad1848 detect step H(%d/%x/%x) - SoundPro chip?\n", i, tmp1, tmp2));
- soundpro = 1;
+ soundpro = true;
devc->chip_name = "SoundPro CMI 8330";
break;
}
diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
index dabf8a8..344b0a5 100644
--- a/sound/oss/pas2_card.c
+++ b/sound/oss/pas2_card.c
@@ -43,15 +43,15 @@ DEFINE_SPINLOCK(pas_lock);
#ifndef CONFIG_PAS_JOYSTICK
static bool joystick;
#else
-static bool joystick = 1;
+static bool joystick = true;
#endif
#ifdef SYMPHONY_PAS
-static bool symphony = 1;
+static bool symphony = true;
#else
static bool symphony;
#endif
#ifdef BROKEN_BUS_CLOCK
-static bool broken_bus_clock = 1;
+static bool broken_bus_clock = true;
#else
static bool broken_bus_clock;
#endif
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index 0f32a56..69467a5 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -117,7 +117,7 @@

/* If compiled into kernel, it enable or disable pss mixer */
#ifdef CONFIG_PSS_MIXER
-static bool pss_mixer = 1;
+static bool pss_mixer = true;
#else
static bool pss_mixer;
#endif
@@ -1133,8 +1133,8 @@ static int mss_irq __initdata = -1;
static int mss_dma __initdata = -1;
static int mpu_io __initdata = -1;
static int mpu_irq __initdata = -1;
-static bool pss_no_sound = 0; /* Just configure non-sound components */
-static bool pss_keep_settings = 1; /* Keep hardware settings at module exit */
+static bool pss_no_sound = false; /* Just configure non-sound components */
+static bool pss_keep_settings = true; /* Keep hardware settings at module exit */
static char *pss_firmware = "/etc/sound/pss_synth";

module_param(pss_io, int, 0);
diff --git a/sound/oss/trix.c b/sound/oss/trix.c
index 944e0c0..b33fe0b 100644
--- a/sound/oss/trix.c
+++ b/sound/oss/trix.c
@@ -218,7 +218,7 @@ static int __init init_trix_wss(struct address_info *hw_config)
if (!ret)
goto fail;

- if (joystick==1)
+ if (joystick)
trix_write(0x15, 0x80);

/*
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index e8de831..d529eb1 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -68,7 +68,7 @@ MODULE_DESCRIPTION("AudioScience ALSA ASI5000 ASI6000 ASI87xx ASI89xx "
static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
-static bool enable_hpi_hwdep = 1;
+static bool enable_hpi_hwdep = true;

module_param_array(index, int, NULL, S_IRUGO);
MODULE_PARM_DESC(index, "ALSA index value for AudioScience soundcard.");
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 590682f..874d979 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -43,7 +43,7 @@ static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */
static int ac97_clock = 48000;
static char *ac97_quirk;
-static bool spdif_aclink = 1;
+static bool spdif_aclink = true;
static int ac97_codec = -1;

module_param(index, int, 0444);
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 95ffa6a..ed809c1 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -715,14 +715,14 @@ snd_azf3328_mixer_ac97_read(struct snd_ac97 *ac97, unsigned short reg_ac97)
const struct snd_azf3328 *chip = ac97->private_data;
unsigned short reg_azf = snd_azf3328_mixer_ac97_map_reg_idx(reg_ac97);
unsigned short reg_val = 0;
- bool unsupported = 0;
+ bool unsupported = false;

snd_azf3328_dbgmixer(
"snd_azf3328_mixer_ac97_read reg_ac97 %u\n",
reg_ac97
);
if (reg_azf & AZF_AC97_REG_UNSUPPORTED)
- unsupported = 1;
+ unsupported = true;
else {
if (reg_azf & AZF_AC97_REG_REAL_IO_READ)
reg_val = snd_azf3328_mixer_inw(chip,
@@ -759,7 +759,7 @@ snd_azf3328_mixer_ac97_read(struct snd_ac97 *ac97, unsigned short reg_ac97)
reg_val = azf_emulated_ac97_vendor_id & 0xffff;
break;
default:
- unsupported = 1;
+ unsupported = true;
break;
}
}
@@ -776,14 +776,14 @@ snd_azf3328_mixer_ac97_write(struct snd_ac97 *ac97,
{
const struct snd_azf3328 *chip = ac97->private_data;
unsigned short reg_azf = snd_azf3328_mixer_ac97_map_reg_idx(reg_ac97);
- bool unsupported = 0;
+ bool unsupported = false;

snd_azf3328_dbgmixer(
"snd_azf3328_mixer_ac97_write reg_ac97 %u val %u\n",
reg_ac97, val
);
if (reg_azf & AZF_AC97_REG_UNSUPPORTED)
- unsupported = 1;
+ unsupported = true;
else {
if (reg_azf & AZF_AC97_REG_REAL_IO_WRITE)
snd_azf3328_mixer_outw(
@@ -808,7 +808,7 @@ snd_azf3328_mixer_ac97_write(struct snd_ac97 *ac97,
*/
break;
default:
- unsupported = 1;
+ unsupported = true;
break;
}
}
@@ -1446,7 +1446,7 @@ snd_azf3328_ctrl_codec_activity(struct snd_azf3328 *chip,
if (enable)
/* if enable codec, call enable_codecs func
to enable codec supply... */
- call_function = 1;
+ call_function = true;
else {
/* ...otherwise call enable_codecs func
(which globally shuts down operation of codecs)
@@ -1559,7 +1559,7 @@ snd_azf3328_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
struct snd_azf3328_codec_data *codec = runtime->private_data;
int result = 0;
u16 flags1;
- bool previously_muted = 0;
+ bool previously_muted = false;
bool is_main_mixer_playback_codec = (AZF_CODEC_PLAYBACK == codec->type);

snd_azf3328_dbgcalls("snd_azf3328_pcm_trigger cmd %d\n", cmd);
@@ -2590,7 +2590,7 @@ snd_azf3328_create(struct snd_card *card,

/* shutdown codecs to reduce power / noise */
/* have ...ctrl_codec_activity() act properly */
- codec->running = 1;
+ codec->running = true;
snd_azf3328_ctrl_codec_activity(chip, codec_type, 0);

spin_lock_irq(codec->lock);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 95dfb68..dbbde6c 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -116,12 +116,12 @@ MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
* this may give more power-saving, but will take longer time to
* wake up.
*/
-static bool power_save_controller = 1;
+static bool power_save_controller = true;
module_param(power_save_controller, bool, 0644);
MODULE_PARM_DESC(power_save_controller, "Reset controller in power save mode.");
#endif

-static bool align_buffer_size = 1;
+static bool align_buffer_size = true;
module_param(align_buffer_size, bool, 0644);
MODULE_PARM_DESC(align_buffer_size,
"Force buffer and period sizes to be multiple of 128 bytes.");
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 284e311..4299fe6 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -2400,7 +2400,7 @@ static bool add_input_route(struct hda_codec *codec, hda_nid_t pin)
spec->num_inputs > 0 && spec->inputs[0].adc_idx != c) {
snd_printd(KERN_INFO
"via: dynamic ADC switching enabled\n");
- spec->dyn_adc_switch = 1;
+ spec->dyn_adc_switch = true;
}
return true;
}
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index ade2c64..1adc180 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -1660,10 +1660,10 @@ static int __devinit snd_nm256_probe(struct pci_dev *pci,
"Loading stopped\n");
return -ENODEV;
case NM_RESET_WORKAROUND_2:
- reset_workaround_2 = 1;
+ reset_workaround_2 = true;
/* Fall-through */
case NM_RESET_WORKAROUND:
- reset_workaround = 1;
+ reset_workaround = true;
break;
}
}
diff --git a/sound/pci/oxygen/xonar_pcm179x.c b/sound/pci/oxygen/xonar_pcm179x.c
index 8433aa7..204d4d2 100644
--- a/sound/pci/oxygen/xonar_pcm179x.c
+++ b/sound/pci/oxygen/xonar_pcm179x.c
@@ -467,7 +467,7 @@ static void xonar_st_init(struct oxygen *chip)

data->generic.anti_pop_delay = 100;
data->h6 = chip->model.dac_channels_mixer > 2;
- data->has_cs2000 = 1;
+ data->has_cs2000 = true;
data->cs2000_regs[CS2000_FUN_CFG_1] = CS2000_REF_CLK_DIV_1;
data->broken_i2c = true;

diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index ff500a8..0421296 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -40,7 +40,7 @@ MODULE_SUPPORTED_DEVICE("{{SiS,SiS7019 Audio Accelerator}}");

static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */
-static bool enable = 1;
+static bool enable = true;
static int codecs = 1;

module_param(index, int, 0444);
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c
index 5a4e263..7a0683e 100644
--- a/sound/ppc/powermac.c
+++ b/sound/ppc/powermac.c
@@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");

static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */
static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */
-static bool enable_beep = 1;
+static bool enable_beep = true;

module_param(index, int, 0444);
MODULE_PARM_DESC(index, "Index value for " CHIP_NAME " soundchip.");
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 391a38c..8ef98d2 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -55,7 +55,7 @@ MODULE_FIRMWARE("aica_firmware.bin");
#define CARD_NAME "AICA"
static int index = -1;
static char *id;
-static bool enable = 1;
+static bool enable = true;
module_param(index, int, 0444);
MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
module_param(id, charp, 0444);
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index f6fe846..3ab228b 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -192,10 +192,10 @@ static int cs4271_set_dai_fmt(struct snd_soc_dai *codec_dai,

switch (format & SND_SOC_DAIFMT_MASTER_MASK) {
case SND_SOC_DAIFMT_CBS_CFS:
- cs4271->master = 0;
+ cs4271->master = false;
break;
case SND_SOC_DAIFMT_CBM_CFM:
- cs4271->master = 1;
+ cs4271->master = true;
val |= CS4271_MODE1_MASTER;
break;
default:
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 7f4ba81..7002957 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -766,7 +766,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev)
SGTL5000_LINREG_SIMPLE_POWERUP,
0);

- ldo->enabled = 1;
+ ldo->enabled = true;
return 0;
}

@@ -783,7 +783,7 @@ static int ldo_regulator_disable(struct regulator_dev *dev)
snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
SGTL5000_LINREG_VDDD_MASK, 0);

- ldo->enabled = 0;
+ ldo->enabled = false;

return 0;
}
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 0a74b95..071f365 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -395,7 +395,7 @@ static int davinci_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
default:
return -EINVAL;
}
- if (inv_fs == true)
+ if (inv_fs)
pcr ^= (DAVINCI_MCBSP_PCR_FSXP | DAVINCI_MCBSP_PCR_FSRP);
davinci_mcbsp_write_reg(dev, DAVINCI_MCBSP_SRGR_REG, srgr);
dev->pcr = pcr;
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 4f59bba..e163650 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -460,7 +460,7 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
return ret;
}

- dma->assigned = 1;
+ dma->assigned = true;

snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
snd_soc_set_runtime_hwparams(substream, &fsl_dma_hardware);
@@ -835,7 +835,7 @@ static int fsl_dma_close(struct snd_pcm_substream *substream)
substream->runtime->private_data = NULL;
}

- dma->assigned = 0;
+ dma->assigned = false;

return 0;
}
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index a67f437..e6832f2 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -261,7 +261,7 @@ static void cx81801_timeout(unsigned long data)
int muted;

spin_lock(&ams_delta_lock);
- cx81801_cmd_pending = 0;
+ cx81801_cmd_pending = false;
muted = ams_delta_muted;
spin_unlock(&ams_delta_lock);

@@ -372,7 +372,7 @@ static void cx81801_receive(struct tty_struct *tty,
spin_lock_bh(&ams_delta_lock);
mod_timer(&cx81801_timer, jiffies + msecs_to_jiffies(150));
apply = !ams_delta_muted && !cx81801_cmd_pending;
- cx81801_cmd_pending = 1;
+ cx81801_cmd_pending = true;
spin_unlock_bh(&ams_delta_lock);

/* Apply config pulse by connecting the codec to the modem
@@ -451,7 +451,7 @@ static int ams_delta_set_bias_level(struct snd_soc_card *card,

/* Digital mute implemented using modem/CPU multiplexer.
* Shares hardware with codec config pulse generation */
-static bool ams_delta_muted = 1;
+static bool ams_delta_muted = true;

static int ams_delta_digital_mute(struct snd_soc_dai *dai, int mute)
{
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index 0855c1c..5d8d13c 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -115,7 +115,7 @@ static int omap_dmic_dai_startup(struct snd_pcm_substream *substream,

if (!dai->active) {
snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 24);
- dmic->active = 1;
+ dmic->active = true;
} else {
ret = -EBUSY;
}
@@ -133,7 +133,7 @@ static void omap_dmic_dai_shutdown(struct snd_pcm_substream *substream,
mutex_lock(&dmic->mutex);

if (!dai->active)
- dmic->active = 0;
+ dmic->active = false;

mutex_unlock(&dmic->mutex);
}
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 0173719..3894324 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -495,7 +495,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
default:
return -EINVAL;
}
- if (inv_fs == true)
+ if (inv_fs)
regs->pcr0 ^= FSXP | FSRP;

return 0;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 92cee24..03d9a7d 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2405,7 +2405,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
unsigned int mask = (1 << fls(max)) - 1;
unsigned int invert = mc->invert;
int err;
- bool type_2r = 0;
+ bool type_2r = false;
unsigned int val2 = 0;
unsigned int val, val_mask;

@@ -2423,7 +2423,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
val |= val2 << rshift;
} else {
val2 = val2 << shift;
- type_2r = 1;
+ type_2r = true;
}
}
err = snd_soc_update_bits_locked(codec, reg, val_mask, val);
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 4a7be7b..3e56808 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -83,7 +83,7 @@ static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;/* Enable this card *
static int vid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int pid[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = -1 };
static int nrpacks = 8; /* max. number of packets per urb */
-static bool async_unlink = 1;
+static bool async_unlink = true;
static int device_setup[SNDRV_CARDS]; /* device parameter for this card */
static bool ignore_ctl_error;

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0abfb18..9e6a320 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -428,7 +428,7 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)

flags = O_CREAT|O_RDWR;
if (rec->write_mode == WRITE_APPEND)
- rec->file_new = 0;
+ rec->file_new = false;
else
flags |= O_TRUNC;

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 25d34d4..8c8946d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -582,7 +582,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
* for filtering, we don't want it.
*/
if (!strstr(sort_order, "parent"))
- sort_parent.elide = 1;
+ sort_parent.elide = true;
} else
symbol_conf.exclude_other = false;

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 29cb654..8e0bf40 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -838,7 +838,7 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
break;
case '%': /* Probe places */
if (strcmp(arg, "return") == 0) {
- pp->retprobe = 1;
+ pp->retprobe = true;
} else { /* Others not supported yet */
semantic_error("%%%s is not supported.\n", arg);
return -ENOTSUP;

--
Best Regards,
Artem Bityutskiy

Attachment: signature.asc
Description: This is a digitally signed message part