module_param: make bool parameters really bool (net & drivers/net)
Subsystems (30)
PATCH 14/15 module_param: make bool parameters really bool (net & drivers/net)
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick.
It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version.
--- drivers/net/caif/caif_serial.c | 6 +++--- drivers/net/caif/caif_spi.c | 2 +- drivers/net/can/vcan.c | 2 +- drivers/net/ethernet/amd/amd8111e.h | 4 ++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- drivers/net/ethernet/dlink/de600.c | 2 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- drivers/net/ethernet/via/via-rhine.c | 3 ++- drivers/net/irda/donauboe.c | 2 +- drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/usb/pegasus.c | 4 ++-- drivers/net/usb/smsc75xx.c | 2 +- drivers/net/usb/smsc95xx.c | 2 +- drivers/net/virtio_net.c | 2 +- drivers/net/wan/sbni.c | 2 +- drivers/net/wan/sealevel.c | 2 +- drivers/net/wireless/ath/ath5k/ath5k.h | 2 +- drivers/net/wireless/ath/ath5k/base.c | 6 +++--- drivers/net/wireless/ath/carl9170/main.c | 2 +- drivers/net/wireless/iwmc3200wifi/main.c | 4 ++-- drivers/net/wireless/mwl8k.c | 2 +- drivers/net/wireless/orinoco/main.c | 2 +- drivers/net/wireless/p54/main.c | 2 +- drivers/net/wireless/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/rt2x00/rt61pci.c | 2 +- drivers/net/wireless/rt2x00/rt73usb.c | 2 +- drivers/net/wireless/rtlwifi/wifi.h | 2 +- include/net/bluetooth/l2cap.h | 2 +- include/net/sctp/structs.h | 2 +- net/bluetooth/bnep/core.c | 4 ++-- net/bluetooth/hci_event.c | 2 +- net/bluetooth/hci_sock.c | 2 +- net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/rfcomm/core.c | 4 ++-- net/bluetooth/sco.c | 2 +- net/dccp/ccids/ccid2.c | 4 ++-- net/dccp/ccids/ccid3.c | 2 +- net/dccp/ccids/lib/tfrc.c | 2 +- net/dccp/ccids/lib/tfrc.h | 2 +- net/dccp/dccp.h | 2 +- net/dccp/proto.c | 2 +- net/ipv4/netfilter/ipt_ULOG.c | 2 +- net/ipv4/netfilter/iptable_filter.c | 2 +- net/ipv6/netfilter/ip6table_filter.c | 2 +- net/irda/irlan/irlan_common.c | 2 +- net/netfilter/nf_conntrack_acct.c | 2 +- net/netfilter/nf_conntrack_ftp.c | 2 +- net/netfilter/nf_conntrack_h323_main.c | 2 +- net/netfilter/nf_conntrack_timestamp.c | 2 +- 52 files changed, 63 insertions(+), 62 deletions(-)
drivers/net/caif/caif_serial.c +3 -3
@@ -38,15 +38,15 @@ MODULE_ALIAS_LDISC(N_CAIF);/*This list is protected by the rtnl lock. */ static LIST_HEAD (ser_list); -static int ser_loop; +static bool ser_loop;module_param (ser_loop, bool,S_IRUGO );MODULE_PARM_DESC (ser_loop,"Run in simulated loopback mode." ); -static int ser_use_stx =1 ; +static bool ser_use_stx =1 ;module_param (ser_use_stx, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_stx,"STX enabled or not." ); -static int ser_use_fcs =1 ; +static bool ser_use_fcs =1 ;module_param (ser_use_fcs, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_fcs,"FCS enabled or not." );
drivers/net/caif/caif_spi.c +1 -1
@@ -35,7 +35,7 @@ MODULE_DESCRIPTION("CAIF SPI driver");/* Returns the number of padding bytes for alignment. */ #define PAD_POW2 (x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) -static int spi_loop; +static bool spi_loop;module_param (spi_loop, bool,S_IRUGO );MODULE_PARM_DESC (spi_loop,"SPI running in loopback mode." );
drivers/net/can/vcan.c +1 -1
@@ -63,7 +63,7 @@ MODULE_AUTHOR("Urs Thuermann <urs.thuerm* See Documentation/networking/can.txt for details. */ -static int echo;/* echo testing. Default: 0 (Off) */ +static bool echo;/* echo testing. Default: 0 (Off) */ module_param (echo, bool,S_IRUGO );MODULE_PARM_DESC (echo,"Echo sent frames (for testing). Default: 0 (Off)" );
drivers/net/ethernet/amd/amd8111e.h +2 -2
@@ -808,8 +808,8 @@ typedef enum {static int card_idx;static int speed_duplex[MAX_UNITS ] = {0 , }; -static int coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; -static int dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +static bool coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; +static bool dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };static unsigned int chip_version;#endif /* _AMD8111E_H */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -243,7 +243,7 @@ module_param_array(intr_cnt, uint, NULL,MODULE_PARM_DESC (intr_cnt,"thresholds 1..3 for queue interrupt packet counters" ); -static int vf_acls; +static bool vf_acls;#ifdef CONFIG_PCI_IOV module_param (vf_acls, bool,0644 );
drivers/net/ethernet/dlink/de600.c +1 -1
@@ -59,7 +59,7 @@ static const char version[] = "de600.c:#include "de600.h" -static unsigned int check_lost =1 ; +static bool check_lost =1 ;module_param (check_lost, bool,0 );MODULE_PARM_DESC (check_lost,"If set then check for unplugged de600" );
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -48,7 +48,7 @@ enum {extern void __buggy_use_of_MLX4_GET (void );extern void __buggy_use_of_MLX4_PUT (void ); -static int enable_qos; +static bool enable_qos;module_param (enable_qos, bool,0444 );MODULE_PARM_DESC (enable_qos,"Enable Quality of Service support in the HCA (default: off)" );
drivers/net/ethernet/mellanox/mlx4/main.c +1 -1
@@ -99,7 +99,7 @@ MODULE_PARM_DESC(log_num_vlan, "Log2 max/* Log2 max number of VLANs per ETH port (0-7) */ #define MLX4_LOG_NUM_VLANS 7 -static int use_prio; +static bool use_prio;module_param_named (use_prio, use_prio, bool,0444 );MODULE_PARM_DESC (use_prio,"Enable steering by VLAN priority on ETH ports " "(0/1, default 0)" );
drivers/net/ethernet/via/via-rhine.c +2 -1
@@ -35,6 +35,7 @@#define DRV_VERSION "1.5.0"#define DRV_RELDATE "2010-10-09" +#include <linux/types.h> /* A few user-configurable values. These may be modified when a driver module is loaded. */
@@ -55,7 +56,7 @@ static int rx_copybreak;/* Work-around for broken BIOSes: they are unable to get the chip back out of power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */ -static int avoid_D3; +static bool avoid_D3;/* * In case you are looking for 'options[]' or 'full_duplex[]', they
drivers/net/irda/donauboe.c +1 -1
@@ -197,7 +197,7 @@ static char *driver_name = DRIVER_NAME;static int max_baud =4000000 ;#ifdef USE_PROBE -static int do_probe =0 ; +static bool do_probe =0 ;#endif
drivers/net/irda/smsc-ircc2.c +1 -1
@@ -79,7 +79,7 @@ MODULE_AUTHOR("Daniele Peri <[email protected]MODULE_DESCRIPTION ("SMC IrCC SIR/FIR controller driver" );MODULE_LICENSE ("GPL" ); -static int smsc_nopnp =1 ; +static bool smsc_nopnp =1 ;module_param_named (nopnp, smsc_nopnp, bool,0 );MODULE_PARM_DESC (nopnp,"Do not use PNP to detect controller settings, defaults to true" );
drivers/net/usb/pegasus.c +2 -2
@@ -55,8 +55,8 @@ static const char driver_name[] = "pegas#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \ BMSR_100FULL | BMSR_ANEGCAPABLE) -static int loopback; -static int mii_mode; +static bool loopback; +static bool mii_mode;static char *devid;static struct usb_eth_dev usb_dev_id[] = {
drivers/net/usb/smsc75xx.c +1 -1
@@ -76,7 +76,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/usb/smsc95xx.c +1 -1
@@ -59,7 +59,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/virtio_net.c +1 -1
@@ -30,7 +30,7 @@static int napi_weight =128 ;module_param (napi_weight, int,0444 ); -static int csum =1 , gso =1 ; +static bool csum =1 , gso =1 ;module_param (csum, bool,0444 );module_param (gso, bool,0444 );
drivers/net/wan/sbni.c +1 -1
@@ -155,7 +155,7 @@ static int emancipate( struct net_devicstatic const char version[] ="Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n" ; -static int skip_pci_probe__initdata =0 ; +static bool skip_pci_probe__initdata =0 ;static int scandone__initdata =0 ;static int num__initdata =0 ;
drivers/net/wan/sealevel.c +1 -1
@@ -362,7 +362,7 @@ static int io=0x238;static int txdma=1 ;static int rxdma=3 ;static int irq=5 ; -static int slow=0 ; +static bool slow=0 ;module_param (io, int,0 );MODULE_PARM_DESC (io,"The I/O base of the Sealevel card" );
drivers/net/wireless/ath/ath5k/ath5k.h +1 -1
@@ -747,7 +747,7 @@ struct ath5k_athchan_2ghz {*/ #define AR5K_KEYCACHE_SIZE 8 -extern int ath5k_modparam_nohwcrypt; +extern bool ath5k_modparam_nohwcrypt;/***********************\ HW RELATED DEFINITIONS
drivers/net/wireless/ath/ath5k/base.c +3 -3
@@ -68,15 +68,15 @@#define CREATE_TRACE_POINTS #include "trace.h" -int ath5k_modparam_nohwcrypt; +bool ath5k_modparam_nohwcrypt;module_param_named (nohwcrypt, ath5k_modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." ); -static int modparam_all_channels; +static bool modparam_all_channels;module_param_named (all_channels, modparam_all_channels, bool,S_IRUGO );MODULE_PARM_DESC (all_channels,"Expose all channels the device can use." ); -static int modparam_fastchanswitch; +static bool modparam_fastchanswitch;module_param_named (fastchanswitch, modparam_fastchanswitch, bool,S_IRUGO );MODULE_PARM_DESC (fastchanswitch,"Enable fast channel switching for AR2413/AR5413 radios." );
drivers/net/wireless/ath/carl9170/main.c +1 -1
@@ -48,7 +48,7 @@#include "carl9170.h" #include "cmd.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware crypto offload." );
drivers/net/wireless/iwmc3200wifi/main.c +2 -2
@@ -91,11 +91,11 @@ static struct iwm_conf def_iwm_conf = { .mac_addr = {0x00, 0x02, 0xb3, 0x01, 0x02, 0x03}, }; -static int modparam_reset; +static bool modparam_reset;module_param_named (reset, modparam_reset, bool,0644 );MODULE_PARM_DESC (reset,"reset on firmware errors (default 0 [not reset])" ); -static int modparam_wimax_enable =1 ; +static bool modparam_wimax_enable =1 ;module_param_named (wimax_enable, modparam_wimax_enable, bool,0644 );MODULE_PARM_DESC (wimax_enable,"Enable wimax core (default 1 [wimax enabled])" );
drivers/net/wireless/mwl8k.c +1 -1
@@ -31,7 +31,7 @@#define MWL8K_VERSION "0.12"/* Module parameters */ -static unsigned ap_mode_default; +static bool ap_mode_default;module_param (ap_mode_default, bool,0 );MODULE_PARM_DESC (ap_mode_default,"Set to 1 to make ap mode the default instead of sta mode" );
drivers/net/wireless/orinoco/main.c +1 -1
@@ -121,7 +121,7 @@ module_param(orinoco_debug, int, 0644);MODULE_PARM_DESC (orinoco_debug,"Debug level" );#endif -static int suppress_linkstatus;/* = 0 */ +static bool suppress_linkstatus;/* = 0 */ module_param (suppress_linkstatus, bool,0644 );MODULE_PARM_DESC (suppress_linkstatus,"Don't log link status changes" );
drivers/net/wireless/p54/main.c +1 -1
@@ -27,7 +27,7 @@#include "p54.h" #include "lmac.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );MODULE_AUTHOR ("Michael Wu <[email protected]>" );
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
@@ -39,7 +39,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800pci.c +1 -1
@@ -50,7 +50,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt =0 ;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800usb.c +1 -1
@@ -45,7 +45,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt61pci.c +1 -1
@@ -41,7 +41,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt =0 ;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt73usb.c +1 -1
@@ -40,7 +40,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rtlwifi/wifi.h +1 -1
@@ -1485,7 +1485,7 @@ struct rtl_intf_ops {struct rtl_mod_params {/* default: 0 = using hardware encryption */ -int sw_crypto; +bool sw_crypto;/* default: 0 = DBG_EMERG (0)*/ int debug;
include/net/bluetooth/l2cap.h +1 -1
@@ -492,7 +492,7 @@ static inline int l2cap_tx_window_full(s#define __is_sframe (ctrl) ((ctrl) & L2CAP_CTRL_FRAME_TYPE)#define __is_sar_start (ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START) -extern int disable_ertm; +extern bool disable_ertm;int l2cap_init_sockets (void );void l2cap_cleanup_sockets (void );
include/net/sctp/structs.h +1 -1
@@ -235,7 +235,7 @@ extern struct sctp_globals {/* Flag to indicate whether computing and verifying checksum * is disabled. */ -int checksum_disable; +bool checksum_disable;/* Threshold for rwnd update SACKS. Receive buffer shifted this many * bits is an indicator of when to send and window update SACK.
net/bluetooth/bnep/core.c +2 -2
@@ -56,8 +56,8 @@#define VERSION "1.3" -static int compress_src =1 ; -static int compress_dst =1 ; +static bool compress_src =1 ; +static bool compress_dst =1 ;static LIST_HEAD (bnep_session_list);static DECLARE_RWSEM (bnep_session_sem);
net/bluetooth/hci_event.c +1 -1
@@ -45,7 +45,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_le; +static bool enable_le;/* Handle HCI Event packets */
net/bluetooth/hci_sock.c +1 -1
@@ -49,7 +49,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_mgmt; +static bool enable_mgmt;/* ----- HCI socket interface ----- */
net/bluetooth/l2cap_core.c +1 -1
@@ -56,7 +56,7 @@#include <net/bluetooth/l2cap.h> #include <net/bluetooth/smp.h> -int disable_ertm; +bool disable_ertm;static u32 l2cap_feat_mask =L2CAP_FEAT_FIXED_CHAN ;static u8 l2cap_fixed_chan[8 ] = {0x02 , };
net/bluetooth/rfcomm/core.c +2 -2
@@ -51,8 +51,8 @@#define VERSION "1.11" -static int disable_cfc; -static int l2cap_ertm; +static bool disable_cfc; +static bool l2cap_ertm;static int channel_mtu =-1 ;static unsigned int l2cap_mtu =RFCOMM_MAX_L2CAP_MTU ;
net/bluetooth/sco.c +1 -1
@@ -51,7 +51,7 @@#include <net/bluetooth/hci_core.h> #include <net/bluetooth/sco.h> -static int disable_esco; +static bool disable_esco;static const struct proto_ops sco_sock_ops;
net/dccp/ccids/ccid2.c +2 -2
@@ -29,7 +29,7 @@#ifdef CONFIG_IP_DCCP_CCID2_DEBUG -static int ccid2_debug; +static bool ccid2_debug; #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a)#else #define ccid2_pr_debug(format, a...)
@@ -174,7 +174,7 @@ out:/* * Congestion window validation (RFC 2861). */ -static int ccid2_do_cwv =1 ; +static bool ccid2_do_cwv =1 ;module_param (ccid2_do_cwv, bool,0644 );MODULE_PARM_DESC (ccid2_do_cwv,"Perform RFC2861 Congestion Window Validation" );
net/dccp/ccids/ccid3.c +1 -1
@@ -38,7 +38,7 @@#include <asm/unaligned.h> #ifdef CONFIG_IP_DCCP_CCID3_DEBUG -static int ccid3_debug; +static bool ccid3_debug; #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)#else #define ccid3_pr_debug(format, a...)
net/dccp/ccids/lib/tfrc.c +1 -1
@@ -8,7 +8,7 @@#include "tfrc.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -int tfrc_debug; +bool tfrc_debug;module_param (tfrc_debug, bool,0644 );MODULE_PARM_DESC (tfrc_debug,"Enable TFRC debug messages" );#endif
net/dccp/ccids/lib/tfrc.h +1 -1
@@ -21,7 +21,7 @@#include "packet_history.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -extern int tfrc_debug; +extern bool tfrc_debug; #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a)#else #define tfrc_pr_debug(format, a...)
net/dccp/dccp.h +1 -1
@@ -39,7 +39,7 @@ "%s: " fmt, __func__, ##a)#ifdef CONFIG_IP_DCCP_DEBUG -extern int dccp_debug; +extern bool dccp_debug; #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
net/dccp/proto.c +1 -1
@@ -1099,7 +1099,7 @@ module_param(thash_entries, int, 0444);MODULE_PARM_DESC (thash_entries,"Number of ehash buckets" );#ifdef CONFIG_IP_DCCP_DEBUG -int dccp_debug; +bool dccp_debug;module_param (dccp_debug, bool,0644 );MODULE_PARM_DESC (dccp_debug,"Enable debug messages" );
net/ipv4/netfilter/ipt_ULOG.c +1 -1
@@ -65,7 +65,7 @@ static unsigned int flushtimeout = 10;module_param (flushtimeout, uint,0600 );MODULE_PARM_DESC (flushtimeout,"buffer flush timeout (hundredths of a second)" ); -static int nflog =1 ; +static bool nflog =1 ;module_param (nflog, bool,0400 );MODULE_PARM_DESC (nflog,"register as internal netfilter logging module" );
net/ipv4/netfilter/iptable_filter.c +1 -1
@@ -52,7 +52,7 @@ iptable_filter_hook(unsigned int hook, sstatic struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init iptable_filter_net_init (struct net *net)
net/ipv6/netfilter/ip6table_filter.c +1 -1
@@ -44,7 +44,7 @@ ip6table_filter_hook(unsigned int hook,static struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init ip6table_filter_net_init (struct net *net)
net/irda/irlan/irlan_common.c +1 -1
@@ -67,7 +67,7 @@ static void *ckey;static void *skey;/* Module parameters */ -static int eth;/* Use "eth" or "irlan" name for devices */ +static bool eth;/* Use "eth" or "irlan" name for devices */ static int access =ACCESS_PEER ;/* PEER, DIRECT or HOSTED */ #ifdef CONFIG_PROC_FS
net/netfilter/nf_conntrack_acct.c +1 -1
@@ -18,7 +18,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_acct.h> -static int nf_ct_acct__read_mostly ; +static bool nf_ct_acct__read_mostly ;module_param_named (acct, nf_ct_acct, bool,0644 );MODULE_PARM_DESC (acct,"Enable connection tracking flow accounting." );
net/netfilter/nf_conntrack_ftp.c +1 -1
@@ -42,7 +42,7 @@ static u_int16_t ports[MAX_PORTS];static unsigned int ports_c;module_param_array (ports, ushort, &ports_c,0400 ); -static int loose; +static bool loose;module_param (loose, bool,0600 ); unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
net/netfilter/nf_conntrack_h323_main.c +1 -1
@@ -42,7 +42,7 @@ static int gkrouted_only __read_mostly =module_param (gkrouted_only, int,0600 );MODULE_PARM_DESC (gkrouted_only,"only accept calls from gatekeeper" ); -static int callforward_filter__read_mostly =1 ; +static bool callforward_filter__read_mostly =1 ;module_param (callforward_filter, bool,0600 );MODULE_PARM_DESC (callforward_filter,"only create call forwarding expectations " "if both endpoints are on different sides "
net/netfilter/nf_conntrack_timestamp.c +1 -1
@@ -15,7 +15,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_timestamp.h> -static int nf_ct_tstamp__read_mostly ; +static bool nf_ct_tstamp__read_mostly ;module_param_named (tstamp, nf_ct_tstamp, bool,0644 );MODULE_PARM_DESC (tstamp,"Enable connection tracking flow timestamping." );
Quoted 3 lines · Rusty Russell
module_param(bool)used to counter-intuitively take an int. Infddd5201(mid-2009) we allowed bool or int/unsigned int using a messy trick.
[]
drivers/net/caif/caif_serial.c
Quoted 1 line
drivers/net/caif/caif_serial.c +0
-0
[]
drivers/net/caif/caif_serial.c MODULE_ALIAS_LDISC(N_CAIF);
Quoted 1 line
drivers/net/caif/caif_serial.c +0
-0@@ -38,15 +38,15 @@ MODULE_ALIAS_LDISC(N_CAIF);
[]
drivers/net/caif/caif_serial.c MODULE_ALIAS_LDISC(N_CAIF); · line 45
Quoted 2 lines
drivers/net/caif/caif_serial.c +1
-1-static int ser_use_stx =1 ; +static bool ser_use_stx =1 ;
Could you respin these please using bool foo = true/false instead?
Quoted 5 lines · Joe Perches
Quoted 3 lines · Rusty Russell
module_param(bool)used to counter-intuitively take an int. Infddd5201(mid-2009) we allowed bool or int/unsigned int using a messy trick.[]
Quoted 8 lines
drivers/net/caif/caif_serial.c
Quoted 1 line
drivers/net/caif/caif_serial.c +0
-0[]
drivers/net/caif/caif_serial.c MODULE_ALIAS_LDISC(N_CAIF);
Quoted 1 line
drivers/net/caif/caif_serial.c +0
-0@@ -38,15 +38,15 @@ MODULE_ALIAS_LDISC(N_CAIF);[]
drivers/net/caif/caif_serial.c MODULE_ALIAS_LDISC(N_CAIF); · line 45
Quoted 2 lines
drivers/net/caif/caif_serial.c +1
-1-static int ser_use_stx =1 ; +static bool ser_use_stx =1 ;Could you respin these please using bool foo = true/false instead?
I could, but as I was touching 457 files, so I was aiming for minimal changes.
Dave, did you want a true/false cleanup too?
Thanks,
Rusty.
Quoted 4 lines · Rusty Russell
I could, but as I was touching 457 files, so I was aiming for minimal changes.
Dave, did you want a true/false cleanup too?
Hi Rusty.
Did you perform these transforms via spatch? If not, here's a trivial spatch script for those files.
$ cat bool.cocci @@ bool b @@ -b = 0 +b = false @@ bool b @@ -b = 1 +b = true
Quoted 20 lines · Joe Perches
Quoted 4 lines · Rusty Russell
I could, but as I was touching 457 files, so I was aiming for minimal changes.
Dave, did you want a true/false cleanup too?
Hi Rusty.
Did you perform these transforms via spatch? If not, here's a trivial spatch script for those files.
$ cat bool.cocci @@ bool b @@(quoted diff) +1
-1-b = 0 +b = false@@
bool b
@@
Review
Quoted 2 lines
(quoted diff) +1
-1-b = 1 +b = true
Nice!
You missed a semicolon on each 'bool b;' line, then it worked.
Dave, here's the fixes from drivers/net and net/ *before* my patches come into play:
From: Rusty Russell <[email protected]>
Subject: net: fix assignment of 0/1 to bool variables.
DaveM said:
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
Joe Perches <[email protected]> gave me the spatch script:
@@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true
I merely installed coccinelle, read the documentation and took credit.
--- drivers/net/ethernet/broadcom/tg3.c | 8 - drivers/net/ethernet/brocade/bna/bnad.c | 6 - drivers/net/ethernet/dec/tulip/de4x5.c | 4 drivers/net/ethernet/intel/e1000/e1000_main.c | 10 - drivers/net/ethernet/intel/e1000e/netdev.c | 24 ++-- drivers/net/ethernet/intel/ixgb/ixgb_main.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 12 +- drivers/net/ethernet/sfc/falcon.c | 2 drivers/net/ethernet/sfc/mtd.c | 6 - drivers/net/ethernet/sfc/siena.c | 2 drivers/net/ethernet/tile/tilepro.c | 4 drivers/net/ethernet/xilinx/xilinx_emaclite.c | 6 - drivers/net/wimax/i2400m/tx.c | 8 - drivers/net/wireless/ath/ath5k/reset.c | 4 drivers/net/wireless/ath/ath6kl/init.c | 2 drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 drivers/net/wireless/ath/ath9k/xmit.c | 4 drivers/net/wireless/b43/dma.c | 14 +- drivers/net/wireless/b43/leds.c | 16 +- drivers/net/wireless/b43/lo.c | 8 - drivers/net/wireless/b43/main.c | 100 +++++++++--------- drivers/net/wireless/b43/phy_common.c | 8 - drivers/net/wireless/b43/phy_g.c | 34 +++--- drivers/net/wireless/b43/phy_lp.c | 8 - drivers/net/wireless/b43/phy_n.c | 4 drivers/net/wireless/b43/pio.c | 6 - drivers/net/wireless/b43/xmit.c | 4 drivers/net/wireless/b43legacy/dma.c | 16 +- drivers/net/wireless/b43legacy/leds.c | 4 drivers/net/wireless/b43legacy/main.c | 64 +++++------ drivers/net/wireless/b43legacy/radio.c | 20 +-- drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 4 drivers/net/wireless/brcm80211/brcmsmac/dma.c | 4 drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 2 drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 32 ++--- drivers/net/wireless/iwlwifi/iwl-agn.c | 2 drivers/net/wireless/iwmc3200wifi/main.c | 2 drivers/net/wireless/iwmc3200wifi/rx.c | 12 +- drivers/net/wireless/libertas/if_cs.c | 4 drivers/net/wireless/libertas_tf/main.c | 4 drivers/net/wireless/mac80211_hwsim.c | 4 drivers/net/wireless/mwifiex/cfg80211.c | 6 - drivers/net/wireless/mwl8k.c | 8 - drivers/net/wireless/rtlwifi/base.c | 2 drivers/net/wireless/rtlwifi/pci.c | 6 - drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 4 drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 2 drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 4 drivers/net/wireless/rtlwifi/rtl8192de/sw.c | 4 drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 4 drivers/net/wireless/wl12xx/sdio_test.c | 12 +- net/dccp/feat.c | 16 +- net/dccp/options.c | 2 net/ipv4/tcp_timer.c | 4 net/mac80211/rc80211_pid_algo.c | 4 net/mac80211/scan.c | 2 net/netfilter/ipvs/ip_vs_pe_sip.c | 4 net/rfkill/rfkill-regulator.c | 6 - net/rxrpc/ar-ack.c | 14 +- net/rxrpc/ar-output.c | 4 62 files changed, 297 insertions(+), 297 deletions(-)
drivers/net/ethernet/brocade/bna/bnad.c 2011-12-19 13:20:51.852430982 +1030 renamed from drivers/net/ethernet/brocade/bna/bnad.c 2011-11-07 15:50:48.000000000 +1030 +3 -3
@@ -723,7 +723,7 @@ void bnad_cb_ethport_link_status(struct bnad *bnad, enum bna_link_status link_status) { - bool link_up = 0; + bool link_up = false; link_up = (link_status == BNA_LINK_UP) || (link_status == BNA_CEE_UP);
@@ -3186,7 +3186,7 @@ bnad_pci_init(struct bnad *bnad, goto disable_device; if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) && !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { - *using_dac = 1; + *using_dac = true; } else { err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); if (err) {
@@ -3195,7 +3195,7 @@ bnad_pci_init(struct bnad *bnad, if (err) goto release_regions; } - *using_dac = 0; + *using_dac = false; } pci_set_master(pdev); return 0;
drivers/net/ethernet/broadcom/tg3.c 2011-12-19 13:21:27.712431901 +1030 renamed from drivers/net/ethernet/broadcom/tg3.c 2011-11-08 09:11:59.000000000 +1030 +4 -4
@@ -6443,13 +6443,13 @@ static bool tg3_tx_frag_set(struct tg3_n bool hwbug = false; if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8) - hwbug = 1; + hwbug = true; if (tg3_4g_overflow_test(map, len)) - hwbug = 1; + hwbug = true; if (tg3_40bit_overflow_test(tp, map, len)) - hwbug = 1; + hwbug = true; if (tg3_flag(tp, 4K_FIFO_LIMIT)) { u32 prvidx = *entry;
@@ -6482,7 +6482,7 @@ static bool tg3_tx_frag_set(struct tg3_n *budget -= 1; *entry = NEXT_TX(*entry); } else { - hwbug = 1; + hwbug = true; tnapi->tx_buffers[prvidx].fragmented = false; } }
drivers/net/ethernet/xilinx/xilinx_emaclite.c 2011-12-19 13:21:34.488432075 +1030 renamed from drivers/net/ethernet/xilinx/xilinx_emaclite.c 2011-10-27 10:37:52.000000000 +1030 +3 -3
@@ -662,7 +662,7 @@ static void xemaclite_rx_handler(struct */ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id) { - bool tx_complete = 0; + bool tx_complete = false; struct net_device *dev = dev_id; struct net_local *lp = netdev_priv(dev); void __iomem *base_addr = lp->base_addr;
@@ -683,7 +683,7 @@ static irqreturn_t xemaclite_interrupt(i tx_status &= ~XEL_TSR_XMIT_ACTIVE_MASK; out_be32(base_addr + XEL_TSR_OFFSET, tx_status); - tx_complete = 1; + tx_complete = true; } /* Check if the Transmission for the second buffer is completed */
@@ -695,7 +695,7 @@ static irqreturn_t xemaclite_interrupt(i out_be32(base_addr + XEL_BUFFER_OFFSET + XEL_TSR_OFFSET, tx_status); - tx_complete = 1; + tx_complete = true; } /* If there was a Tx interrupt, call the Tx Handler */
drivers/net/ethernet/tile/tilepro.c 2011-12-19 13:21:38.836432185 +1030 renamed from drivers/net/ethernet/tile/tilepro.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -1256,7 +1256,7 @@ static void tile_net_stop_aux(struct net sizeof(dummy), NETIO_IPP_STOP_SHIM_OFF) < 0) panic("Failed to stop LIPP/LEPP!\n"); - priv->partly_opened = 0; + priv->partly_opened = false; }
@@ -1507,7 +1507,7 @@ static int tile_net_open(struct net_devi priv->network_cpus_count, priv->network_cpus_credits); #endif - priv->partly_opened = 1; + priv->partly_opened = true; } else { /* FIXME: Is this possible? */
drivers/net/ethernet/dec/tulip/de4x5.c 2011-12-19 13:21:44.996432344 +1030 renamed from drivers/net/ethernet/dec/tulip/de4x5.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -5196,7 +5196,7 @@ de4x5_parse_params(struct net_device *de struct de4x5_private *lp = netdev_priv(dev); char *p, *q, t; - lp->params.fdx = 0; + lp->params.fdx = false; lp->params.autosense = AUTO; if (args == NULL) return;
@@ -5206,7 +5206,7 @@ de4x5_parse_params(struct net_device *de t = *q; *q = '\0'; - if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = 1; + if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = true; if (strstr(p, "autosense") || strstr(p, "AUTOSENSE")) { if (strstr(p, "TP")) {
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2011-12-19 13:21:49.912432469 +1030 renamed from drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2011-11-07 15:50:48.000000000 +1030 +1 -1
@@ -4019,7 +4019,7 @@ void ixgbe_down(struct ixgbe_adapter *ad /* Mark all the VFs as inactive */ for (i = 0 ; i < adapter->num_vfs; i++) - adapter->vfinfo[i].clear_to_send = 0; + adapter->vfinfo[i].clear_to_send = false; /* ping all the active vfs to let them know we are going down */ ixgbe_ping_all_vfs(adapter);
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c 2011-12-19 13:21:51.424432508 +1030 renamed from drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c 2011-10-27 10:37:52.000000000 +1030 +6 -6
@@ -1214,7 +1214,7 @@ s32 ixgbe_read_i2c_byte_generic(struct i u32 max_retry = 10; u32 retry = 0; u16 swfw_mask = 0; - bool nack = 1; + bool nack = true; *data = 0; if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
@@ -1421,7 +1421,7 @@ static void ixgbe_i2c_stop(struct ixgbe_ static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) { s32 i; - bool bit = 0; + bool bit = false; for (i = 7; i >= 0; i--) { ixgbe_clock_in_i2c_bit(hw, &bit);
@@ -1443,7 +1443,7 @@ static s32 ixgbe_clock_out_i2c_byte(stru s32 status = 0; s32 i; u32 i2cctl; - bool bit = 0; + bool bit = false; for (i = 7; i >= 0; i--) { bit = (data >> i) & 0x1;
@@ -1473,7 +1473,7 @@ static s32 ixgbe_get_i2c_ack(struct ixgb u32 i = 0; u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL); u32 timeout = 10; - bool ack = 1; + bool ack = true; ixgbe_raise_i2c_clk(hw, &i2cctl);
@@ -1646,9 +1646,9 @@ static bool ixgbe_get_i2c_data(u32 *i2cc bool data; if (*i2cctl & IXGBE_I2C_DATA_IN) - data = 1; + data = true; else - data = 0; + data = false; return data; }
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c 2011-12-19 13:21:51.876432519 +1030 renamed from drivers/net/ethernet/intel/ixgbe/ixgbe_common.c 2011-11-07 15:50:48.000000000 +1030 +1 -1
@@ -2599,7 +2599,7 @@ s32 ixgbe_enable_rx_dma_generic(struct i s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index) { ixgbe_link_speed speed = 0; - bool link_up = 0; + bool link_up = false; u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC); u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);
drivers/net/ethernet/intel/e1000e/netdev.c 2011-12-19 13:21:53.888432571 +1030 renamed from drivers/net/ethernet/intel/e1000e/netdev.c 2011-10-27 10:37:52.000000000 +1030 +12 -12
@@ -875,7 +875,7 @@ static bool e1000_clean_rx_irq(struct e1 u32 length, staterr; unsigned int i; int cleaned_count = 0; - bool cleaned = 0; + bool cleaned = false; unsigned int total_rx_bytes = 0, total_rx_packets = 0; i = rx_ring->next_to_clean;
@@ -904,7 +904,7 @@ static bool e1000_clean_rx_irq(struct e1 next_buffer = &rx_ring->buffer_info[i]; - cleaned = 1; + cleaned = true; cleaned_count++; dma_unmap_single(&pdev->dev, buffer_info->dma,
@@ -1150,7 +1150,7 @@ static bool e1000_clean_tx_irq(struct e1 * Detect a transmit hang in hardware, this serializes the * check with the clearing of time_stamp and movement of i */ - adapter->detect_tx_hung = 0; + adapter->detect_tx_hung = false; if (tx_ring->buffer_info[i].time_stamp && time_after(jiffies, tx_ring->buffer_info[i].time_stamp + (adapter->tx_timeout_factor * HZ)) &&
@@ -1185,7 +1185,7 @@ static bool e1000_clean_rx_irq_ps(struct unsigned int i, j; u32 length, staterr; int cleaned_count = 0; - bool cleaned = 0; + bool cleaned = false; unsigned int total_rx_bytes = 0, total_rx_packets = 0; i = rx_ring->next_to_clean;
@@ -1211,7 +1211,7 @@ static bool e1000_clean_rx_irq_ps(struct next_buffer = &rx_ring->buffer_info[i]; - cleaned = 1; + cleaned = true; cleaned_count++; dma_unmap_single(&pdev->dev, buffer_info->dma, adapter->rx_ps_bsize0, DMA_FROM_DEVICE);
@@ -4183,7 +4183,7 @@ static void e1000_print_link_info(struct static bool e1000e_has_link(struct e1000_adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - bool link_active = 0; + bool link_active = false; s32 ret_val = 0; /*
@@ -4198,7 +4198,7 @@ static bool e1000e_has_link(struct e1000 ret_val = hw->mac.ops.check_for_link(hw); link_active = !hw->mac.get_link_status; } else { - link_active = 1; + link_active = true; } break; case e1000_media_type_fiber:
@@ -4297,7 +4297,7 @@ static void e1000_watchdog_task(struct w if (link) { if (!netif_carrier_ok(netdev)) { - bool txb2b = 1; + bool txb2b = true; /* Cancel scheduled suspend requests. */ pm_runtime_resume(netdev->dev.parent);
@@ -4333,11 +4333,11 @@ static void e1000_watchdog_task(struct w adapter->tx_timeout_factor = 1; switch (adapter->link_speed) { case SPEED_10: - txb2b = 0; + txb2b = false; adapter->tx_timeout_factor = 16; break; case SPEED_100: - txb2b = 0; + txb2b = false; adapter->tx_timeout_factor = 10; break; }
@@ -4473,7 +4473,7 @@ link_up: e1000e_flush_descriptors(adapter); /* Force detection of hung controller every watchdog period */ - adapter->detect_tx_hung = 1; + adapter->detect_tx_hung = true; /* * With 82571 controllers, LAA may be overwritten due to controller
@@ -6135,7 +6135,7 @@ static int __devinit e1000_probe(struct /* Initialize link parameters. User can change them with ethtool */ adapter->hw.mac.autoneg = 1; - adapter->fc_autoneg = 1; + adapter->fc_autoneg = true; adapter->hw.fc.requested_mode = e1000_fc_default; adapter->hw.fc.current_mode = e1000_fc_default; adapter->hw.phy.autoneg_advertised = 0x2f;
drivers/net/ethernet/intel/ixgb/ixgb_main.c 2011-12-19 13:21:55.904432623 +1030 renamed from drivers/net/ethernet/intel/ixgb/ixgb_main.c 2011-10-27 10:37:52.000000000 +1030 +1 -1
@@ -228,7 +228,7 @@ ixgb_up(struct ixgb_adapter *adapter) if (IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_PCIX_MODE) { err = pci_enable_msi(adapter->pdev); if (!err) { - adapter->have_msi = 1; + adapter->have_msi = true; irq_flags = 0; } /* proceed to try to request regular interrupt */
drivers/net/ethernet/intel/e1000/e1000_main.c 2011-12-19 13:21:57.640432667 +1030 renamed from drivers/net/ethernet/intel/e1000/e1000_main.c 2011-10-27 10:37:52.000000000 +1030 +5 -5
@@ -1182,7 +1182,7 @@ static int __devinit e1000_probe(struct if (global_quad_port_a != 0) adapter->eeprom_wol = 0; else - adapter->quad_port_a = 1; + adapter->quad_port_a = true; /* Reset for multiple quad port adapters */ if (++global_quad_port_a == 4) global_quad_port_a = 0;
@@ -1676,7 +1676,7 @@ static void e1000_configure_tx(struct e1 * need this to apply a workaround later in the send path. */ if (hw->mac_type == e1000_82544 && hw->bus_type == e1000_bus_type_pcix) - adapter->pcix_82544 = 1; + adapter->pcix_82544 = true; ew32(TCTL, tctl);
@@ -1999,7 +1999,7 @@ static void e1000_clean_tx_ring(struct e tx_ring->next_to_use = 0; tx_ring->next_to_clean = 0; - tx_ring->last_tx_tso = 0; + tx_ring->last_tx_tso = false; writel(0, hw->hw_addr + tx_ring->tdh); writel(0, hw->hw_addr + tx_ring->tdt);
@@ -2848,7 +2848,7 @@ static int e1000_tx_map(struct e1000_ada * DMA'd to the controller */ if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb)) { - tx_ring->last_tx_tso = 0; + tx_ring->last_tx_tso = false; size -= 4; }
@@ -3216,7 +3216,7 @@ static netdev_tx_t e1000_xmit_frame(stru if (likely(tso)) { if (likely(hw->mac_type != e1000_82544)) - tx_ring->last_tx_tso = 1; + tx_ring->last_tx_tso = true; tx_flags |= E1000_TX_FLAGS_TSO; } else if (likely(e1000_tx_csum(adapter, tx_ring, skb))) tx_flags |= E1000_TX_FLAGS_CSUM;
drivers/net/ethernet/sfc/siena.c 2011-12-19 13:22:00.428432738 +1030 renamed from drivers/net/ethernet/sfc/siena.c 2011-10-27 10:37:52.000000000 +1030 +1 -1
@@ -232,7 +232,7 @@ static int siena_probe_nvconfig(struct e static int siena_probe_nic(struct efx_nic *efx) { struct siena_nic_data *nic_data; - bool already_attached = 0; + bool already_attached = false; efx_oword_t reg; int rc;
drivers/net/ethernet/sfc/falcon.c 2011-12-19 13:22:01.600432768 +1030 renamed from drivers/net/ethernet/sfc/falcon.c 2011-10-31 13:28:01.000000000 +1030 +1 -1
@@ -610,7 +610,7 @@ static void falcon_stats_complete(struct if (!nic_data->stats_pending) return; - nic_data->stats_pending = 0; + nic_data->stats_pending = false; if (*nic_data->stats_dma_done == FALCON_STATS_DONE) { rmb(); /* read the done flag before the stats */ efx->mac_op->update_stats(efx);
drivers/net/ethernet/sfc/mtd.c 2011-12-19 13:22:02.460432790 +1030 renamed from drivers/net/ethernet/sfc/mtd.c 2011-10-27 10:37:52.000000000 +1030 +3 -3
@@ -496,7 +496,7 @@ static int siena_mtd_erase(struct mtd_in rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type); if (rc) goto out; - part->mcdi.updating = 1; + part->mcdi.updating = true; } /* The MCDI interface can in fact do multiple erase blocks at once;
@@ -528,7 +528,7 @@ static int siena_mtd_write(struct mtd_in rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type); if (rc) goto out; - part->mcdi.updating = 1; + part->mcdi.updating = true; } while (offset < end) {
@@ -553,7 +553,7 @@ static int siena_mtd_sync(struct mtd_inf int rc = 0; if (part->mcdi.updating) { - part->mcdi.updating = 0; + part->mcdi.updating = false; rc = efx_mcdi_nvram_update_finish(efx, part->mcdi.nvram_type); }
drivers/net/wimax/i2400m/tx.c 2011-12-19 13:22:07.120432910 +1030 renamed from drivers/net/wimax/i2400m/tx.c 2011-11-07 15:50:48.000000000 +1030 +4 -4
@@ -562,7 +562,7 @@ void i2400m_tx_new(struct i2400m *i2400m { struct device *dev = i2400m_dev(i2400m); struct i2400m_msg_hdr *tx_msg; - bool try_head = 0; + bool try_head = false; BUG_ON(i2400m->tx_msg != NULL); /* * In certain situations, TX queue might have enough space to
@@ -580,7 +580,7 @@ try_head: else if (tx_msg == TAIL_FULL) { i2400m_tx_skip_tail(i2400m); d_printf(2, dev, "new TX message: tail full, trying head\n"); - try_head = 1; + try_head = true; goto try_head; } memset(tx_msg, 0, I2400M_TX_PLD_SIZE);
@@ -720,7 +720,7 @@ int i2400m_tx(struct i2400m *i2400m, con unsigned long flags; size_t padded_len; void *ptr; - bool try_head = 0; + bool try_head = false; unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM || pl_type == I2400M_PT_RESET_COLD;
@@ -771,7 +771,7 @@ try_new: d_printf(2, dev, "pl append: tail full\n"); i2400m_tx_close(i2400m); i2400m_tx_skip_tail(i2400m); - try_head = 1; + try_head = true; goto try_new; } else if (ptr == NULL) { /* All full */ result = -ENOSPC;
drivers/net/wireless/libertas_tf/main.c 2011-12-19 13:22:13.096433063 +1030 renamed from drivers/net/wireless/libertas_tf/main.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -719,11 +719,11 @@ void lbtf_bcn_sent(struct lbtf_private * return; if (skb_queue_empty(&priv->bc_ps_buf)) { - bool tx_buff_bc = 0; + bool tx_buff_bc = false; while ((skb = ieee80211_get_buffered_bc(priv->hw, priv->vif))) { skb_queue_tail(&priv->bc_ps_buf, skb); - tx_buff_bc = 1; + tx_buff_bc = true; } if (tx_buff_bc) { ieee80211_stop_queues(priv->hw);
drivers/net/wireless/mwifiex/cfg80211.c 2011-12-19 13:22:19.348433223 +1030 renamed from drivers/net/wireless/mwifiex/cfg80211.c 2011-10-27 10:37:52.000000000 +1030 +3 -3
@@ -753,7 +753,7 @@ mwifiex_cfg80211_disconnect(struct wiphy if (priv->disconnect) return -EBUSY; - priv->disconnect = 1; + priv->disconnect = true; if (mwifiex_deauthenticate(priv, NULL)) return -EFAULT;
@@ -1054,7 +1054,7 @@ mwifiex_cfg80211_leave_ibss(struct wiphy if (priv->disconnect) return -EBUSY; - priv->disconnect = 1; + priv->disconnect = true; wiphy_dbg(wiphy, "info: disconnecting from essid %pM\n", priv->cfg_bssid);
@@ -1498,6 +1498,6 @@ mwifiex_cfg80211_results(struct work_str if (priv->disconnect) { memset(priv->cfg_bssid, 0, ETH_ALEN); - priv->disconnect = 0; + priv->disconnect = false; } }
drivers/net/wireless/b43legacy/dma.c 2011-12-19 13:22:20.264433247 +1030 renamed from drivers/net/wireless/b43legacy/dma.c 2011-10-27 10:37:52.000000000 +1030 +8 -8
@@ -715,7 +715,7 @@ struct b43legacy_dmaring *b43legacy_setu ring->mmio_base = b43legacy_dmacontroller_base(type, controller_index); ring->index = controller_index; if (for_tx) { - ring->tx = 1; + ring->tx = true; ring->current_slot = -1; } else { if (ring->index == 0) {
@@ -806,7 +806,7 @@ void b43legacy_dma_free(struct b43legacy static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask) { u64 orig_mask = mask; - bool fallback = 0; + bool fallback = false; int err; /* Try to set the DMA mask. If it fails, try falling back to a
@@ -820,12 +820,12 @@ static int b43legacy_dma_set_mask(struct } if (mask == DMA_BIT_MASK(64)) { mask = DMA_BIT_MASK(32); - fallback = 1; + fallback = true; continue; } if (mask == DMA_BIT_MASK(32)) { mask = DMA_BIT_MASK(30); - fallback = 1; + fallback = true; continue; } b43legacyerr(dev->wl, "The machine/kernel does not support "
@@ -858,7 +858,7 @@ int b43legacy_dma_init(struct b43legacy_ #ifdef CONFIG_B43LEGACY_PIO b43legacywarn(dev->wl, "DMA for this device not supported. " "Falling back to PIO\n"); - dev->__using_pio = 1; + dev->__using_pio = true; return -EAGAIN; #else b43legacyerr(dev->wl, "DMA for this device not supported and "
@@ -1068,7 +1068,7 @@ static int dma_tx_fragment(struct b43leg memset(meta, 0, sizeof(*meta)); meta->skb = skb; - meta->is_last_fragment = 1; + meta->is_last_fragment = true; meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); /* create a bounce buffer in zone_dma on mapping failure. */
@@ -1187,7 +1187,7 @@ int b43legacy_dma_tx(struct b43legacy_wl should_inject_overflow(ring)) { /* This TX ring is full. */ ieee80211_stop_queue(dev->wl->hw, txring_to_priority(ring)); - ring->stopped = 1; + ring->stopped = true; if (b43legacy_debug(dev, B43legacy_DBG_DMAVERBOSE)) b43legacydbg(dev->wl, "Stopped TX ring %d\n", ring->index);
@@ -1286,7 +1286,7 @@ void b43legacy_dma_handle_txstatus(struc if (ring->stopped) { B43legacy_WARN_ON(free_slots(ring) < SLOTS_PER_PACKET); ieee80211_wake_queue(dev->wl->hw, txring_to_priority(ring)); - ring->stopped = 0; + ring->stopped = false; if (b43legacy_debug(dev, B43legacy_DBG_DMAVERBOSE)) b43legacydbg(dev->wl, "Woke up TX ring %d\n", ring->index);
drivers/net/wireless/b43legacy/radio.c 2011-12-19 13:22:20.964433265 +1030 renamed from drivers/net/wireless/b43legacy/radio.c 2011-07-26 13:50:42.000000000 +0930 +10 -10
@@ -1067,7 +1067,7 @@ b43legacy_radio_interference_mitigation_ if (b43legacy_phy_read(dev, 0x0033) & 0x0800) break; - phy->aci_enable = 1; + phy->aci_enable = true; phy_stacksave(B43legacy_PHY_RADIO_BITFIELD); phy_stacksave(B43legacy_PHY_G_CRS);
@@ -1279,7 +1279,7 @@ b43legacy_radio_interference_mitigation_ if (!(b43legacy_phy_read(dev, 0x0033) & 0x0800)) break; - phy->aci_enable = 0; + phy->aci_enable = false; phy_stackrestore(B43legacy_PHY_RADIO_BITFIELD); phy_stackrestore(B43legacy_PHY_G_CRS);
@@ -1346,10 +1346,10 @@ int b43legacy_radio_set_interference_mit (phy->rev == 0) || (!phy->gmode)) return -ENODEV; - phy->aci_wlan_automatic = 0; + phy->aci_wlan_automatic = false; switch (mode) { case B43legacy_RADIO_INTERFMODE_AUTOWLAN: - phy->aci_wlan_automatic = 1; + phy->aci_wlan_automatic = true; if (phy->aci_enable) mode = B43legacy_RADIO_INTERFMODE_MANUALWLAN; else
@@ -1371,8 +1371,8 @@ int b43legacy_radio_set_interference_mit currentmode); if (mode == B43legacy_RADIO_INTERFMODE_NONE) { - phy->aci_enable = 0; - phy->aci_hw_rssi = 0; + phy->aci_enable = false; + phy->aci_hw_rssi = false; } else b43legacy_radio_interference_mitigation_enable(dev, mode); phy->interfmode = mode;
@@ -2102,7 +2102,7 @@ void b43legacy_radio_turn_on(struct b43l phy->radio_off_context.rfover); b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, phy->radio_off_context.rfoverval); - phy->radio_off_context.valid = 0; + phy->radio_off_context.valid = false; } channel = phy->channel; err = b43legacy_radio_selectchannel(dev,
@@ -2113,7 +2113,7 @@ void b43legacy_radio_turn_on(struct b43l default: B43legacy_BUG_ON(1); } - phy->radio_on = 1; + phy->radio_on = true; } void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force)
@@ -2131,14 +2131,14 @@ void b43legacy_radio_turn_off(struct b43 if (!force) { phy->radio_off_context.rfover = rfover; phy->radio_off_context.rfoverval = rfoverval; - phy->radio_off_context.valid = 1; + phy->radio_off_context.valid = true; } b43legacy_phy_write(dev, B43legacy_PHY_RFOVER, rfover | 0x008C); b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, rfoverval & 0xFF73); } else b43legacy_phy_write(dev, 0x0015, 0xAA00); - phy->radio_on = 0; + phy->radio_on = false; b43legacydbg(dev->wl, "Radio initialized\n"); }
drivers/net/wireless/b43legacy/leds.c 2011-12-19 13:22:21.536433279 +1030 renamed from drivers/net/wireless/b43legacy/leds.c 2011-07-26 13:50:42.000000000 +0930 +2 -2
@@ -203,11 +203,11 @@ void b43legacy_leds_init(struct b43legac if (sprom[i] == 0xFF) { /* There is no LED information in the SPROM * for this LED. Hardcode it here. */ - activelow = 0; + activelow = false; switch (i) { case 0: behaviour = B43legacy_LED_ACTIVITY; - activelow = 1; + activelow = true; if (bus->boardinfo.vendor == PCI_VENDOR_ID_COMPAQ) behaviour = B43legacy_LED_RADIO_ALL; break;
drivers/net/wireless/b43legacy/main.c 2011-12-19 13:22:22.200433296 +1030 renamed from drivers/net/wireless/b43legacy/main.c 2011-11-07 15:50:48.000000000 +1030 +32 -32
199 lines not on this page · raw message
drivers/net/wireless/ath/ath5k/reset.c 2011-12-19 13:22:24.384433352 +1030 renamed from drivers/net/wireless/ath/ath5k/reset.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -1047,7 +1047,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, */ if (fast && (ah->ah_radio != AR5K_RF2413) && (ah->ah_radio != AR5K_RF5413)) - fast = 0; + fast = false; /* Disable sleep clock operation * to avoid register access delay on certain
@@ -1073,7 +1073,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, if (ret && fast) { ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "DMA didn't stop, falling back to normal reset\n"); - fast = 0; + fast = false; /* Non fatal, just continue with * normal reset */ ret = 0;
drivers/net/wireless/ath/ath9k/xmit.c 2011-12-19 13:22:33.224433577 +1030 renamed from drivers/net/wireless/ath/ath9k/xmit.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -1911,7 +1911,7 @@ int ath_tx_start(struct ieee80211_hw *hw if (txq == sc->tx.txq_map[q] && ++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) { ieee80211_stop_queue(sc->hw, q); - txq->stopped = 1; + txq->stopped = true; } spin_unlock_bh(&txq->axq_lock);
@@ -1970,7 +1970,7 @@ static void ath_tx_complete(struct ath_s if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) { ieee80211_wake_queue(sc->hw, q); - txq->stopped = 0; + txq->stopped = false; } spin_unlock_bh(&txq->axq_lock); }
drivers/net/wireless/ath/ath9k/eeprom_def.c 2011-12-19 13:22:39.848433748 +1030 renamed from drivers/net/wireless/ath/ath9k/eeprom_def.c 2011-10-27 10:37:52.000000000 +1030 +1 -1
@@ -385,7 +385,7 @@ static int ath9k_hw_def_check_eeprom(str if ((ah->hw_version.devid == AR9280_DEVID_PCI) && ((eep->baseEepHeader.version & 0xff) > 0x0a) && (eep->baseEepHeader.pwdclkind == 0)) - ah->need_an_top2_fixup = 1; + ah->need_an_top2_fixup = true; if ((common->bus_ops->ath_bus_type == ATH_USB) && (AR_SREV_9280(ah)))
drivers/net/wireless/ath/ath6kl/init.c 2011-12-19 13:22:40.680433769 +1030 renamed from drivers/net/wireless/ath/ath6kl/init.c 2011-10-27 10:37:52.000000000 +1030 +1 -1
@@ -453,7 +453,7 @@ static int ath6kl_target_config_wlan_par ath6kl_dbg(ATH6KL_DBG_TRC, "failed to request P2P " "capabilities (%d) - assuming P2P not " "supported\n", ret); - ar->p2p = 0; + ar->p2p = false; } }
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c 2011-12-19 13:22:46.204433910 +1030 renamed from drivers/net/wireless/rtlwifi/rtl8192ce/sw.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -98,9 +98,9 @@ int rtl92c_init_sw_vars(struct ieee80211 rtl8192ce_bt_reg_init(hw); - rtlpriv->dm.dm_initialgain_enable = 1; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag = 0; - rtlpriv->dm.disable_framebursting = 0; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue = 0; rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13);
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c 2011-12-19 13:22:48.932433981 +1030 renamed from drivers/net/wireless/rtlwifi/rtl8192cu/hw.c 2011-07-26 13:50:42.000000000 +0930 +1 -1
@@ -2435,7 +2435,7 @@ bool rtl92cu_gpio_radio_on_off_checking( "%x\n", ppsc->hwradiooff, e_rfpowerstate_toset)); } if (actuallyset) { - ppsc->hwradiooff = 1; + ppsc->hwradiooff = true; if (e_rfpowerstate_toset == ERFON) { if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_ASPM))
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c 2011-12-19 13:22:49.604433997 +1030 renamed from drivers/net/wireless/rtlwifi/rtl8192cu/sw.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -57,9 +57,9 @@ static int rtl92cu_init_sw_vars(struct i const struct firmware *firmware; int err; - rtlpriv->dm.dm_initialgain_enable = 1; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag = 0; - rtlpriv->dm.disable_framebursting = 0; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue = 0; rtlpriv->dbg.global_debuglevel = rtlpriv->cfg->mod_params->debug; rtlpriv->rtlhal.pfirmware = vmalloc(0x4000);
drivers/net/wireless/rtlwifi/pci.c 2011-12-19 13:22:50.800434029 +1030 renamed from drivers/net/wireless/rtlwifi/pci.c 2011-11-07 15:50:48.000000000 +1030 +3 -3
@@ -78,7 +78,7 @@ static void _rtl_pci_update_default_sett u8 init_aspm; ppsc->reg_rfps_level = 0; - ppsc->support_aspm = 0; + ppsc->support_aspm = false; /*Update PCI ASPM setting */ ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm;
@@ -570,9 +570,9 @@ static void _rtl_pci_tx_isr(struct ieee8 if (ieee80211_is_nullfunc(fc)) { if (ieee80211_has_pm(fc)) { rtlpriv->mac80211.offchan_delay = true; - rtlpriv->psc.state_inap = 1; + rtlpriv->psc.state_inap = true; } else { - rtlpriv->psc.state_inap = 0; + rtlpriv->psc.state_inap = false; } }
drivers/net/wireless/rtlwifi/rtl8192se/sw.c 2011-12-19 13:22:55.252434143 +1030 renamed from drivers/net/wireless/rtlwifi/rtl8192se/sw.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -98,9 +98,9 @@ static int rtl92s_init_sw_vars(struct ie int err = 0; u16 earlyrxthreshold = 7; - rtlpriv->dm.dm_initialgain_enable = 1; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag = 0; - rtlpriv->dm.disable_framebursting = 0; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue = 0; rtlpriv->dm.useramask = true;
drivers/net/wireless/rtlwifi/base.c 2011-12-19 13:22:58.184434218 +1030 renamed from drivers/net/wireless/rtlwifi/base.c 2011-11-07 15:50:48.000000000 +1030 +1 -1
@@ -396,7 +396,7 @@ void rtl_init_rfkill(struct ieee80211_hw u8 valid = 0; /*set init state to on */ - rtlpriv->rfkill.rfkill_state = 1; + rtlpriv->rfkill.rfkill_state = true; wiphy_rfkill_set_hw_state(hw->wiphy, 0); radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
drivers/net/wireless/rtlwifi/rtl8192de/sw.c 2011-12-19 13:23:02.968434340 +1030 renamed from drivers/net/wireless/rtlwifi/rtl8192de/sw.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -99,9 +99,9 @@ static int rtl92d_init_sw_vars(struct ie rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag = 0; - rtlpriv->dm.disable_framebursting = 0; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue = 0; - rtlpriv->dm.useramask = 1; + rtlpriv->dm.useramask = true; /* dual mac */ if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G)
drivers/net/wireless/b43/dma.c 2011-12-19 13:23:03.864434363 +1030 renamed from drivers/net/wireless/b43/dma.c 2011-10-27 10:37:52.000000000 +1030 +7 -7
@@ -890,7 +890,7 @@ struct b43_dmaring *b43_setup_dmaring(st else ring->ops = &dma32_ops; if (for_tx) { - ring->tx = 1; + ring->tx = true; ring->current_slot = -1; } else { if (ring->index == 0) {
@@ -1061,7 +1061,7 @@ void b43_dma_free(struct b43_wldev *dev) static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) { u64 orig_mask = mask; - bool fallback = 0; + bool fallback = false; int err; /* Try to set the DMA mask. If it fails, try falling back to a
@@ -1075,12 +1075,12 @@ static int b43_dma_set_mask(struct b43_w } if (mask == DMA_BIT_MASK(64)) { mask = DMA_BIT_MASK(32); - fallback = 1; + fallback = true; continue; } if (mask == DMA_BIT_MASK(32)) { mask = DMA_BIT_MASK(30); - fallback = 1; + fallback = true; continue; } b43err(dev->wl, "The machine/kernel does not support "
@@ -1307,7 +1307,7 @@ static int dma_tx_fragment(struct b43_dm memset(meta, 0, sizeof(*meta)); meta->skb = skb; - meta->is_last_fragment = 1; + meta->is_last_fragment = true; priv_info->bouncebuffer = NULL; meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
@@ -1466,7 +1466,7 @@ int b43_dma_tx(struct b43_wldev *dev, st should_inject_overflow(ring)) { /* This TX ring is full. */ ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); - ring->stopped = 1; + ring->stopped = true; if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index); }
@@ -1585,7 +1585,7 @@ void b43_dma_handle_txstatus(struct b43_ if (ring->stopped) { B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME); ieee80211_wake_queue(dev->wl->hw, ring->queue_prio); - ring->stopped = 0; + ring->stopped = false; if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { b43dbg(dev->wl, "Woke up TX ring %d\n", ring->index); }
drivers/net/wireless/b43/lo.c 2011-12-19 13:23:04.300434374 +1030 renamed from drivers/net/wireless/b43/lo.c 2011-07-26 13:50:42.000000000 +0930 +4 -4
@@ -826,7 +826,7 @@ void b43_gphy_dc_lt_init(struct b43_wlde const struct b43_rfatt *rfatt; const struct b43_bbatt *bbatt; u64 power_vector; - bool table_changed = 0; + bool table_changed = false; BUILD_BUG_ON(B43_DC_LT_SIZE != 32); B43_WARN_ON(lo->rfatt_list.len * lo->bbatt_list.len > 64);
@@ -876,7 +876,7 @@ void b43_gphy_dc_lt_init(struct b43_wlde lo->dc_lt[idx] = (lo->dc_lt[idx] & 0xFF00) | (val & 0x00FF); } - table_changed = 1; + table_changed = true; } if (table_changed) { /* The table changed in memory. Update the hardware table. */
@@ -938,7 +938,7 @@ void b43_lo_g_maintanance_work(struct b4 unsigned long now; unsigned long expire; struct b43_lo_calib *cal, *tmp; - bool current_item_expired = 0; + bool current_item_expired = false; bool hwpctl; if (!lo)
@@ -968,7 +968,7 @@ void b43_lo_g_maintanance_work(struct b4 if (b43_compare_bbatt(&cal->bbatt, &gphy->bbatt) && b43_compare_rfatt(&cal->rfatt, &gphy->rfatt)) { B43_WARN_ON(current_item_expired); - current_item_expired = 1; + current_item_expired = true; } if (b43_debug(dev, B43_DBG_LO)) { b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
drivers/net/wireless/b43/phy_lp.c 2011-12-19 13:23:05.520434405 +1030 renamed from drivers/net/wireless/b43/phy_lp.c 2011-07-26 13:50:42.000000000 +0930 +4 -4
@@ -736,9 +736,9 @@ static void lpphy_set_deaf(struct b43_wl struct b43_phy_lp *lpphy = dev->phy.lp; if (user) - lpphy->crs_usr_disable = 1; + lpphy->crs_usr_disable = true; else - lpphy->crs_sys_disable = 1; + lpphy->crs_sys_disable = true; b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFF1F, 0x80); }
@@ -747,9 +747,9 @@ static void lpphy_clear_deaf(struct b43_ struct b43_phy_lp *lpphy = dev->phy.lp; if (user) - lpphy->crs_usr_disable = 0; + lpphy->crs_usr_disable = false; else - lpphy->crs_sys_disable = 0; + lpphy->crs_sys_disable = false; if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) { if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
drivers/net/wireless/b43/xmit.c 2011-12-19 13:23:06.592434432 +1030 renamed from drivers/net/wireless/b43/xmit.c 2011-11-21 11:21:33.000000000 +1030 +2 -2
@@ -874,7 +874,7 @@ bool b43_fill_txstatus_report(struct b43 struct ieee80211_tx_info *report, const struct b43_txstatus *status) { - bool frame_success = 1; + bool frame_success = true; int retry_limit; /* preserve the confiured retry limit before clearing the status
@@ -890,7 +890,7 @@ bool b43_fill_txstatus_report(struct b43 /* The frame was not ACKed... */ if (!(report->flags & IEEE80211_TX_CTL_NO_ACK)) { /* ...but we expected an ACK. */ - frame_success = 0; + frame_success = false; } } if (status->frame_count == 0) {
drivers/net/wireless/b43/phy_common.c 2011-12-19 13:23:07.276434450 +1030 renamed from drivers/net/wireless/b43/phy_common.c 2011-10-27 10:37:52.000000000 +1030 +4 -4
@@ -145,7 +145,7 @@ void b43_radio_lock(struct b43_wldev *de #if B43_DEBUG B43_WARN_ON(dev->phy.radio_locked); - dev->phy.radio_locked = 1; + dev->phy.radio_locked = true; #endif macctl = b43_read32(dev, B43_MMIO_MACCTL);
@@ -163,7 +163,7 @@ void b43_radio_unlock(struct b43_wldev * #if B43_DEBUG B43_WARN_ON(!dev->phy.radio_locked); - dev->phy.radio_locked = 0; + dev->phy.radio_locked = false; #endif /* Commit any write */
@@ -178,7 +178,7 @@ void b43_phy_lock(struct b43_wldev *dev) { #if B43_DEBUG B43_WARN_ON(dev->phy.phy_locked); - dev->phy.phy_locked = 1; + dev->phy.phy_locked = true; #endif B43_WARN_ON(dev->dev->core_rev < 3);
@@ -190,7 +190,7 @@ void b43_phy_unlock(struct b43_wldev *de { #if B43_DEBUG B43_WARN_ON(!dev->phy.phy_locked); - dev->phy.phy_locked = 0; + dev->phy.phy_locked = false; #endif B43_WARN_ON(dev->dev->core_rev < 3);
drivers/net/wireless/b43/leds.c 2011-12-19 13:23:07.716434462 +1030 renamed from drivers/net/wireless/b43/leds.c 2011-07-26 13:50:42.000000000 +0930 +8 -8
@@ -74,7 +74,7 @@ static void b43_led_update(struct b43_wl if (radio_enabled) turn_on = atomic_read(&led->state) != LED_OFF; else - turn_on = 0; + turn_on = false; if (turn_on == led->hw_state) return; led->hw_state = turn_on;
@@ -225,11 +225,11 @@ static void b43_led_get_sprominfo(struct if (sprom[led_index] == 0xFF) { /* There is no LED information in the SPROM * for this LED. Hardcode it here. */ - *activelow = 0; + *activelow = false; switch (led_index) { case 0: *behaviour = B43_LED_ACTIVITY; - *activelow = 1; + *activelow = true; if (dev->dev->board_vendor == PCI_VENDOR_ID_COMPAQ) *behaviour = B43_LED_RADIO_ALL; break;
@@ -267,11 +267,11 @@ void b43_leds_init(struct b43_wldev *dev if (led->wl) { if (dev->phy.radio_on && b43_is_hw_radio_enabled(dev)) { b43_led_turn_on(dev, led->index, led->activelow); - led->hw_state = 1; + led->hw_state = true; atomic_set(&led->state, 1); } else { b43_led_turn_off(dev, led->index, led->activelow); - led->hw_state = 0; + led->hw_state = false; atomic_set(&led->state, 0); } }
@@ -280,19 +280,19 @@ void b43_leds_init(struct b43_wldev *dev led = &dev->wl->leds.led_tx; if (led->wl) { b43_led_turn_off(dev, led->index, led->activelow); - led->hw_state = 0; + led->hw_state = false; atomic_set(&led->state, 0); } led = &dev->wl->leds.led_rx; if (led->wl) { b43_led_turn_off(dev, led->index, led->activelow); - led->hw_state = 0; + led->hw_state = false; atomic_set(&led->state, 0); } led = &dev->wl->leds.led_assoc; if (led->wl) { b43_led_turn_off(dev, led->index, led->activelow); - led->hw_state = 0; + led->hw_state = false; atomic_set(&led->state, 0); }
drivers/net/wireless/b43/phy_g.c 2011-12-19 13:23:08.324434477 +1030 renamed from drivers/net/wireless/b43/phy_g.c 2011-07-26 13:50:42.000000000 +0930 +17 -17
@@ -897,7 +897,7 @@ b43_radio_interference_mitigation_enable if (b43_phy_read(dev, 0x0033) & 0x0800) break; - gphy->aci_enable = 1; + gphy->aci_enable = true; phy_stacksave(B43_PHY_RADIO_BITFIELD); phy_stacksave(B43_PHY_G_CRS);
@@ -1038,7 +1038,7 @@ b43_radio_interference_mitigation_disabl if (!(b43_phy_read(dev, 0x0033) & 0x0800)) break; - gphy->aci_enable = 0; + gphy->aci_enable = false; phy_stackrestore(B43_PHY_RADIO_BITFIELD); phy_stackrestore(B43_PHY_G_CRS);
@@ -1956,10 +1956,10 @@ static void b43_phy_init_pctl(struct b43 bbatt.att = 11; if (phy->radio_rev == 8) { rfatt.att = 15; - rfatt.with_padmix = 1; + rfatt.with_padmix = true; } else { rfatt.att = 9; - rfatt.with_padmix = 0; + rfatt.with_padmix = false; } b43_set_txpower_g(dev, &bbatt, &rfatt, 0); }
@@ -2137,7 +2137,7 @@ static void default_radio_attenuation(st struct b43_bus_dev *bdev = dev->dev; struct b43_phy *phy = &dev->phy; - rf->with_padmix = 0; + rf->with_padmix = false; if (dev->dev->board_vendor == SSB_BOARDVENDOR_BCM && dev->dev->board_type == SSB_BOARD_BCM4309G) {
@@ -2221,7 +2221,7 @@ static void default_radio_attenuation(st return; case 8: rf->att = 0xA; - rf->with_padmix = 1; + rf->with_padmix = true; return; case 9: default:
@@ -2389,7 +2389,7 @@ static int b43_gphy_init_tssi2dbm_table( B43_WARN_ON((dev->dev->chip_id == 0x4301) && (phy->radio_ver != 0x2050)); /* Not supported anymore */ - gphy->dyn_tssi_tbl = 0; + gphy->dyn_tssi_tbl = false; if (pab0 != 0 && pab1 != 0 && pab2 != 0 && pab0 != -1 && pab1 != -1 && pab2 != -1) {
@@ -2404,7 +2404,7 @@ static int b43_gphy_init_tssi2dbm_table( pab1, pab2); if (!gphy->tssi2dbm) return -ENOMEM; - gphy->dyn_tssi_tbl = 1; + gphy->dyn_tssi_tbl = true; } else { /* pabX values not set in SPROM. */ gphy->tgt_idle_tssi = 52;
@@ -2504,7 +2504,7 @@ static void b43_gphy_op_free(struct b43_ if (gphy->dyn_tssi_tbl) kfree(gphy->tssi2dbm); - gphy->dyn_tssi_tbl = 0; + gphy->dyn_tssi_tbl = false; gphy->tssi2dbm = NULL; kfree(gphy);
@@ -2531,10 +2531,10 @@ static int b43_gphy_op_prepare_hardware( if (phy->rev == 1) { /* Workaround: Temporarly disable gmode through the early init * phase, as the gmode stuff is not needed for phy rev 1 */ - phy->gmode = 0; + phy->gmode = false; b43_wireless_core_reset(dev, 0); b43_phy_initg(dev); - phy->gmode = 1; + phy->gmode = true; b43_wireless_core_reset(dev, 1); }
@@ -2613,7 +2613,7 @@ static void b43_gphy_op_software_rfkill( gphy->radio_off_context.rfover); b43_phy_write(dev, B43_PHY_RFOVERVAL, gphy->radio_off_context.rfoverval); - gphy->radio_off_context.valid = 0; + gphy->radio_off_context.valid = false; } channel = phy->channel; b43_gphy_channel_switch(dev, 6, 1);
@@ -2626,7 +2626,7 @@ static void b43_gphy_op_software_rfkill( rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL); gphy->radio_off_context.rfover = rfover; gphy->radio_off_context.rfoverval = rfoverval; - gphy->radio_off_context.valid = 1; + gphy->radio_off_context.valid = true; b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C); b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73); }
@@ -2711,10 +2711,10 @@ static int b43_gphy_op_interf_mitigation if ((phy->rev == 0) || (!phy->gmode)) return -ENODEV; - gphy->aci_wlan_automatic = 0; + gphy->aci_wlan_automatic = false; switch (mode) { case B43_INTERFMODE_AUTOWLAN: - gphy->aci_wlan_automatic = 1; + gphy->aci_wlan_automatic = true; if (gphy->aci_enable) mode = B43_INTERFMODE_MANUALWLAN; else
@@ -2735,8 +2735,8 @@ static int b43_gphy_op_interf_mitigation b43_radio_interference_mitigation_disable(dev, currentmode); if (mode == B43_INTERFMODE_NONE) { - gphy->aci_enable = 0; - gphy->aci_hw_rssi = 0; + gphy->aci_enable = false; + gphy->aci_hw_rssi = false; } else b43_radio_interference_mitigation_enable(dev, mode); gphy->interfmode = mode;
drivers/net/wireless/b43/phy_n.c 2011-12-19 13:23:10.480434532 +1030 renamed from drivers/net/wireless/b43/phy_n.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -3258,7 +3258,7 @@ static int b43_nphy_cal_tx_iq_lo(struct if (dev->phy.rev >= 4) { avoid = nphy->hang_avoid; - nphy->hang_avoid = 0; + nphy->hang_avoid = false; } b43_ntab_read_bulk(dev, B43_NTAB16(7, 0x110), 2, save);
@@ -3368,7 +3368,7 @@ static int b43_nphy_cal_tx_iq_lo(struct if (phy6or5x && updated[core] == 0) { b43_nphy_update_tx_cal_ladder(dev, core); - updated[core] = 1; + updated[core] = true; } tmp = (params[core].ncorr[type] << 8) | 0x66;
drivers/net/wireless/b43/pio.c 2011-12-19 13:23:15.428434659 +1030 renamed from drivers/net/wireless/b43/pio.c 2011-10-27 10:37:52.000000000 +1030 +3 -3
@@ -539,7 +539,7 @@ int b43_pio_tx(struct b43_wldev *dev, st /* Not enough memory on the queue. */ err = -EBUSY; ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); - q->stopped = 1; + q->stopped = true; goto out; }
@@ -566,7 +566,7 @@ int b43_pio_tx(struct b43_wldev *dev, st (q->free_packet_slots == 0)) { /* The queue is full. */ ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); - q->stopped = 1; + q->stopped = true; } out:
@@ -601,7 +601,7 @@ void b43_pio_handle_txstatus(struct b43_ if (q->stopped) { ieee80211_wake_queue(dev->wl->hw, q->queue_prio); - q->stopped = 0; + q->stopped = false; } }
drivers/net/wireless/b43/main.c 2011-12-19 13:23:17.828434721 +1030 renamed from drivers/net/wireless/b43/main.c 2011-11-07 15:50:48.000000000 +1030 +50 -50
316 lines not on this page · raw message
drivers/net/wireless/iwmc3200wifi/rx.c 2011-12-19 13:23:19.492434763 +1030 renamed from drivers/net/wireless/iwmc3200wifi/rx.c 2011-05-28 15:06:19.000000000 +0930 +6 -6
@@ -660,7 +660,7 @@ static int iwm_mlme_profile_invalidate(s clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status); clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status); - iwm->umac_profile_active = 0; + iwm->umac_profile_active = false; memset(iwm->bssid, 0, ETH_ALEN); iwm->channel = 0;
@@ -735,7 +735,7 @@ static int iwm_mlme_update_sta_table(str umac_sta->mac_addr, umac_sta->flags & UMAC_STA_FLAG_QOS); - sta->valid = 1; + sta->valid = true; sta->qos = umac_sta->flags & UMAC_STA_FLAG_QOS; sta->color = GET_VAL8(umac_sta->sta_id, LMAC_STA_COLOR); memcpy(sta->addr, umac_sta->mac_addr, ETH_ALEN);
@@ -750,12 +750,12 @@ static int iwm_mlme_update_sta_table(str sta = &iwm->sta_table[GET_VAL8(umac_sta->sta_id, LMAC_STA_ID)]; if (!memcmp(sta->addr, umac_sta->mac_addr, ETH_ALEN)) - sta->valid = 0; + sta->valid = false; break; case UMAC_OPCODE_CLEAR_ALL: for (i = 0; i < IWM_STA_TABLE_NUM; i++) - iwm->sta_table[i].valid = 0; + iwm->sta_table[i].valid = false; break; default:
@@ -1203,7 +1203,7 @@ static int iwm_ntf_wifi_if_wrapper(struc switch (hdr->oid) { case UMAC_WIFI_IF_CMD_SET_PROFILE: - iwm->umac_profile_active = 1; + iwm->umac_profile_active = true; break; default: break;
@@ -1363,7 +1363,7 @@ static int iwm_rx_handle_nonwifi(struct */ list_for_each_entry(cmd, &iwm->nonwifi_pending_cmd, pending) if (cmd->seq_num == seq_num) { - cmd->resp_received = 1; + cmd->resp_received = true; cmd->buf.len = buf_size; memcpy(cmd->buf.hdr, buf, buf_size); wake_up_interruptible(&iwm->nonwifi_queue);
drivers/net/wireless/iwmc3200wifi/main.c 2011-12-19 13:23:19.900434774 +1030 renamed from drivers/net/wireless/iwmc3200wifi/main.c 2011-12-19 13:09:30.712413542 +1030 +1 -1
@@ -130,7 +130,7 @@ static void iwm_disconnect_work(struct w iwm_invalidate_mlme_profile(iwm); clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status); - iwm->umac_profile_active = 0; + iwm->umac_profile_active = false; memset(iwm->bssid, 0, ETH_ALEN); iwm->channel = 0;
drivers/net/wireless/libertas/if_cs.c 2011-12-19 13:23:21.148434806 +1030 renamed from drivers/net/wireless/libertas/if_cs.c 2011-05-28 15:06:19.000000000 +0930 +2 -2
@@ -859,7 +859,7 @@ static int if_cs_probe(struct pcmcia_dev * Most of the libertas cards can do unaligned register access, but some * weird ones cannot. That's especially true for the CF8305 card. */ - card->align_regs = 0; + card->align_regs = false; card->model = get_model(p_dev->manf_id, p_dev->card_id); if (card->model == MODEL_UNKNOWN) {
@@ -871,7 +871,7 @@ static int if_cs_probe(struct pcmcia_dev /* Check if we have a current silicon */ prod_id = if_cs_read8(card, IF_CS_PRODUCT_ID); if (card->model == MODEL_8305) { - card->align_regs = 1; + card->align_regs = true; if (prod_id < IF_CS_CF8305_B1_REV) { pr_err("8305 rev B0 and older are not supported\n"); ret = -ENODEV;
drivers/net/wireless/wl12xx/sdio_test.c 2011-12-19 13:23:22.184434832 +1030 renamed from drivers/net/wireless/wl12xx/sdio_test.c 2011-10-27 10:37:52.000000000 +1030 +6 -6
@@ -341,8 +341,8 @@ static int tester(void *data) struct sdio_func *func = wl_to_func(wl); struct device *pdev = &func->dev; int ret = 0; - bool rx_started = 0; - bool tx_started = 0; + bool rx_started = false; + bool tx_started = false; uint8_t *tx_buf, *rx_buf; int test_size = PAGE_SIZE; u32 addr = 0;
@@ -371,18 +371,18 @@ static int tester(void *data) while (!kthread_should_stop()) { if (rx && !rx_started) { dev_info(pdev, "starting rx test\n"); - rx_started = 1; + rx_started = true; } else if (!rx && rx_started) { dev_info(pdev, "stopping rx test\n"); - rx_started = 0; + rx_started = false; } if (tx && !tx_started) { dev_info(pdev, "starting tx test\n"); - tx_started = 1; + tx_started = true; } else if (!tx && tx_started) { dev_info(pdev, "stopping tx test\n"); - tx_started = 0; + tx_started = false; } if (rx_started)
drivers/net/wireless/brcm80211/brcmsmac/dma.c 2011-12-19 13:23:24.928434902 +1030 renamed from drivers/net/wireless/brcm80211/brcmsmac/dma.c 2011-11-21 11:21:33.000000000 +1030 +2 -2
@@ -627,10 +627,10 @@ struct dma_pub *dma_attach(char *name, s /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ if ((ai_coreid(sih) == SDIOD_CORE_ID) && ((ai_corerev(sih) > 0) && (ai_corerev(sih) <= 2))) - di->addrext = 0; + di->addrext = false; else if ((ai_coreid(sih) == I2S_CORE_ID) && ((ai_corerev(sih) == 0) || (ai_corerev(sih) == 1))) - di->addrext = 0; + di->addrext = false; else di->addrext = _dma_isaddrext(di);
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c 2011-12-19 13:23:26.584434944 +1030 renamed from drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c 2011-10-27 10:37:52.000000000 +1030 +16 -16
@@ -1603,7 +1603,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct br si_pmu_pllupd(pi->sh->sih); write_phy_reg(pi, 0x942, 0); wlc_lcnphy_txrx_spur_avoidance_mode(pi, false); - pi_lcn->lcnphy_spurmod = 0; + pi_lcn->lcnphy_spurmod = false; mod_phy_reg(pi, 0x424, (0xff << 8), (0x1b) << 8); write_phy_reg(pi, 0x425, 0x5907);
@@ -1616,7 +1616,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct br write_phy_reg(pi, 0x942, 0); wlc_lcnphy_txrx_spur_avoidance_mode(pi, true); - pi_lcn->lcnphy_spurmod = 0; + pi_lcn->lcnphy_spurmod = false; mod_phy_reg(pi, 0x424, (0xff << 8), (0x1f) << 8); write_phy_reg(pi, 0x425, 0x590a);
@@ -2325,7 +2325,7 @@ static s8 wlc_lcnphy_tempcompensated_txp { s8 index, delta_brd, delta_temp, new_index, tempcorrx; s16 manp, meas_temp, temp_diff; - bool neg = 0; + bool neg = false; u16 temp; struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -2348,7 +2348,7 @@ static s8 wlc_lcnphy_tempcompensated_txp manp = LCNPHY_TEMPSENSE(pi_lcn->lcnphy_rawtempsense); temp_diff = manp - meas_temp; if (temp_diff < 0) { - neg = 1; + neg = true; temp_diff = -temp_diff; }
@@ -3681,8 +3681,8 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int wlc_lcnphy_set_cc(pi, cal_type, phy_c15, phy_c16); udelay(20); for (phy_c8 = 0; phy_c7 != 0 && phy_c8 < num_levels; phy_c8++) { - phy_c23 = 1; - phy_c22 = 0; + phy_c23 = true; + phy_c22 = false; switch (cal_type) { case 0: phy_c10 = 511;
@@ -3700,18 +3700,18 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int phy_c9 = read_phy_reg(pi, 0x93d); phy_c9 = 2 * phy_c9; - phy_c24 = 0; + phy_c24 = false; phy_c5 = 7; - phy_c25 = 1; + phy_c25 = true; while (1) { write_radio_reg(pi, RADIO_2064_REG026, (phy_c5 & 0x7) | ((phy_c5 & 0x7) << 4)); udelay(50); - phy_c22 = 0; + phy_c22 = false; ptr[130] = 0; wlc_lcnphy_samp_cap(pi, 1, phy_c9, &ptr[0], 2); if (ptr[130] == 1) - phy_c22 = 1; + phy_c22 = true; if (phy_c22) phy_c5 -= 1; if ((phy_c22 != phy_c24) && (!phy_c25))
@@ -3721,7 +3721,7 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int if (phy_c5 <= 0 || phy_c5 >= 7) break; phy_c24 = phy_c22; - phy_c25 = 0; + phy_c25 = false; } if (phy_c5 < 0)
@@ -3772,10 +3772,10 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int phy_c13 = phy_c11; phy_c14 = phy_c12; } - phy_c23 = 0; + phy_c23 = false; } } - phy_c23 = 1; + phy_c23 = true; phy_c15 = phy_c13; phy_c16 = phy_c14; phy_c7 = phy_c7 >> 1;
@@ -3965,7 +3965,7 @@ s16 wlc_lcnphy_tempsense_new(struct brcm { u16 tempsenseval1, tempsenseval2; s16 avg = 0; - bool suspend = 0; + bool suspend = false; if (mode == 1) { suspend =
@@ -4007,7 +4007,7 @@ u16 wlc_lcnphy_tempsense(struct brcms_ph { u16 tempsenseval1, tempsenseval2; s32 avg = 0; - bool suspend = 0; + bool suspend = false; u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi); struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -4075,7 +4075,7 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy { u16 vbatsenseval; s32 avg = 0; - bool suspend = 0; + bool suspend = false; if (mode == 1) { suspend =
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 2011-12-19 13:23:39.144435266 +1030 renamed from drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c 2011-11-07 15:50:48.000000000 +1030 +1 -1
@@ -1332,7 +1332,7 @@ uint brcms_reset(struct brcms_info *wl) brcms_c_reset(wl->wlc); /* dpc will not be rescheduled */ - wl->resched = 0; + wl->resched = false; return 0; }
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c 2011-12-19 13:23:42.196435345 +1030 renamed from drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c 2011-10-27 10:37:52.000000000 +1030 +2 -2
@@ -845,7 +845,7 @@ static int brcmf_netdev_stop(struct net_ return 0; /* Set state and stop OS transmissions */ - drvr->up = 0; + drvr->up = false; netif_stop_queue(ndev); return 0;
@@ -884,7 +884,7 @@ static int brcmf_netdev_open(struct net_ } /* Allow transmit calls */ netif_start_queue(ndev); - drvr_priv->pub.up = 1; + drvr_priv->pub.up = true; if (brcmf_cfg80211_up(drvr_priv->pub.config)) { brcmf_dbg(ERROR, "failed to bring up cfg80211\n"); return -1;
drivers/net/wireless/mwl8k.c 2011-12-19 13:23:44.756435410 +1030 renamed from drivers/net/wireless/mwl8k.c 2011-12-19 13:09:30.716413542 +1030 +4 -4
@@ -738,10 +738,10 @@ static int mwl8k_load_firmware(struct ie ready_code = ioread32(priv->regs + MWL8K_HIU_INT_CODE); if (ready_code == MWL8K_FWAP_READY) { - priv->ap_fw = 1; + priv->ap_fw = true; break; } else if (ready_code == MWL8K_FWSTA_READY) { - priv->ap_fw = 0; + priv->ap_fw = false; break; }
@@ -5517,8 +5517,8 @@ static int mwl8k_firmware_load_success(s INIT_LIST_HEAD(&priv->vif_list); /* Set default radio state and preamble */ - priv->radio_on = 0; - priv->radio_short_preamble = 0; + priv->radio_on = false; + priv->radio_short_preamble = false; /* Finalize join worker */ INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker);
drivers/net/wireless/iwlwifi/iwl-agn.c 2011-12-19 13:23:50.220435550 +1030 renamed from drivers/net/wireless/iwlwifi/iwl-agn.c 2011-10-27 10:37:52.000000000 +1030 +1 -1
@@ -1381,7 +1381,7 @@ static void __iwl_down(struct iwl_priv * /* reset BT coex data */ priv->bt_status = 0; priv->cur_rssi_ctx = NULL; - priv->bt_is_sco = 0; + priv->bt_is_sco = false; if (priv->cfg->bt_params) priv->bt_traffic_load = priv->cfg->bt_params->bt_init_traffic_load;
drivers/net/wireless/mac80211_hwsim.c 2011-12-19 13:23:52.012435595 +1030 renamed from drivers/net/wireless/mac80211_hwsim.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -707,7 +707,7 @@ static int mac80211_hwsim_start(struct i { struct mac80211_hwsim_data *data = hw->priv; wiphy_debug(hw->wiphy, "%s\n", __func__); - data->started = 1; + data->started = true; return 0; }
@@ -715,7 +715,7 @@ static int mac80211_hwsim_start(struct i static void mac80211_hwsim_stop(struct ieee80211_hw *hw) { struct mac80211_hwsim_data *data = hw->priv; - data->started = 0; + data->started = false; del_timer(&data->beacon_timer); wiphy_debug(hw->wiphy, "%s\n", __func__); }
net/dccp/options.c 2011-12-19 13:29:33.116444329 +1030 renamed from net/dccp/options.c 2011-05-19 15:03:22.000000000 +0930 +1 -1
@@ -544,7 +544,7 @@ int dccp_insert_fn_opt(struct sk_buff *s } if (unlikely(val == NULL || len == 0)) - len = repeat_first = 0; + len = repeat_first = false; tot_len = 3 + repeat_first + len; if (DCCP_SKB_CB(skb)->dccpd_opt_len + tot_len > DCCP_MAX_OPT_LEN) {
net/dccp/feat.c 2011-12-19 13:29:33.576444342 +1030 renamed from net/dccp/feat.c 2011-10-27 10:37:55.000000000 +1030 +8 -8
@@ -490,8 +490,8 @@ static int dccp_feat_push_change(struct new->feat_num = feat; new->is_local = local; new->state = FEAT_INITIALISING; - new->needs_confirm = 0; - new->empty_confirm = 0; + new->needs_confirm = false; + new->empty_confirm = false; new->val = *fval; new->needs_mandatory = mandatory;
@@ -517,12 +517,12 @@ static int dccp_feat_push_confirm(struct new->feat_num = feat; new->is_local = local; new->state = FEAT_STABLE; /* transition in 6.6.2 */ - new->needs_confirm = 1; + new->needs_confirm = true; new->empty_confirm = (fval == NULL); new->val.nn = 0; /* zeroes the whole structure */ if (!new->empty_confirm) new->val = *fval; - new->needs_mandatory = 0; + new->needs_mandatory = false; return 0; }
@@ -1155,7 +1155,7 @@ static u8 dccp_feat_change_recv(struct l } if (dccp_feat_reconcile(&entry->val, val, len, server, true)) { - entry->empty_confirm = 0; + entry->empty_confirm = false; } else if (is_mandatory) { return DCCP_RESET_CODE_MANDATORY_ERROR; } else if (entry->state == FEAT_INITIALISING) {
@@ -1171,10 +1171,10 @@ static u8 dccp_feat_change_recv(struct l defval = dccp_feat_default_value(feat); if (!dccp_feat_reconcile(&entry->val, &defval, 1, server, true)) return DCCP_RESET_CODE_OPTION_ERROR; - entry->empty_confirm = 1; + entry->empty_confirm = true; } - entry->needs_confirm = 1; - entry->needs_mandatory = 0; + entry->needs_confirm = true; + entry->needs_mandatory = false; entry->state = FEAT_STABLE; return 0;
net/mac80211/scan.c 2011-12-19 13:29:39.276444488 +1030 renamed from net/mac80211/scan.c 2011-11-07 15:50:48.000000000 +1030 +1 -1
@@ -106,7 +106,7 @@ ieee80211_bss_info_update(struct ieee802 /* save the ERP value so that it is available at association time */ if (elems->erp_info && elems->erp_info_len >= 1) { bss->erp_value = elems->erp_info[0]; - bss->has_erp_value = 1; + bss->has_erp_value = true; } if (elems->tim) {
net/mac80211/rc80211_pid_algo.c 2011-12-19 13:29:40.776444526 +1030 renamed from net/mac80211/rc80211_pid_algo.c 2010-08-23 11:46:56.000000000 +0930 +2 -2
@@ -318,7 +318,7 @@ rate_control_pid_rate_init(void *priv, s rinfo[i].diff = i * pinfo->norm_offset; } for (i = 1; i < sband->n_bitrates; i++) { - s = 0; + s = false; for (j = 0; j < sband->n_bitrates - i; j++) if (unlikely(sband->bitrates[rinfo[j].index].bitrate > sband->bitrates[rinfo[j + 1].index].bitrate)) {
@@ -327,7 +327,7 @@ rate_control_pid_rate_init(void *priv, s rinfo[j + 1].index = tmp; rinfo[rinfo[j].index].rev_index = j; rinfo[rinfo[j + 1].index].rev_index = j + 1; - s = 1; + s = true; } if (!s) break;
net/netfilter/ipvs/ip_vs_pe_sip.c 2011-12-19 13:29:43.564444597 +1030 renamed from net/netfilter/ipvs/ip_vs_pe_sip.c 2011-03-31 12:06:06.000000000 +1030 +2 -2
@@ -108,7 +108,7 @@ static bool ip_vs_sip_ct_match(const str struct ip_vs_conn *ct) { - bool ret = 0; + bool ret = false; if (ct->af == p->af && ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) &&
@@ -121,7 +121,7 @@ static bool ip_vs_sip_ct_match(const str ct->protocol == p->protocol && ct->pe_data && ct->pe_data_len == p->pe_data_len && !memcmp(ct->pe_data, p->pe_data, p->pe_data_len)) - ret = 1; + ret = true; IP_VS_DBG_BUF(9, "SIP template match %s %s->%s:%d %s\n", ip_vs_proto_name(p->protocol),
net/ipv4/tcp_timer.c 2011-12-19 13:29:52.944444838 +1030 renamed from net/ipv4/tcp_timer.c 2011-10-27 10:37:55.000000000 +1030 +2 -2
@@ -171,13 +171,13 @@ static int tcp_write_timeout(struct sock { struct inet_connection_sock *icsk = inet_csk(sk); int retry_until; - bool do_reset, syn_set = 0; + bool do_reset, syn_set = false; if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) { if (icsk->icsk_retransmits) dst_negative_advice(sk); retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; - syn_set = 1; + syn_set = true; } else { if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) { /* Black hole detection */
net/rfkill/rfkill-regulator.c 2011-12-19 13:29:59.740445012 +1030 renamed from net/rfkill/rfkill-regulator.c 2011-10-27 10:37:55.000000000 +1030 +3 -3
@@ -36,12 +36,12 @@ static int rfkill_regulator_set_block(vo if (blocked) { if (rfkill_data->reg_enabled) { regulator_disable(rfkill_data->vcc); - rfkill_data->reg_enabled = 0; + rfkill_data->reg_enabled = false; } } else { if (!rfkill_data->reg_enabled) { regulator_enable(rfkill_data->vcc); - rfkill_data->reg_enabled = 1; + rfkill_data->reg_enabled = true; } }
@@ -96,7 +96,7 @@ static int __devinit rfkill_regulator_pr if (regulator_is_enabled(vcc)) { dev_dbg(&pdev->dev, "Regulator already enabled\n"); - rfkill_data->reg_enabled = 1; + rfkill_data->reg_enabled = true; } rfkill_data->vcc = vcc; rfkill_data->rf_kill = rf_kill;
net/rxrpc/ar-ack.c 2011-12-19 13:30:05.168445151 +1030 renamed from net/rxrpc/ar-ack.c 2011-05-28 15:06:24.000000000 +0930 +7 -7
@@ -195,7 +195,7 @@ static void rxrpc_resend(struct rxrpc_ca sp = rxrpc_skb(txb); if (sp->need_resend) { - sp->need_resend = 0; + sp->need_resend = false; /* each Tx packet has a new serial number */ sp->hdr.serial =
@@ -216,7 +216,7 @@ static void rxrpc_resend(struct rxrpc_ca } if (time_after_eq(jiffies + 1, sp->resend_at)) { - sp->need_resend = 1; + sp->need_resend = true; resend |= 1; } else if (resend & 2) { if (time_before(sp->resend_at, resend_at))
@@ -265,7 +265,7 @@ static void rxrpc_resend_timer(struct rx if (sp->need_resend) { ; } else if (time_after_eq(jiffies + 1, sp->resend_at)) { - sp->need_resend = 1; + sp->need_resend = true; resend |= 1; } else if (resend & 2) { if (time_before(sp->resend_at, resend_at))
@@ -314,11 +314,11 @@ static int rxrpc_process_soft_ACKs(struc switch (sacks[loop]) { case RXRPC_ACK_TYPE_ACK: - sp->need_resend = 0; + sp->need_resend = false; *p_txb |= 1; break; case RXRPC_ACK_TYPE_NACK: - sp->need_resend = 1; + sp->need_resend = true; *p_txb &= ~1; resend = 1; break;
@@ -344,13 +344,13 @@ static int rxrpc_process_soft_ACKs(struc if (*p_txb & 1) { /* packet must have been discarded */ - sp->need_resend = 1; + sp->need_resend = true; *p_txb &= ~1; resend |= 1; } else if (sp->need_resend) { ; } else if (time_after_eq(jiffies + 1, sp->resend_at)) { - sp->need_resend = 1; + sp->need_resend = true; resend |= 1; } else if (resend & 2) { if (time_before(sp->resend_at, resend_at))
net/rxrpc/ar-output.c 2011-12-19 13:30:05.452445157 +1030 renamed from net/rxrpc/ar-output.c 2011-11-07 15:50:48.000000000 +1030 +2 -2
@@ -486,7 +486,7 @@ static void rxrpc_queue_packet(struct rx _proto("Tx DATA %%%u { #%u }", ntohl(sp->hdr.serial), ntohl(sp->hdr.seq)); - sp->need_resend = 0; + sp->need_resend = false; sp->resend_at = jiffies + rxrpc_resend_timeout * HZ; if (!test_and_set_bit(RXRPC_CALL_RUN_RTIMER, &call->flags)) { _debug("run timer");
@@ -508,7 +508,7 @@ static void rxrpc_queue_packet(struct rx if (ret < 0) { _debug("need instant resend %d", ret); - sp->need_resend = 1; + sp->need_resend = true; rxrpc_instant_resend(call); }
David Miller
maintainerFrom: Rusty Russell <[email protected]>
Date: Fri, 16 Dec 2011 09:44:31 +1030
Quoted 1 line
Dave, did you want a true/false cleanup too?
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
Quoted 7 lines · David Miller
From: Rusty Russell <[email protected]>
Date: Fri, 16 Dec 2011 09:44:31 +1030Quoted 1 line
Dave, did you want a true/false cleanup too?
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
And here's the updated patch:
From: Rusty Russell <[email protected]>
Subject: module_param: make bool parameters really bool (net & drivers/net)
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick.
It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version.
(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).
--- drivers/net/caif/caif_serial.c | 6 +++--- drivers/net/caif/caif_spi.c | 2 +- drivers/net/can/vcan.c | 2 +- drivers/net/ethernet/amd/amd8111e.h | 4 ++-- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- drivers/net/ethernet/dlink/de600.c | 2 +- drivers/net/ethernet/mellanox/mlx4/fw.c | 2 +- drivers/net/ethernet/mellanox/mlx4/main.c | 2 +- drivers/net/ethernet/via/via-rhine.c | 5 +++-- drivers/net/irda/donauboe.c | 2 +- drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/usb/pegasus.c | 4 ++-- drivers/net/usb/smsc75xx.c | 2 +- drivers/net/usb/smsc95xx.c | 2 +- drivers/net/virtio_net.c | 2 +- drivers/net/wan/sbni.c | 2 +- drivers/net/wan/sealevel.c | 2 +- drivers/net/wireless/ath/ath5k/ath5k.h | 2 +- drivers/net/wireless/ath/ath5k/base.c | 6 +++--- drivers/net/wireless/ath/carl9170/main.c | 2 +- drivers/net/wireless/iwmc3200wifi/main.c | 4 ++-- drivers/net/wireless/mwl8k.c | 2 +- drivers/net/wireless/orinoco/main.c | 2 +- drivers/net/wireless/p54/main.c | 2 +- drivers/net/wireless/rt2x00/rt2500usb.c | 2 +- drivers/net/wireless/rt2x00/rt2800pci.c | 2 +- drivers/net/wireless/rt2x00/rt2800usb.c | 2 +- drivers/net/wireless/rt2x00/rt61pci.c | 2 +- drivers/net/wireless/rt2x00/rt73usb.c | 2 +- drivers/net/wireless/rtlwifi/wifi.h | 2 +- include/net/bluetooth/l2cap.h | 2 +- include/net/sctp/structs.h | 2 +- net/bluetooth/bnep/core.c | 4 ++-- net/bluetooth/hci_event.c | 2 +- net/bluetooth/hci_sock.c | 2 +- net/bluetooth/l2cap_core.c | 2 +- net/bluetooth/rfcomm/core.c | 4 ++-- net/bluetooth/sco.c | 2 +- net/dccp/ccids/ccid2.c | 4 ++-- net/dccp/ccids/ccid3.c | 2 +- net/dccp/ccids/lib/tfrc.c | 2 +- net/dccp/ccids/lib/tfrc.h | 2 +- net/dccp/dccp.h | 2 +- net/dccp/proto.c | 2 +- net/ipv4/netfilter/ipt_ULOG.c | 2 +- net/ipv4/netfilter/iptable_filter.c | 2 +- net/ipv6/netfilter/ip6table_filter.c | 2 +- net/irda/irlan/irlan_common.c | 2 +- net/netfilter/nf_conntrack_acct.c | 2 +- net/netfilter/nf_conntrack_ftp.c | 2 +- net/netfilter/nf_conntrack_h323_main.c | 2 +- net/netfilter/nf_conntrack_timestamp.c | 2 +- 52 files changed, 64 insertions(+), 63 deletions(-)
drivers/net/caif/caif_serial.c +3 -3
@@ -38,15 +38,15 @@ MODULE_ALIAS_LDISC(N_CAIF);/*This list is protected by the rtnl lock. */ static LIST_HEAD (ser_list); -static int ser_loop; +static bool ser_loop;module_param (ser_loop, bool,S_IRUGO );MODULE_PARM_DESC (ser_loop,"Run in simulated loopback mode." ); -static int ser_use_stx =1 ; +static bool ser_use_stx = true;module_param (ser_use_stx, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_stx,"STX enabled or not." ); -static int ser_use_fcs =1 ; +static bool ser_use_fcs = true;module_param (ser_use_fcs, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_fcs,"FCS enabled or not." );
drivers/net/caif/caif_spi.c +1 -1
@@ -35,7 +35,7 @@ MODULE_DESCRIPTION("CAIF SPI driver");/* Returns the number of padding bytes for alignment. */ #define PAD_POW2 (x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) -static int spi_loop; +static bool spi_loop;module_param (spi_loop, bool,S_IRUGO );MODULE_PARM_DESC (spi_loop,"SPI running in loopback mode." );
drivers/net/can/vcan.c +1 -1
@@ -63,7 +63,7 @@ MODULE_AUTHOR("Urs Thuermann <urs.thuerm* See Documentation/networking/can.txt for details. */ -static int echo;/* echo testing. Default: 0 (Off) */ +static bool echo;/* echo testing. Default: 0 (Off) */ module_param (echo, bool,S_IRUGO );MODULE_PARM_DESC (echo,"Echo sent frames (for testing). Default: 0 (Off)" );
drivers/net/ethernet/amd/amd8111e.h +2 -2
@@ -808,8 +808,8 @@ typedef enum {static int card_idx;static int speed_duplex[MAX_UNITS ] = {0 , }; -static int coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; -static int dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +static bool coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; +static bool dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };static unsigned int chip_version;#endif /* _AMD8111E_H */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -243,7 +243,7 @@ module_param_array(intr_cnt, uint, NULL,MODULE_PARM_DESC (intr_cnt,"thresholds 1..3 for queue interrupt packet counters" ); -static int vf_acls; +static bool vf_acls;#ifdef CONFIG_PCI_IOV module_param (vf_acls, bool,0644 );
drivers/net/ethernet/dlink/de600.c +1 -1
@@ -59,7 +59,7 @@ static const char version[] = "de600.c:#include "de600.h" -static unsigned int check_lost =1 ; +static bool check_lost = true;module_param (check_lost, bool,0 );MODULE_PARM_DESC (check_lost,"If set then check for unplugged de600" );
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -48,7 +48,7 @@ enum {extern void __buggy_use_of_MLX4_GET (void );extern void __buggy_use_of_MLX4_PUT (void ); -static int enable_qos; +static bool enable_qos;module_param (enable_qos, bool,0444 );MODULE_PARM_DESC (enable_qos,"Enable Quality of Service support in the HCA (default: off)" );
drivers/net/ethernet/mellanox/mlx4/main.c +1 -1
@@ -99,7 +99,7 @@ MODULE_PARM_DESC(log_num_vlan, "Log2 max/* Log2 max number of VLANs per ETH port (0-7) */ #define MLX4_LOG_NUM_VLANS 7 -static int use_prio; +static bool use_prio;module_param_named (use_prio, use_prio, bool,0444 );MODULE_PARM_DESC (use_prio,"Enable steering by VLAN priority on ETH ports " "(0/1, default 0)" );
drivers/net/ethernet/via/via-rhine.c +3 -2
@@ -35,6 +35,7 @@#define DRV_VERSION "1.5.0"#define DRV_RELDATE "2010-10-09" +#include <linux/types.h> /* A few user-configurable values. These may be modified when a driver module is loaded. */
@@ -55,7 +56,7 @@ static int rx_copybreak;/* Work-around for broken BIOSes: they are unable to get the chip back out of power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */ -static int avoid_D3; +static bool avoid_D3;/* * In case you are looking for 'options[]' or 'full_duplex[]', they
@@ -2320,7 +2321,7 @@ static int __init rhine_init(void)#endif if (dmi_check_system (rhine_dmi_table)) {/* these BIOSes fail at PXE boot if chip is in D3 */ - avoid_D3 =1 ; + avoid_D3 = true;pr_warn ("Broken BIOS detected, avoid_D3 enabled\n" ); }else if (avoid_D3)
drivers/net/irda/donauboe.c +1 -1
@@ -197,7 +197,7 @@ static char *driver_name = DRIVER_NAME;static int max_baud =4000000 ;#ifdef USE_PROBE -static int do_probe =0 ; +static bool do_probe = false;#endif
drivers/net/irda/smsc-ircc2.c +1 -1
@@ -79,7 +79,7 @@ MODULE_AUTHOR("Daniele Peri <[email protected]MODULE_DESCRIPTION ("SMC IrCC SIR/FIR controller driver" );MODULE_LICENSE ("GPL" ); -static int smsc_nopnp =1 ; +static bool smsc_nopnp = true;module_param_named (nopnp, smsc_nopnp, bool,0 );MODULE_PARM_DESC (nopnp,"Do not use PNP to detect controller settings, defaults to true" );
drivers/net/usb/pegasus.c +2 -2
@@ -55,8 +55,8 @@ static const char driver_name[] = "pegas#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \ BMSR_100FULL | BMSR_ANEGCAPABLE) -static int loopback; -static int mii_mode; +static bool loopback; +static bool mii_mode;static char *devid;static struct usb_eth_dev usb_dev_id[] = {
drivers/net/usb/smsc75xx.c +1 -1
@@ -76,7 +76,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/usb/smsc95xx.c +1 -1
@@ -59,7 +59,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/virtio_net.c +1 -1
@@ -30,7 +30,7 @@static int napi_weight =128 ;module_param (napi_weight, int,0444 ); -static int csum =1 , gso =1 ; +static bool csum = true, gso = true;module_param (csum, bool,0444 );module_param (gso, bool,0444 );
drivers/net/wan/sbni.c +1 -1
@@ -155,7 +155,7 @@ static int emancipate( struct net_devicstatic const char version[] ="Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n" ; -static int skip_pci_probe__initdata =0 ; +static bool skip_pci_probe__initdata = false;static int scandone__initdata =0 ;static int num__initdata =0 ;
drivers/net/wan/sealevel.c +1 -1
@@ -362,7 +362,7 @@ static int io=0x238;static int txdma=1 ;static int rxdma=3 ;static int irq=5 ; -static int slow=0 ; +static bool slow=false;module_param (io, int,0 );MODULE_PARM_DESC (io,"The I/O base of the Sealevel card" );
drivers/net/wireless/ath/ath5k/ath5k.h +1 -1
@@ -747,7 +747,7 @@ struct ath5k_athchan_2ghz {*/ #define AR5K_KEYCACHE_SIZE 8 -extern int ath5k_modparam_nohwcrypt; +extern bool ath5k_modparam_nohwcrypt;/***********************\ HW RELATED DEFINITIONS
drivers/net/wireless/ath/ath5k/base.c +3 -3
@@ -68,15 +68,15 @@#define CREATE_TRACE_POINTS #include "trace.h" -int ath5k_modparam_nohwcrypt; +bool ath5k_modparam_nohwcrypt;module_param_named (nohwcrypt, ath5k_modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." ); -static int modparam_all_channels; +static bool modparam_all_channels;module_param_named (all_channels, modparam_all_channels, bool,S_IRUGO );MODULE_PARM_DESC (all_channels,"Expose all channels the device can use." ); -static int modparam_fastchanswitch; +static bool modparam_fastchanswitch;module_param_named (fastchanswitch, modparam_fastchanswitch, bool,S_IRUGO );MODULE_PARM_DESC (fastchanswitch,"Enable fast channel switching for AR2413/AR5413 radios." );
drivers/net/wireless/ath/carl9170/main.c +1 -1
@@ -48,7 +48,7 @@#include "carl9170.h" #include "cmd.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware crypto offload." );
drivers/net/wireless/iwmc3200wifi/main.c +2 -2
@@ -91,11 +91,11 @@ static struct iwm_conf def_iwm_conf = { .mac_addr = {0x00, 0x02, 0xb3, 0x01, 0x02, 0x03}, }; -static int modparam_reset; +static bool modparam_reset;module_param_named (reset, modparam_reset, bool,0644 );MODULE_PARM_DESC (reset,"reset on firmware errors (default 0 [not reset])" ); -static int modparam_wimax_enable =1 ; +static bool modparam_wimax_enable = true;module_param_named (wimax_enable, modparam_wimax_enable, bool,0644 );MODULE_PARM_DESC (wimax_enable,"Enable wimax core (default 1 [wimax enabled])" );
drivers/net/wireless/mwl8k.c +1 -1
@@ -31,7 +31,7 @@#define MWL8K_VERSION "0.12"/* Module parameters */ -static unsigned ap_mode_default; +static bool ap_mode_default;module_param (ap_mode_default, bool,0 );MODULE_PARM_DESC (ap_mode_default,"Set to 1 to make ap mode the default instead of sta mode" );
drivers/net/wireless/orinoco/main.c +1 -1
@@ -121,7 +121,7 @@ module_param(orinoco_debug, int, 0644);MODULE_PARM_DESC (orinoco_debug,"Debug level" );#endif -static int suppress_linkstatus;/* = 0 */ +static bool suppress_linkstatus;/* = 0 */ module_param (suppress_linkstatus, bool,0644 );MODULE_PARM_DESC (suppress_linkstatus,"Don't log link status changes" );
drivers/net/wireless/p54/main.c +1 -1
@@ -27,7 +27,7 @@#include "p54.h" #include "lmac.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );MODULE_AUTHOR ("Michael Wu <[email protected]>" );
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
@@ -39,7 +39,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800pci.c +1 -1
@@ -50,7 +50,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt = false;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800usb.c +1 -1
@@ -45,7 +45,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt61pci.c +1 -1
@@ -41,7 +41,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt = false;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt73usb.c +1 -1
@@ -40,7 +40,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rtlwifi/wifi.h +1 -1
@@ -1485,7 +1485,7 @@ struct rtl_intf_ops {struct rtl_mod_params {/* default: 0 = using hardware encryption */ -int sw_crypto; +bool sw_crypto;/* default: 0 = DBG_EMERG (0)*/ int debug;
include/net/bluetooth/l2cap.h +1 -1
@@ -492,7 +492,7 @@ static inline int l2cap_tx_window_full(s#define __is_sframe (ctrl) ((ctrl) & L2CAP_CTRL_FRAME_TYPE)#define __is_sar_start (ctrl) (((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START) -extern int disable_ertm; +extern bool disable_ertm;int l2cap_init_sockets (void );void l2cap_cleanup_sockets (void );
include/net/sctp/structs.h +1 -1
@@ -235,7 +235,7 @@ extern struct sctp_globals {/* Flag to indicate whether computing and verifying checksum * is disabled. */ -int checksum_disable; +bool checksum_disable;/* Threshold for rwnd update SACKS. Receive buffer shifted this many * bits is an indicator of when to send and window update SACK.
net/bluetooth/bnep/core.c +2 -2
@@ -56,8 +56,8 @@#define VERSION "1.3" -static int compress_src =1 ; -static int compress_dst =1 ; +static bool compress_src = true; +static bool compress_dst = true;static LIST_HEAD (bnep_session_list);static DECLARE_RWSEM (bnep_session_sem);
net/bluetooth/hci_event.c +1 -1
@@ -45,7 +45,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_le; +static bool enable_le;/* Handle HCI Event packets */
net/bluetooth/hci_sock.c +1 -1
@@ -49,7 +49,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_mgmt; +static bool enable_mgmt;/* ----- HCI socket interface ----- */
net/bluetooth/l2cap_core.c +1 -1
@@ -56,7 +56,7 @@#include <net/bluetooth/l2cap.h> #include <net/bluetooth/smp.h> -int disable_ertm; +bool disable_ertm;static u32 l2cap_feat_mask =L2CAP_FEAT_FIXED_CHAN ;static u8 l2cap_fixed_chan[8 ] = {0x02 , };
net/bluetooth/rfcomm/core.c +2 -2
@@ -51,8 +51,8 @@#define VERSION "1.11" -static int disable_cfc; -static int l2cap_ertm; +static bool disable_cfc; +static bool l2cap_ertm;static int channel_mtu =-1 ;static unsigned int l2cap_mtu =RFCOMM_MAX_L2CAP_MTU ;
net/bluetooth/sco.c +1 -1
@@ -51,7 +51,7 @@#include <net/bluetooth/hci_core.h> #include <net/bluetooth/sco.h> -static int disable_esco; +static bool disable_esco;static const struct proto_ops sco_sock_ops;
net/dccp/ccids/ccid2.c +2 -2
@@ -29,7 +29,7 @@#ifdef CONFIG_IP_DCCP_CCID2_DEBUG -static int ccid2_debug; +static bool ccid2_debug; #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a)#else #define ccid2_pr_debug(format, a...)
@@ -174,7 +174,7 @@ out:/* * Congestion window validation (RFC 2861). */ -static int ccid2_do_cwv =1 ; +static bool ccid2_do_cwv = true;module_param (ccid2_do_cwv, bool,0644 );MODULE_PARM_DESC (ccid2_do_cwv,"Perform RFC2861 Congestion Window Validation" );
net/dccp/ccids/ccid3.c +1 -1
@@ -38,7 +38,7 @@#include <asm/unaligned.h> #ifdef CONFIG_IP_DCCP_CCID3_DEBUG -static int ccid3_debug; +static bool ccid3_debug; #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)#else #define ccid3_pr_debug(format, a...)
net/dccp/ccids/lib/tfrc.c +1 -1
@@ -8,7 +8,7 @@#include "tfrc.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -int tfrc_debug; +bool tfrc_debug;module_param (tfrc_debug, bool,0644 );MODULE_PARM_DESC (tfrc_debug,"Enable TFRC debug messages" );#endif
net/dccp/ccids/lib/tfrc.h +1 -1
@@ -21,7 +21,7 @@#include "packet_history.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -extern int tfrc_debug; +extern bool tfrc_debug; #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a)#else #define tfrc_pr_debug(format, a...)
net/dccp/dccp.h +1 -1
@@ -39,7 +39,7 @@ "%s: " fmt, __func__, ##a)#ifdef CONFIG_IP_DCCP_DEBUG -extern int dccp_debug; +extern bool dccp_debug; #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
net/dccp/proto.c +1 -1
@@ -1099,7 +1099,7 @@ module_param(thash_entries, int, 0444);MODULE_PARM_DESC (thash_entries,"Number of ehash buckets" );#ifdef CONFIG_IP_DCCP_DEBUG -int dccp_debug; +bool dccp_debug;module_param (dccp_debug, bool,0644 );MODULE_PARM_DESC (dccp_debug,"Enable debug messages" );
net/ipv4/netfilter/ipt_ULOG.c +1 -1
@@ -65,7 +65,7 @@ static unsigned int flushtimeout = 10;module_param (flushtimeout, uint,0600 );MODULE_PARM_DESC (flushtimeout,"buffer flush timeout (hundredths of a second)" ); -static int nflog =1 ; +static bool nflog = true;module_param (nflog, bool,0400 );MODULE_PARM_DESC (nflog,"register as internal netfilter logging module" );
net/ipv4/netfilter/iptable_filter.c +1 -1
@@ -52,7 +52,7 @@ iptable_filter_hook(unsigned int hook, sstatic struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init iptable_filter_net_init (struct net *net)
net/ipv6/netfilter/ip6table_filter.c +1 -1
@@ -44,7 +44,7 @@ ip6table_filter_hook(unsigned int hook,static struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init ip6table_filter_net_init (struct net *net)
net/irda/irlan/irlan_common.c +1 -1
@@ -67,7 +67,7 @@ static void *ckey;static void *skey;/* Module parameters */ -static int eth;/* Use "eth" or "irlan" name for devices */ +static bool eth;/* Use "eth" or "irlan" name for devices */ static int access =ACCESS_PEER ;/* PEER, DIRECT or HOSTED */ #ifdef CONFIG_PROC_FS
net/netfilter/nf_conntrack_acct.c +1 -1
@@ -18,7 +18,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_acct.h> -static int nf_ct_acct__read_mostly ; +static bool nf_ct_acct__read_mostly ;module_param_named (acct, nf_ct_acct, bool,0644 );MODULE_PARM_DESC (acct,"Enable connection tracking flow accounting." );
net/netfilter/nf_conntrack_ftp.c +1 -1
@@ -42,7 +42,7 @@ static u_int16_t ports[MAX_PORTS];static unsigned int ports_c;module_param_array (ports, ushort, &ports_c,0400 ); -static int loose; +static bool loose;module_param (loose, bool,0600 ); unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
net/netfilter/nf_conntrack_h323_main.c +1 -1
@@ -42,7 +42,7 @@ static int gkrouted_only __read_mostly =module_param (gkrouted_only, int,0600 );MODULE_PARM_DESC (gkrouted_only,"only accept calls from gatekeeper" ); -static int callforward_filter__read_mostly =1 ; +static bool callforward_filter__read_mostly = true;module_param (callforward_filter, bool,0600 );MODULE_PARM_DESC (callforward_filter,"only create call forwarding expectations " "if both endpoints are on different sides "
net/netfilter/nf_conntrack_timestamp.c +1 -1
@@ -15,7 +15,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_timestamp.h> -static int nf_ct_tstamp__read_mostly ; +static bool nf_ct_tstamp__read_mostly ;module_param_named (tstamp, nf_ct_tstamp, bool,0644 );MODULE_PARM_DESC (tstamp,"Enable connection tracking flow timestamping." );
drivers/net/ethernet/amd/amd8111e.h
Quoted 1 line · Rusty Russell
drivers/net/ethernet/amd/amd8111e.h +0
-0
[]
drivers/net/ethernet/amd/amd8111e.h typedef enum {
Quoted 1 line
drivers/net/ethernet/amd/amd8111e.h +0
-0@@ -808,8 +808,8 @@ typedef enum {
[]
drivers/net/ethernet/amd/amd8111e.h typedef enum { · line 812
Quoted 2 lines
drivers/net/ethernet/amd/amd8111e.h +2
-0+static bool coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; +static bool dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };
Perhaps these array initializations could/should be:
static bool coalesce[MAX_UNITS] = { [0 ... MAX_UNITS - 1] = true }; static bool dynamic_irq[MAX_UNITS] = { [0 ... MAX_UNITS - 1] = false };
in a separate patch maybe.
David Miller
maintainerFrom: Rusty Russell <[email protected]>
Date: Mon, 19 Dec 2011 16:19:52 +1030
Quoted 10 lines · David Miller
Quoted 7 lines
From: Rusty Russell <[email protected]>
Date: Fri, 16 Dec 2011 09:44:31 +1030Quoted 1 line
Dave, did you want a true/false cleanup too?
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
And here's the updated patch:
Neither of your two patches comes close to applying cleanly to net-next, even when I try to apply it by hand there are rejects and references to files that don't even exist in net-next any more.
Please respin them.
Thanks!
Quoted 9 lines · David Miller
From: Rusty Russell <[email protected]>
Date: Mon, 19 Dec 2011 16:19:52 +1030Quoted 6 lines · David Miller
Quoted 5 lines
From: Rusty Russell <[email protected]>
Date: Fri, 16 Dec 2011 09:44:31 +1030Quoted 1 line
Dave, did you want a true/false cleanup too?
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
And here's the updated patch:
Neither of your two patches comes close to applying cleanly to net-next, even when I try to apply it by hand there are rejects and references to files that don't even exist in net-next any more.
Yeah, no surprise there. Resending.
Cheers,
Rusty.
PATCH 1/2 net: fix assignment of 0/1 to bool variables.
In reply to David MillerDaveM said:
Please, this kind of stuff rots forever and not using bool properly drives me crazy.
Joe Perches <[email protected]> gave me the spatch script:
@@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true
I merely installed coccinelle, read the documentation and took credit.
drivers/net/ethernet/broadcom/tg3.c +4 -4
@@ -6425,13 +6425,13 @@ static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget,bool hwbug = false;if (tg3_flag (tp,SHORT_DMA_BUG ) && len <=8 ) - hwbug =1 ; + hwbug = true;if (tg3_4g_overflow_test (map, len)) - hwbug =1 ; + hwbug = true;if (tg3_40bit_overflow_test (tp, map, len)) - hwbug =1 ; + hwbug = true;if (tp->dma_limit) {u32 prvidx = *entry;
@@ -6464,7 +6464,7 @@ static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget, *budget -=1 ; *entry =NEXT_TX (*entry); }else { - hwbug =1 ; + hwbug = true; tnapi->tx_buffers[prvidx].fragmented = false; } }
drivers/net/ethernet/brocade/bna/bnad.c +3 -3
@@ -723,7 +723,7 @@ void bnad_cb_ethport_link_status(struct bnad *bnad, enum bna_link_status link_status) { - bool link_up = 0; + bool link_up = false; link_up = (link_status ==BNA_LINK_UP ) || (link_status ==BNA_CEE_UP );
@@ -3190,7 +3190,7 @@ bnad_pci_init(struct bnad *bnad, goto disable_device;if (!dma_set_mask (&pdev->dev,DMA_BIT_MASK (64 )) && !dma_set_coherent_mask (&pdev->dev,DMA_BIT_MASK (64 ))) { - *using_dac =1 ; + *using_dac = true; }else { err =dma_set_mask (&pdev->dev,DMA_BIT_MASK (32 ));if (err) {
@@ -3199,7 +3199,7 @@ bnad_pci_init(struct bnad *bnad,if (err) goto release_regions; } - *using_dac =0 ; + *using_dac = false; }pci_set_master (pdev);return 0 ;
drivers/net/ethernet/dec/tulip/de4x5.c +2 -2
@@ -5191,7 +5191,7 @@ de4x5_parse_params(struct net_device *dev)struct de4x5_private *lp =netdev_priv (dev);char *p, *q, t; - lp->params.fdx =0 ; + lp->params.fdx = false; lp->params.autosense =AUTO ;if (args ==NULL )return ;
@@ -5201,7 +5201,7 @@ de4x5_parse_params(struct net_device *dev) t = *q; *q ='\0' ; -if (strstr (p,"fdx" ) ||strstr (p,"FDX" )) lp->params.fdx =1 ; +if (strstr (p,"fdx" ) ||strstr (p,"FDX" )) lp->params.fdx = true;if (strstr (p,"autosense" ) ||strstr (p,"AUTOSENSE" )) {if (strstr (p,"TP" )) {
drivers/net/ethernet/intel/e1000/e1000_main.c +5 -5
@@ -1185,7 +1185,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,if (global_quad_port_a !=0 ) adapter->eeprom_wol =0 ;else - adapter->quad_port_a =1 ; + adapter->quad_port_a = true;/* Reset for multiple quad port adapters */ if (++global_quad_port_a ==4 ) global_quad_port_a =0 ;
@@ -1679,7 +1679,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)* need this to apply a workaround later in the send path. */ if (hw->mac_type == e1000_82544 && hw->bus_type == e1000_bus_type_pcix) - adapter->pcix_82544 =1 ; + adapter->pcix_82544 = true;ew32 (TCTL , tctl);
@@ -2002,7 +2002,7 @@ static void e1000_clean_tx_ring(struct e1000_adapter *adapter, tx_ring->next_to_use =0 ; tx_ring->next_to_clean =0 ; - tx_ring->last_tx_tso =0 ; + tx_ring->last_tx_tso = false;writel (0 , hw->hw_addr + tx_ring->tdh);writel (0 , hw->hw_addr + tx_ring->tdt);
@@ -2851,7 +2851,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,* DMA'd to the controller */ if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso (skb)) { - tx_ring->last_tx_tso =0 ; + tx_ring->last_tx_tso = false; size -=4 ; }
@@ -3219,7 +3219,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,if (likely (tso)) {if (likely (hw->mac_type != e1000_82544)) - tx_ring->last_tx_tso =1 ; + tx_ring->last_tx_tso = true; tx_flags |=E1000_TX_FLAGS_TSO ; }else if (likely (e1000_tx_csum (adapter, tx_ring, skb))) tx_flags |=E1000_TX_FLAGS_CSUM ;
drivers/net/ethernet/intel/e1000e/netdev.c +12 -12
@@ -859,7 +859,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,u32 length, staterr;unsigned int i;int cleaned_count =0 ; -bool cleaned =0 ; +bool cleaned = false;unsigned int total_rx_bytes =0 , total_rx_packets =0 ; i = rx_ring->next_to_clean;
@@ -888,7 +888,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, next_buffer = &rx_ring->buffer_info[i]; - cleaned =1 ; + cleaned = true; cleaned_count++; dma_unmap_single(&pdev->dev, buffer_info->dma,
@@ -1157,7 +1157,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)* Detect a transmit hang in hardware, this serializes the * check with the clearing of time_stamp and movement of i */ - adapter->detect_tx_hung =0 ; + adapter->detect_tx_hung = false; if (tx_ring->buffer_info[i].time_stamp && time_after(jiffies, tx_ring->buffer_info[i].time_stamp + (adapter->tx_timeout_factor * HZ)) &&
@@ -1192,7 +1192,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,unsigned int i, j;u32 length, staterr;int cleaned_count =0 ; -bool cleaned =0 ; +bool cleaned = false;unsigned int total_rx_bytes =0 , total_rx_packets =0 ; i = rx_ring->next_to_clean;
@@ -1218,7 +1218,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, next_buffer = &rx_ring->buffer_info[i]; - cleaned =1 ; + cleaned = true; cleaned_count++;dma_unmap_single (&pdev->dev, buffer_info->dma, adapter->rx_ps_bsize0,DMA_FROM_DEVICE );
@@ -4257,7 +4257,7 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)static bool e1000e_has_link (struct e1000_adapter *adapter) {struct e1000_hw *hw = &adapter->hw; -bool link_active =0 ; +bool link_active = false;s32 ret_val =0 ;/*
@@ -4272,7 +4272,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter) ret_val = hw->mac.ops.check_for_link (hw); link_active = !hw->mac.get_link_status; }else { - link_active =1 ; + link_active = true; }break ;case e1000_media_type_fiber:
@@ -4371,7 +4371,7 @@ static void e1000_watchdog_task(struct work_struct *work)if (link) {if (!netif_carrier_ok (netdev)) { -bool txb2b =1 ; +bool txb2b = true;/* Cancel scheduled suspend requests. */ pm_runtime_resume (netdev->dev.parent);
@@ -4404,11 +4404,11 @@ static void e1000_watchdog_task(struct work_struct *work) adapter->tx_timeout_factor =1 ;switch (adapter->link_speed) {case SPEED_10 : - txb2b =0 ; + txb2b = false; adapter->tx_timeout_factor =16 ;break ;case SPEED_100 : - txb2b =0 ; + txb2b = false; adapter->tx_timeout_factor =10 ;break ; }
@@ -4544,7 +4544,7 @@ link_up:e1000e_flush_descriptors (adapter);/* Force detection of hung controller every watchdog period */ - adapter->detect_tx_hung =1 ; + adapter->detect_tx_hung = true;/* * With 82571 controllers, LAA may be overwritten due to controller
@@ -6208,7 +6208,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,/* Initialize link parameters. User can change them with ethtool */ adapter->hw.mac.autoneg =1 ; - adapter->fc_autoneg =1 ; + adapter->fc_autoneg = true; adapter->hw.fc.requested_mode = e1000_fc_default; adapter->hw.fc.current_mode = e1000_fc_default; adapter->hw.phy.autoneg_advertised =0x2f ;
drivers/net/ethernet/intel/ixgb/ixgb_main.c +1 -1
@@ -228,7 +228,7 @@ ixgb_up(struct ixgb_adapter *adapter)if (IXGB_READ_REG (&adapter->hw,STATUS ) &IXGB_STATUS_PCIX_MODE ) { err =pci_enable_msi (adapter->pdev);if (!err) { - adapter->have_msi =1 ; + adapter->have_msi = true; irq_flags =0 ; }/* proceed to try to request regular interrupt */
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +1 -1
@@ -2599,7 +2599,7 @@ s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval)s32 ixgbe_blink_led_start_generic (struct ixgbe_hw *hw,u32 index) {ixgbe_link_speed speed =0 ; -bool link_up =0 ; +bool link_up = false;u32 autoc_reg =IXGBE_READ_REG (hw,IXGBE_AUTOC );u32 led_reg =IXGBE_READ_REG (hw,IXGBE_LEDCTL );
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
@@ -4023,7 +4023,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)/* Mark all the VFs as inactive */ for (i =0 ; i < adapter->num_vfs; i++) - adapter->vfinfo[i].clear_to_send =0 ; + adapter->vfinfo[i].clear_to_send = false;/* ping all the active vfs to let them know we are going down */ ixgbe_ping_all_vfs (adapter);
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +6 -6
@@ -1214,7 +1214,7 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,u32 max_retry =10 ;u32 retry =0 ;u16 swfw_mask =0 ; -bool nack =1 ; +bool nack = true; *data =0 ;if (IXGBE_READ_REG (hw,IXGBE_STATUS ) &IXGBE_STATUS_LAN_ID_1 )
@@ -1421,7 +1421,7 @@ static void ixgbe_i2c_stop(struct ixgbe_hw *hw)static s32 ixgbe_clock_in_i2c_byte (struct ixgbe_hw *hw,u8 *data) {s32 i; -bool bit =0 ; +bool bit = false;for (i =7 ; i >=0 ; i--) {ixgbe_clock_in_i2c_bit (hw, &bit);
@@ -1443,7 +1443,7 @@ static s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data)s32 status =0 ;s32 i;u32 i2cctl; -bool bit =0 ; +bool bit = false;for (i =7 ; i >=0 ; i--) { bit = (data >> i) &0x1 ;
@@ -1473,7 +1473,7 @@ static s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)u32 i =0 ;u32 i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL );u32 timeout =10 ; -bool ack =1 ; +bool ack = true;ixgbe_raise_i2c_clk (hw, &i2cctl);
@@ -1646,9 +1646,9 @@ static bool ixgbe_get_i2c_data(u32 *i2cctl)bool data;if (*i2cctl &IXGBE_I2C_DATA_IN ) - data =1 ; + data = true;else - data =0 ; + data = false;return data; }
drivers/net/ethernet/sfc/falcon.c +1 -1
@@ -610,7 +610,7 @@ static void falcon_stats_complete(struct efx_nic *efx)if (!nic_data->stats_pending)return ; - nic_data->stats_pending =0 ; + nic_data->stats_pending = false;if (*nic_data->stats_dma_done ==FALCON_STATS_DONE ) {rmb ();/* read the done flag before the stats */ efx->mac_op->update_stats (efx);
drivers/net/ethernet/sfc/mtd.c +3 -3
@@ -496,7 +496,7 @@ static int siena_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len) rc =efx_mcdi_nvram_update_start (efx, part->mcdi.nvram_type);if (rc) goto out; - part->mcdi.updating =1 ; + part->mcdi.updating = true; }/* The MCDI interface can in fact do multiple erase blocks at once;
@@ -528,7 +528,7 @@ static int siena_mtd_write(struct mtd_info *mtd, loff_t start, rc =efx_mcdi_nvram_update_start (efx, part->mcdi.nvram_type);if (rc) goto out; - part->mcdi.updating =1 ; + part->mcdi.updating = true; }while (offset < end) {
@@ -553,7 +553,7 @@ static int siena_mtd_sync(struct mtd_info *mtd)int rc =0 ;if (part->mcdi.updating) { - part->mcdi.updating =0 ; + part->mcdi.updating = false; rc =efx_mcdi_nvram_update_finish (efx, part->mcdi.nvram_type); }
drivers/net/ethernet/sfc/siena.c +1 -1
@@ -232,7 +232,7 @@ static int siena_probe_nvconfig(struct efx_nic *efx)static int siena_probe_nic (struct efx_nic *efx) {struct siena_nic_data *nic_data; -bool already_attached =0 ; +bool already_attached = false;efx_oword_t reg;int rc;
drivers/net/ethernet/tile/tilepro.c +2 -2
@@ -1256,7 +1256,7 @@ static void tile_net_stop_aux(struct net_device *dev) sizeof(dummy), NETIO_IPP_STOP_SHIM_OFF) < 0)panic ("Failed to stop LIPP/LEPP!\n" ); - priv->partly_opened =0 ; + priv->partly_opened = false; }
@@ -1507,7 +1507,7 @@ static int tile_net_open(struct net_device *dev) priv->network_cpus_count, priv->network_cpus_credits);#endif - priv->partly_opened =1 ; + priv->partly_opened = true; }else {/* FIXME: Is this possible? */
drivers/net/ethernet/xilinx/xilinx_emaclite.c +3 -3
@@ -662,7 +662,7 @@ static void xemaclite_rx_handler(struct net_device *dev)*/ static irqreturn_t xemaclite_interrupt (int irq,void *dev_id) { -bool tx_complete =0 ; +bool tx_complete = false;struct net_device *dev = dev_id;struct net_local *lp =netdev_priv (dev);void __iomem *base_addr = lp->base_addr;
@@ -683,7 +683,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id) tx_status &= ~XEL_TSR_XMIT_ACTIVE_MASK ;out_be32 (base_addr +XEL_TSR_OFFSET , tx_status); - tx_complete =1 ; + tx_complete = true; }/* Check if the Transmission for the second buffer is completed */
@@ -695,7 +695,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)out_be32 (base_addr +XEL_BUFFER_OFFSET +XEL_TSR_OFFSET , tx_status); - tx_complete =1 ; + tx_complete = true; }/* If there was a Tx interrupt, call the Tx Handler */
drivers/net/wimax/i2400m/tx.c +4 -4
@@ -562,7 +562,7 @@ void i2400m_tx_new(struct i2400m *i2400m) {struct device *dev =i2400m_dev (i2400m);struct i2400m_msg_hdr *tx_msg; -bool try_head =0 ; +bool try_head = false;BUG_ON (i2400m->tx_msg !=NULL );/* * In certain situations, TX queue might have enough space to
@@ -580,7 +580,7 @@ try_head:else if (tx_msg ==TAIL_FULL ) {i2400m_tx_skip_tail (i2400m);d_printf (2 , dev,"new TX message: tail full, trying head\n" ); - try_head =1 ; + try_head = true; goto try_head; }memset (tx_msg,0 ,I2400M_TX_PLD_SIZE );
@@ -720,7 +720,7 @@ int i2400m_tx(struct i2400m *i2400m, const void *buf, size_t buf_len,unsigned long flags;size_t padded_len;void *ptr; -bool try_head =0 ; +bool try_head = false;unsigned is_singleton = pl_type ==I2400M_PT_RESET_WARM || pl_type ==I2400M_PT_RESET_COLD ;
@@ -771,7 +771,7 @@ try_new:d_printf (2 , dev,"pl append: tail full\n" );i2400m_tx_close (i2400m);i2400m_tx_skip_tail (i2400m); - try_head =1 ; + try_head = true; goto try_new; }else if (ptr ==NULL ) {/* All full */ result = -ENOSPC ;
drivers/net/wireless/ath/ath5k/reset.c +2 -2
@@ -1159,7 +1159,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,*/ if (fast && (ah->ah_radio !=AR5K_RF2413 ) && (ah->ah_radio !=AR5K_RF5413 )) - fast =0 ; + fast = false;/* Disable sleep clock operation * to avoid register access delay on certain
@@ -1185,7 +1185,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,if (ret && fast) {ATH5K_DBG (ah,ATH5K_DEBUG_RESET ,"DMA didn't stop, falling back to normal reset\n" ); - fast =0 ; + fast = false;/* Non fatal, just continue with * normal reset */ ret =0 ;
drivers/net/wireless/ath/ath6kl/init.c +1 -1
@@ -361,7 +361,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)ath6kl_dbg (ATH6KL_DBG_TRC ,"failed to request P2P " "capabilities (%d) - assuming P2P not " "supported\n" , ret); - ar->p2p =0 ; + ar->p2p = false; } }
drivers/net/wireless/ath/ath9k/eeprom_def.c +1 -1
@@ -385,7 +385,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)if ((ah->hw_version.devid ==AR9280_DEVID_PCI ) && ((eep->baseEepHeader.version &0xff ) >0x0a ) && (eep->baseEepHeader.pwdclkind ==0 )) - ah->need_an_top2_fixup =1 ; + ah->need_an_top2_fixup = true;if ((common->bus_ops->ath_bus_type ==ATH_USB ) && (AR_SREV_9280 (ah)))
drivers/net/wireless/ath/ath9k/xmit.c +2 -2
@@ -1929,7 +1929,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,if (txq == sc->tx.txq_map[q] && ++txq->pending_frames >ATH_MAX_QDEPTH && !txq->stopped) {ieee80211_stop_queue (sc->hw, q); - txq->stopped =1 ; + txq->stopped = true; }ath_tx_start_dma (sc, skb, txctl);
@@ -1986,7 +1986,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,if (txq->stopped && txq->pending_frames <ATH_MAX_QDEPTH ) {ieee80211_wake_queue (sc->hw, q); - txq->stopped =0 ; + txq->stopped = false; } }
drivers/net/wireless/b43/dma.c +7 -7
@@ -890,7 +890,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,else ring->ops = &dma32_ops;if (for_tx) { - ring->tx =1 ; + ring->tx = true; ring->current_slot =-1 ; }else {if (ring->index ==0 ) {
@@ -1061,7 +1061,7 @@ void b43_dma_free(struct b43_wldev *dev)static int b43_dma_set_mask (struct b43_wldev *dev,u64 mask) {u64 orig_mask = mask; -bool fallback =0 ; +bool fallback = false;int err;/* Try to set the DMA mask. If it fails, try falling back to a
@@ -1075,12 +1075,12 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) }if (mask ==DMA_BIT_MASK (64 )) { mask =DMA_BIT_MASK (32 ); - fallback =1 ; + fallback = true;continue ; }if (mask ==DMA_BIT_MASK (32 )) { mask =DMA_BIT_MASK (30 ); - fallback =1 ; + fallback = true;continue ; } b43err(dev->wl, "The machine/kernel does not support "
@@ -1307,7 +1307,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,memset (meta,0 ,sizeof (*meta)); meta->skb = skb; - meta->is_last_fragment =1 ; + meta->is_last_fragment = true; priv_info->bouncebuffer =NULL ; meta->dmaaddr =map_descbuffer (ring, skb->data, skb->len,1 );
@@ -1466,7 +1466,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb) should_inject_overflow(ring)) {/* This TX ring is full. */ ieee80211_stop_queue (dev->wl->hw,skb_get_queue_mapping (skb)); - ring->stopped =1 ; + ring->stopped = true;if (b43_debug (dev,B43_DBG_DMAVERBOSE )) {b43dbg (dev->wl,"Stopped TX ring %d\n" , ring->index); }
@@ -1585,7 +1585,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,if (ring->stopped) {B43_WARN_ON (free_slots (ring) <TX_SLOTS_PER_FRAME );ieee80211_wake_queue (dev->wl->hw, ring->queue_prio); - ring->stopped =0 ; + ring->stopped = false;if (b43_debug (dev,B43_DBG_DMAVERBOSE )) {b43dbg (dev->wl,"Woke up TX ring %d\n" , ring->index); }
drivers/net/wireless/b43/leds.c +8 -8
@@ -74,7 +74,7 @@ static void b43_led_update(struct b43_wldev *dev,if (radio_enabled) turn_on =atomic_read (&led->state) !=LED_OFF ;else - turn_on =0 ; + turn_on = false;if (turn_on == led->hw_state)return ; led->hw_state = turn_on;
@@ -225,11 +225,11 @@ static void b43_led_get_sprominfo(struct b43_wldev *dev,if (sprom[led_index] ==0xFF ) {/* There is no LED information in the SPROM * for this LED. Hardcode it here. */ - *activelow =0 ; + *activelow = false;switch (led_index) {case 0 : *behaviour =B43_LED_ACTIVITY ; - *activelow =1 ; + *activelow = true;if (dev->dev->board_vendor ==PCI_VENDOR_ID_COMPAQ ) *behaviour =B43_LED_RADIO_ALL ;break ;
@@ -267,11 +267,11 @@ void b43_leds_init(struct b43_wldev *dev)if (led->wl) {if (dev->phy.radio_on &&b43_is_hw_radio_enabled (dev)) {b43_led_turn_on (dev, led->index, led->activelow); - led->hw_state =1 ; + led->hw_state = true;atomic_set (&led->state,1 ); }else {b43_led_turn_off (dev, led->index, led->activelow); - led->hw_state =0 ; + led->hw_state = false;atomic_set (&led->state,0 ); } }
@@ -280,19 +280,19 @@ void b43_leds_init(struct b43_wldev *dev) led = &dev->wl->leds.led_tx;if (led->wl) {b43_led_turn_off (dev, led->index, led->activelow); - led->hw_state =0 ; + led->hw_state = false;atomic_set (&led->state,0 ); } led = &dev->wl->leds.led_rx;if (led->wl) {b43_led_turn_off (dev, led->index, led->activelow); - led->hw_state =0 ; + led->hw_state = false;atomic_set (&led->state,0 ); } led = &dev->wl->leds.led_assoc;if (led->wl) {b43_led_turn_off (dev, led->index, led->activelow); - led->hw_state =0 ; + led->hw_state = false;atomic_set (&led->state,0 ); }
drivers/net/wireless/b43/lo.c +4 -4
@@ -826,7 +826,7 @@ void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all)const struct b43_rfatt *rfatt;const struct b43_bbatt *bbatt;u64 power_vector; -bool table_changed =0 ; +bool table_changed = false;BUILD_BUG_ON (B43_DC_LT_SIZE !=32 );B43_WARN_ON (lo->rfatt_list.len * lo->bbatt_list.len >64 );
@@ -876,7 +876,7 @@ void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all) lo->dc_lt[idx] = (lo->dc_lt[idx] &0xFF00 ) | (val &0x00FF ); } - table_changed =1 ; + table_changed = true; }if (table_changed) {/* The table changed in memory. Update the hardware table. */
@@ -938,7 +938,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)unsigned long now;unsigned long expire;struct b43_lo_calib *cal, *tmp; -bool current_item_expired =0 ; +bool current_item_expired = false;bool hwpctl;if (!lo)
@@ -968,7 +968,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)if (b43_compare_bbatt (&cal->bbatt, &gphy->bbatt) &&b43_compare_rfatt (&cal->rfatt, &gphy->rfatt)) {B43_WARN_ON (current_item_expired); - current_item_expired =1 ; + current_item_expired = true; }if (b43_debug (dev,B43_DBG_LO )) { b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
drivers/net/wireless/b43/main.c +50 -50
316 lines not on this page · raw message
drivers/net/wireless/b43/phy_common.c +4 -4
@@ -145,7 +145,7 @@ void b43_radio_lock(struct b43_wldev *dev)#if B43_DEBUG B43_WARN_ON (dev->phy.radio_locked); - dev->phy.radio_locked =1 ; + dev->phy.radio_locked = true;#endif macctl =b43_read32 (dev,B43_MMIO_MACCTL );
@@ -163,7 +163,7 @@ void b43_radio_unlock(struct b43_wldev *dev)#if B43_DEBUG B43_WARN_ON (!dev->phy.radio_locked); - dev->phy.radio_locked =0 ; + dev->phy.radio_locked = false;#endif /* Commit any write */
@@ -178,7 +178,7 @@ void b43_phy_lock(struct b43_wldev *dev) {#if B43_DEBUG B43_WARN_ON (dev->phy.phy_locked); - dev->phy.phy_locked =1 ; + dev->phy.phy_locked = true;#endif B43_WARN_ON (dev->dev->core_rev <3 );
@@ -190,7 +190,7 @@ void b43_phy_unlock(struct b43_wldev *dev) {#if B43_DEBUG B43_WARN_ON (!dev->phy.phy_locked); - dev->phy.phy_locked =0 ; + dev->phy.phy_locked = false;#endif B43_WARN_ON (dev->dev->core_rev <3 );
drivers/net/wireless/b43/phy_g.c +17 -17
@@ -897,7 +897,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)if (b43_phy_read (dev,0x0033 ) &0x0800 )break ; - gphy->aci_enable =1 ; + gphy->aci_enable = true;phy_stacksave (B43_PHY_RADIO_BITFIELD );phy_stacksave (B43_PHY_G_CRS );
@@ -1038,7 +1038,7 @@ b43_radio_interference_mitigation_disable(struct b43_wldev *dev, int mode)if (!(b43_phy_read (dev,0x0033 ) &0x0800 ))break ; - gphy->aci_enable =0 ; + gphy->aci_enable = false;phy_stackrestore (B43_PHY_RADIO_BITFIELD );phy_stackrestore (B43_PHY_G_CRS );
@@ -1956,10 +1956,10 @@ static void b43_phy_init_pctl(struct b43_wldev *dev) bbatt.att =11 ;if (phy->radio_rev ==8 ) { rfatt.att =15 ; - rfatt.with_padmix =1 ; + rfatt.with_padmix = true; }else { rfatt.att =9 ; - rfatt.with_padmix =0 ; + rfatt.with_padmix = false; }b43_set_txpower_g (dev, &bbatt, &rfatt,0 ); }
@@ -2137,7 +2137,7 @@ static void default_radio_attenuation(struct b43_wldev *dev,struct b43_bus_dev *bdev = dev->dev;struct b43_phy *phy = &dev->phy; - rf->with_padmix =0 ; + rf->with_padmix = false;if (dev->dev->board_vendor ==SSB_BOARDVENDOR_BCM && dev->dev->board_type ==SSB_BOARD_BCM4309G ) {
@@ -2221,7 +2221,7 @@ static void default_radio_attenuation(struct b43_wldev *dev,return ;case 8 : rf->att =0xA ; - rf->with_padmix =1 ; + rf->with_padmix = true;return ;case 9 :default :
@@ -2389,7 +2389,7 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev)B43_WARN_ON ((dev->dev->chip_id ==0x4301 ) && (phy->radio_ver !=0x2050 ));/* Not supported anymore */ - gphy->dyn_tssi_tbl =0 ; + gphy->dyn_tssi_tbl = false;if (pab0 !=0 && pab1 !=0 && pab2 !=0 && pab0 !=-1 && pab1 !=-1 && pab2 !=-1 ) {
@@ -2404,7 +2404,7 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev) pab1, pab2);if (!gphy->tssi2dbm)return -ENOMEM ; - gphy->dyn_tssi_tbl =1 ; + gphy->dyn_tssi_tbl = true; }else {/* pabX values not set in SPROM. */ gphy->tgt_idle_tssi =52 ;
@@ -2504,7 +2504,7 @@ static void b43_gphy_op_free(struct b43_wldev *dev)if (gphy->dyn_tssi_tbl)kfree (gphy->tssi2dbm); - gphy->dyn_tssi_tbl =0 ; + gphy->dyn_tssi_tbl = false; gphy->tssi2dbm =NULL ;kfree (gphy);
@@ -2531,10 +2531,10 @@ static int b43_gphy_op_prepare_hardware(struct b43_wldev *dev)if (phy->rev ==1 ) {/* Workaround: Temporarly disable gmode through the early init * phase, as the gmode stuff is not needed for phy rev 1 */ - phy->gmode =0 ; + phy->gmode = false;b43_wireless_core_reset (dev,0 );b43_phy_initg (dev); - phy->gmode =1 ; + phy->gmode = true;b43_wireless_core_reset (dev,1 ); }
@@ -2613,7 +2613,7 @@ static void b43_gphy_op_software_rfkill(struct b43_wldev *dev, gphy->radio_off_context.rfover);b43_phy_write (dev,B43_PHY_RFOVERVAL , gphy->radio_off_context.rfoverval); - gphy->radio_off_context.valid =0 ; + gphy->radio_off_context.valid = false; } channel = phy->channel;b43_gphy_channel_switch (dev,6 ,1 );
@@ -2626,7 +2626,7 @@ static void b43_gphy_op_software_rfkill(struct b43_wldev *dev, rfoverval =b43_phy_read (dev,B43_PHY_RFOVERVAL ); gphy->radio_off_context.rfover = rfover; gphy->radio_off_context.rfoverval = rfoverval; - gphy->radio_off_context.valid =1 ; + gphy->radio_off_context.valid = true;b43_phy_write (dev,B43_PHY_RFOVER , rfover |0x008C );b43_phy_write (dev,B43_PHY_RFOVERVAL , rfoverval &0xFF73 ); }
@@ -2711,10 +2711,10 @@ static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,if ((phy->rev ==0 ) || (!phy->gmode))return -ENODEV ; - gphy->aci_wlan_automatic =0 ; + gphy->aci_wlan_automatic = false;switch (mode) {case B43_INTERFMODE_AUTOWLAN : - gphy->aci_wlan_automatic =1 ; + gphy->aci_wlan_automatic = true;if (gphy->aci_enable) mode =B43_INTERFMODE_MANUALWLAN ;else
@@ -2735,8 +2735,8 @@ static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,b43_radio_interference_mitigation_disable (dev, currentmode);if (mode ==B43_INTERFMODE_NONE ) { - gphy->aci_enable =0 ; - gphy->aci_hw_rssi =0 ; + gphy->aci_enable = false; + gphy->aci_hw_rssi = false; }else b43_radio_interference_mitigation_enable (dev, mode); gphy->interfmode = mode;
drivers/net/wireless/b43/phy_lp.c +4 -4
@@ -736,9 +736,9 @@ static void lpphy_set_deaf(struct b43_wldev *dev, bool user)struct b43_phy_lp *lpphy = dev->phy.lp;if (user) - lpphy->crs_usr_disable =1 ; + lpphy->crs_usr_disable = true;else - lpphy->crs_sys_disable =1 ; + lpphy->crs_sys_disable = true;b43_phy_maskset (dev,B43_LPPHY_CRSGAIN_CTL ,0xFF1F ,0x80 ); }
@@ -747,9 +747,9 @@ static void lpphy_clear_deaf(struct b43_wldev *dev, bool user)struct b43_phy_lp *lpphy = dev->phy.lp;if (user) - lpphy->crs_usr_disable =0 ; + lpphy->crs_usr_disable = false;else - lpphy->crs_sys_disable =0 ; + lpphy->crs_sys_disable = false;if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) {if (b43_current_band (dev->wl) ==IEEE80211_BAND_2GHZ )
drivers/net/wireless/b43/phy_n.c +2 -2
@@ -3375,7 +3375,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,if (dev->phy.rev >=4 ) { avoid = nphy->hang_avoid; - nphy->hang_avoid =0 ; + nphy->hang_avoid = false; }b43_ntab_read_bulk (dev,B43_NTAB16 (7 ,0x110 ),2 , save);
@@ -3485,7 +3485,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,if (phy6or5x && updated[core] ==0 ) {b43_nphy_update_tx_cal_ladder (dev, core); - updated[core] =1 ; + updated[core] = true; } tmp = (params[core].ncorr[type] <<8 ) |0x66 ;
drivers/net/wireless/b43/pio.c +3 -3
@@ -539,7 +539,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)/* Not enough memory on the queue. */ err = -EBUSY ;ieee80211_stop_queue (dev->wl->hw,skb_get_queue_mapping (skb)); - q->stopped =1 ; + q->stopped = true; goto out; }
@@ -566,7 +566,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) (q->free_packet_slots == 0)) {/* The queue is full. */ ieee80211_stop_queue (dev->wl->hw,skb_get_queue_mapping (skb)); - q->stopped =1 ; + q->stopped = true; } out:
@@ -601,7 +601,7 @@ void b43_pio_handle_txstatus(struct b43_wldev *dev,if (q->stopped) {ieee80211_wake_queue (dev->wl->hw, q->queue_prio); - q->stopped =0 ; + q->stopped = false; } }
drivers/net/wireless/b43/xmit.c +2 -2
@@ -874,7 +874,7 @@ bool b43_fill_txstatus_report(struct b43_wldev *dev,struct ieee80211_tx_info *report, const struct b43_txstatus *status) { - bool frame_success = 1; + bool frame_success = true;int retry_limit;/* preserve the confiured retry limit before clearing the status
@@ -890,7 +890,7 @@ bool b43_fill_txstatus_report(struct b43_wldev *dev,/* The frame was not ACKed... */ if (!(report->flags &IEEE80211_TX_CTL_NO_ACK )) {/* ...but we expected an ACK. */ - frame_success =0 ; + frame_success = false; } }if (status->frame_count ==0 ) {
drivers/net/wireless/b43legacy/dma.c +8 -8
@@ -715,7 +715,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev, ring->mmio_base =b43legacy_dmacontroller_base (type, controller_index); ring->index = controller_index;if (for_tx) { - ring->tx =1 ; + ring->tx = true; ring->current_slot =-1 ; }else {if (ring->index ==0 ) {
@@ -806,7 +806,7 @@ void b43legacy_dma_free(struct b43legacy_wldev *dev)static int b43legacy_dma_set_mask (struct b43legacy_wldev *dev,u64 mask) {u64 orig_mask = mask; -bool fallback =0 ; +bool fallback = false;int err;/* Try to set the DMA mask. If it fails, try falling back to a
@@ -820,12 +820,12 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask) }if (mask ==DMA_BIT_MASK (64 )) { mask =DMA_BIT_MASK (32 ); - fallback =1 ; + fallback = true;continue ; }if (mask ==DMA_BIT_MASK (32 )) { mask =DMA_BIT_MASK (30 ); - fallback =1 ; + fallback = true;continue ; } b43legacyerr(dev->wl, "The machine/kernel does not support "
@@ -858,7 +858,7 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev)#ifdef CONFIG_B43LEGACY_PIO b43legacywarn (dev->wl,"DMA for this device not supported. " "Falling back to PIO\n" ); - dev->__using_pio =1 ; + dev->__using_pio = true;return -EAGAIN ;#else b43legacyerr(dev->wl, "DMA for this device not supported and "
@@ -1068,7 +1068,7 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,memset (meta,0 ,sizeof (*meta)); meta->skb = skb; - meta->is_last_fragment =1 ; + meta->is_last_fragment = true; meta->dmaaddr =map_descbuffer (ring, skb->data, skb->len,1 );/* create a bounce buffer in zone_dma on mapping failure. */
@@ -1187,7 +1187,7 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, should_inject_overflow(ring)) {/* This TX ring is full. */ ieee80211_stop_queue (dev->wl->hw,txring_to_priority (ring)); - ring->stopped =1 ; + ring->stopped = true;if (b43legacy_debug (dev, B43legacy_DBG_DMAVERBOSE))b43legacydbg (dev->wl,"Stopped TX ring %d\n" , ring->index);
@@ -1286,7 +1286,7 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev,if (ring->stopped) {B43legacy_WARN_ON (free_slots (ring) <SLOTS_PER_PACKET );ieee80211_wake_queue (dev->wl->hw,txring_to_priority (ring)); - ring->stopped =0 ; + ring->stopped = false;if (b43legacy_debug (dev, B43legacy_DBG_DMAVERBOSE))b43legacydbg (dev->wl,"Woke up TX ring %d\n" , ring->index);
drivers/net/wireless/b43legacy/leds.c +2 -2
@@ -203,11 +203,11 @@ void b43legacy_leds_init(struct b43legacy_wldev *dev)if (sprom[i] ==0xFF ) {/* There is no LED information in the SPROM * for this LED. Hardcode it here. */ - activelow =0 ; + activelow = false;switch (i) {case 0 : behaviour = B43legacy_LED_ACTIVITY; - activelow =1 ; + activelow = true;if (bus->boardinfo.vendor ==PCI_VENDOR_ID_COMPAQ ) behaviour = B43legacy_LED_RADIO_ALL;break ;
drivers/net/wireless/b43legacy/main.c +32 -32
199 lines not on this page · raw message
drivers/net/wireless/b43legacy/radio.c +10 -10
@@ -1067,7 +1067,7 @@ b43legacy_radio_interference_mitigation_enable(struct b43legacy_wldev *dev,if (b43legacy_phy_read (dev,0x0033 ) &0x0800 )break ; - phy->aci_enable =1 ; + phy->aci_enable = true;phy_stacksave (B43legacy_PHY_RADIO_BITFIELD);phy_stacksave (B43legacy_PHY_G_CRS);
@@ -1279,7 +1279,7 @@ b43legacy_radio_interference_mitigation_disable(struct b43legacy_wldev *dev,if (!(b43legacy_phy_read (dev,0x0033 ) &0x0800 ))break ; - phy->aci_enable =0 ; + phy->aci_enable = false;phy_stackrestore (B43legacy_PHY_RADIO_BITFIELD);phy_stackrestore (B43legacy_PHY_G_CRS);
@@ -1346,10 +1346,10 @@ int b43legacy_radio_set_interference_mitigation(struct b43legacy_wldev *dev, (phy->rev == 0) || (!phy->gmode))return -ENODEV ; - phy->aci_wlan_automatic =0 ; + phy->aci_wlan_automatic = false;switch (mode) {case B43legacy_RADIO_INTERFMODE_AUTOWLAN: - phy->aci_wlan_automatic =1 ; + phy->aci_wlan_automatic = true;if (phy->aci_enable) mode = B43legacy_RADIO_INTERFMODE_MANUALWLAN;else
@@ -1371,8 +1371,8 @@ int b43legacy_radio_set_interference_mitigation(struct b43legacy_wldev *dev, currentmode);if (mode == B43legacy_RADIO_INTERFMODE_NONE) { - phy->aci_enable =0 ; - phy->aci_hw_rssi =0 ; + phy->aci_enable = false; + phy->aci_hw_rssi = false; }else b43legacy_radio_interference_mitigation_enable (dev, mode); phy->interfmode = mode;
@@ -2102,7 +2102,7 @@ void b43legacy_radio_turn_on(struct b43legacy_wldev *dev) phy->radio_off_context.rfover);b43legacy_phy_write (dev, B43legacy_PHY_RFOVERVAL, phy->radio_off_context.rfoverval); - phy->radio_off_context.valid =0 ; + phy->radio_off_context.valid = false; } channel = phy->channel; err = b43legacy_radio_selectchannel(dev,
@@ -2113,7 +2113,7 @@ void b43legacy_radio_turn_on(struct b43legacy_wldev *dev)default :B43legacy_BUG_ON (1 ); } - phy->radio_on =1 ; + phy->radio_on = true; }void b43legacy_radio_turn_off (struct b43legacy_wldev *dev,bool force)
@@ -2131,14 +2131,14 @@ void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force)if (!force) { phy->radio_off_context.rfover = rfover; phy->radio_off_context.rfoverval = rfoverval; - phy->radio_off_context.valid =1 ; + phy->radio_off_context.valid = true; }b43legacy_phy_write (dev, B43legacy_PHY_RFOVER, rfover |0x008C );b43legacy_phy_write (dev, B43legacy_PHY_RFOVERVAL, rfoverval &0xFF73 ); }else b43legacy_phy_write (dev,0x0015 ,0xAA00 ); - phy->radio_on =0 ; + phy->radio_on = false;b43legacydbg (dev->wl,"Radio initialized\n" ); }
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +2 -2
@@ -805,7 +805,7 @@ static int brcmf_netdev_stop(struct net_device *ndev)return 0 ;/* Set state and stop OS transmissions */ - drvr->up =0 ; + drvr->up = false;netif_stop_queue (ndev);return 0 ;
@@ -842,7 +842,7 @@ static int brcmf_netdev_open(struct net_device *ndev) }/* Allow transmit calls */ netif_start_queue (ndev); - drvr_priv->pub.up =1 ; + drvr_priv->pub.up = true;if (brcmf_cfg80211_up (drvr_priv->pub.config)) {brcmf_dbg (ERROR ,"failed to bring up cfg80211\n" );return -1 ;
drivers/net/wireless/brcm80211/brcmsmac/dma.c +2 -2
@@ -641,10 +641,10 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,/* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ if ((core->id.id ==SDIOD_CORE_ID ) && ((rev >0 ) && (rev <=2 ))) - di->addrext =0 ; + di->addrext = false;else if ((core->id.id ==I2S_CORE_ID ) && ((rev ==0 ) || (rev ==1 ))) - di->addrext =0 ; + di->addrext = false;else di->addrext =_dma_isaddrext (di);
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +1 -1
@@ -1265,7 +1265,7 @@ uint brcms_reset(struct brcms_info *wl)brcms_c_reset (wl->wlc);/* dpc will not be rescheduled */ - wl->resched =0 ; + wl->resched = false;return 0 ; }
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c +16 -16
@@ -1603,7 +1603,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, u16 chanspec)si_pmu_pllupd (pi->sh->sih);write_phy_reg (pi,0x942 ,0 );wlc_lcnphy_txrx_spur_avoidance_mode (pi, false); - pi_lcn->lcnphy_spurmod =0 ; + pi_lcn->lcnphy_spurmod = false;mod_phy_reg (pi,0x424 , (0xff <<8 ), (0x1b ) <<8 );write_phy_reg (pi,0x425 ,0x5907 );
@@ -1616,7 +1616,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, u16 chanspec)write_phy_reg (pi,0x942 ,0 );wlc_lcnphy_txrx_spur_avoidance_mode (pi, true); - pi_lcn->lcnphy_spurmod =0 ; + pi_lcn->lcnphy_spurmod = false;mod_phy_reg (pi,0x424 , (0xff <<8 ), (0x1f ) <<8 );write_phy_reg (pi,0x425 ,0x590a );
@@ -2325,7 +2325,7 @@ static s8 wlc_lcnphy_tempcompensated_txpwrctrl(struct brcms_phy *pi) {s8 index, delta_brd, delta_temp, new_index, tempcorrx;s16 manp, meas_temp, temp_diff; -bool neg =0 ; +bool neg = false;u16 temp;struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -2348,7 +2348,7 @@ static s8 wlc_lcnphy_tempcompensated_txpwrctrl(struct brcms_phy *pi) manp =LCNPHY_TEMPSENSE (pi_lcn->lcnphy_rawtempsense); temp_diff = manp - meas_temp;if (temp_diff <0 ) { - neg =1 ; + neg = true; temp_diff = -temp_diff; }
@@ -3682,8 +3682,8 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels,wlc_lcnphy_set_cc (pi, cal_type, phy_c15, phy_c16);udelay (20 );for (phy_c8 =0 ; phy_c7 !=0 && phy_c8 < num_levels; phy_c8++) { - phy_c23 =1 ; - phy_c22 =0 ; + phy_c23 = true; + phy_c22 = false;switch (cal_type) {case 0 : phy_c10 =511 ;
@@ -3701,18 +3701,18 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, phy_c9 =read_phy_reg (pi,0x93d ); phy_c9 =2 * phy_c9; - phy_c24 =0 ; + phy_c24 = false; phy_c5 =7 ; - phy_c25 =1 ; + phy_c25 = true;while (1 ) {write_radio_reg (pi,RADIO_2064_REG026 , (phy_c5 &0x7 ) | ((phy_c5 &0x7 ) <<4 ));udelay (50 ); - phy_c22 =0 ; + phy_c22 = false; ptr[130 ] =0 ;wlc_lcnphy_samp_cap (pi,1 , phy_c9, &ptr[0 ],2 );if (ptr[130 ] ==1 ) - phy_c22 =1 ; + phy_c22 = true;if (phy_c22) phy_c5 -=1 ;if ((phy_c22 != phy_c24) && (!phy_c25))
@@ -3722,7 +3722,7 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels,if (phy_c5 <=0 || phy_c5 >=7 )break ; phy_c24 = phy_c22; - phy_c25 =0 ; + phy_c25 = false; }if (phy_c5 <0 )
@@ -3773,10 +3773,10 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, phy_c13 = phy_c11; phy_c14 = phy_c12; } - phy_c23 =0 ; + phy_c23 = false; } } - phy_c23 =1 ; + phy_c23 = true; phy_c15 = phy_c13; phy_c16 = phy_c14; phy_c7 = phy_c7 >>1 ;
@@ -3966,7 +3966,7 @@ s16 wlc_lcnphy_tempsense_new(struct brcms_phy *pi, bool mode) {u16 tempsenseval1, tempsenseval2;s16 avg =0 ; -bool suspend =0 ; +bool suspend = false;if (mode ==1 ) { suspend = (0 == (bcma_read32(pi->d11core,
@@ -4008,7 +4008,7 @@ u16 wlc_lcnphy_tempsense(struct brcms_phy *pi, bool mode) {u16 tempsenseval1, tempsenseval2;s32 avg =0 ; -bool suspend =0 ; +bool suspend = false;u16 SAVE_txpwrctrl =wlc_lcnphy_get_tx_pwr_ctrl (pi);struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy;
@@ -4076,7 +4076,7 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy *pi, bool mode) {u16 vbatsenseval;s32 avg =0 ; -bool suspend =0 ; +bool suspend = false;if (mode ==1 ) { suspend = (0 == (bcma_read32(pi->d11core,
drivers/net/wireless/iwmc3200wifi/main.c +1 -1
@@ -130,7 +130,7 @@ static void iwm_disconnect_work(struct work_struct *work)iwm_invalidate_mlme_profile (iwm);clear_bit (IWM_STATUS_ASSOCIATED , &iwm->status); - iwm->umac_profile_active =0 ; + iwm->umac_profile_active = false;memset (iwm->bssid,0 ,ETH_ALEN ); iwm->channel =0 ;
drivers/net/wireless/iwmc3200wifi/rx.c +6 -6
@@ -660,7 +660,7 @@ static int iwm_mlme_profile_invalidate(struct iwm_priv *iwm, u8 *buf,clear_bit (IWM_STATUS_SME_CONNECTING , &iwm->status);clear_bit (IWM_STATUS_ASSOCIATED , &iwm->status); - iwm->umac_profile_active =0 ; + iwm->umac_profile_active = false;memset (iwm->bssid,0 ,ETH_ALEN ); iwm->channel =0 ;
@@ -735,7 +735,7 @@ static int iwm_mlme_update_sta_table(struct iwm_priv *iwm, u8 *buf, umac_sta->mac_addr, umac_sta->flags & UMAC_STA_FLAG_QOS); - sta->valid =1 ; + sta->valid = true; sta->qos = umac_sta->flags &UMAC_STA_FLAG_QOS ; sta->color =GET_VAL8 (umac_sta->sta_id,LMAC_STA_COLOR );memcpy (sta->addr, umac_sta->mac_addr,ETH_ALEN );
@@ -750,12 +750,12 @@ static int iwm_mlme_update_sta_table(struct iwm_priv *iwm, u8 *buf, sta = &iwm->sta_table[GET_VAL8 (umac_sta->sta_id,LMAC_STA_ID )];if (!memcmp (sta->addr, umac_sta->mac_addr,ETH_ALEN )) - sta->valid =0 ; + sta->valid = false;break ;case UMAC_OPCODE_CLEAR_ALL :for (i =0 ; i <IWM_STA_TABLE_NUM ; i++) - iwm->sta_table[i].valid =0 ; + iwm->sta_table[i].valid = false;break ;default :
@@ -1203,7 +1203,7 @@ static int iwm_ntf_wifi_if_wrapper(struct iwm_priv *iwm, u8 *buf,switch (hdr->oid) {case UMAC_WIFI_IF_CMD_SET_PROFILE : - iwm->umac_profile_active =1 ; + iwm->umac_profile_active = true;break ;default :break ;
@@ -1363,7 +1363,7 @@ static int iwm_rx_handle_nonwifi(struct iwm_priv *iwm, u8 *buf,*/ list_for_each_entry (cmd, &iwm->nonwifi_pending_cmd, pending)if (cmd->seq_num == seq_num) { - cmd->resp_received =1 ; + cmd->resp_received = true; cmd->buf.len = buf_size;memcpy (cmd->buf.hdr, buf, buf_size);wake_up_interruptible (&iwm->nonwifi_queue);
drivers/net/wireless/libertas/if_cs.c +2 -2
@@ -859,7 +859,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)* Most of the libertas cards can do unaligned register access, but some * weird ones cannot. That's especially true for the CF8305 card. */ - card->align_regs =0 ; + card->align_regs = false; card->model =get_model (p_dev->manf_id, p_dev->card_id);if (card->model ==MODEL_UNKNOWN ) {
@@ -871,7 +871,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)/* Check if we have a current silicon */ prod_id =if_cs_read8 (card,IF_CS_PRODUCT_ID );if (card->model ==MODEL_8305 ) { - card->align_regs =1 ; + card->align_regs = true;if (prod_id <IF_CS_CF8305_B1_REV ) {pr_err ("8305 rev B0 and older are not supported\n" ); ret = -ENODEV ;
drivers/net/wireless/libertas_tf/main.c +2 -2
@@ -719,11 +719,11 @@ void lbtf_bcn_sent(struct lbtf_private *priv)return ;if (skb_queue_empty (&priv->bc_ps_buf)) { -bool tx_buff_bc =0 ; +bool tx_buff_bc = false;while ((skb =ieee80211_get_buffered_bc (priv->hw, priv->vif))) {skb_queue_tail (&priv->bc_ps_buf, skb); - tx_buff_bc =1 ; + tx_buff_bc = true; }if (tx_buff_bc) {ieee80211_stop_queues (priv->hw);
drivers/net/wireless/mac80211_hwsim.c +2 -2
@@ -708,7 +708,7 @@ static int mac80211_hwsim_start(struct ieee80211_hw *hw) {struct mac80211_hwsim_data *data = hw->priv;wiphy_debug (hw->wiphy,"%s\n" , __func__); - data->started =1 ; + data->started = true;return 0 ; }
@@ -716,7 +716,7 @@ static int mac80211_hwsim_start(struct ieee80211_hw *hw)static void mac80211_hwsim_stop (struct ieee80211_hw *hw) {struct mac80211_hwsim_data *data = hw->priv; - data->started =0 ; + data->started = false;del_timer (&data->beacon_timer);wiphy_debug (hw->wiphy,"%s\n" , __func__); }
drivers/net/wireless/mwl8k.c +4 -4
@@ -738,10 +738,10 @@ static int mwl8k_load_firmware(struct ieee80211_hw *hw) ready_code =ioread32 (priv->regs +MWL8K_HIU_INT_CODE );if (ready_code ==MWL8K_FWAP_READY ) { - priv->ap_fw =1 ; + priv->ap_fw = true;break ; }else if (ready_code ==MWL8K_FWSTA_READY ) { - priv->ap_fw =0 ; + priv->ap_fw = false;break ; }
@@ -5517,8 +5517,8 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)INIT_LIST_HEAD (&priv->vif_list);/* Set default radio state and preamble */ - priv->radio_on =0 ; - priv->radio_short_preamble =0 ; + priv->radio_on = false; + priv->radio_short_preamble = false;/* Finalize join worker */ INIT_WORK (&priv->finalize_join_worker, mwl8k_finalize_join_worker);
drivers/net/wireless/rtlwifi/base.c +1 -1
@@ -396,7 +396,7 @@ void rtl_init_rfkill(struct ieee80211_hw *hw)u8 valid =0 ;/*set init state to on */ - rtlpriv->rfkill.rfkill_state =1 ; + rtlpriv->rfkill.rfkill_state = true;wiphy_rfkill_set_hw_state (hw->wiphy,0 ); radio_state = rtlpriv->cfg->ops->radio_onoff_checking (hw, &valid);
drivers/net/wireless/rtlwifi/pci.c +3 -3
@@ -78,7 +78,7 @@ static void _rtl_pci_update_default_setting(struct ieee80211_hw *hw)u8 init_aspm; ppsc->reg_rfps_level =0 ; - ppsc->support_aspm =0 ; + ppsc->support_aspm = false;/*Update PCI ASPM setting */ ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm;
@@ -570,9 +570,9 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)if (ieee80211_is_nullfunc (fc)) {if (ieee80211_has_pm (fc)) { rtlpriv->mac80211.offchan_delay = true; - rtlpriv->psc.state_inap =1 ; + rtlpriv->psc.state_inap = true; }else { - rtlpriv->psc.state_inap =0 ; + rtlpriv->psc.state_inap = false; } }
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c +2 -2
@@ -98,9 +98,9 @@ int rtl92c_init_sw_vars(struct ieee80211_hw *hw)rtl8192ce_bt_reg_init (hw); - rtlpriv->dm.dm_initialgain_enable =1 ; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ; - rtlpriv->dm.disable_framebursting =0 ; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue =0 ; rtlpci->transmit_config =CFENDFORM |BIT (12 ) |BIT (13 );
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +1 -1
@@ -2436,7 +2436,7 @@ bool rtl92cu_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid) "%x\n", ppsc->hwradiooff, e_rfpowerstate_toset)); }if (actuallyset) { - ppsc->hwradiooff =1 ; + ppsc->hwradiooff = true;if (e_rfpowerstate_toset ==ERFON ) {if ((ppsc->reg_rfps_level &RT_RF_OFF_LEVL_ASPM ) &&RT_IN_PS_LEVEL (ppsc,RT_RF_OFF_LEVL_ASPM ))
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +2 -2
@@ -57,9 +57,9 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)const struct firmware *firmware;int err; - rtlpriv->dm.dm_initialgain_enable =1 ; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ; - rtlpriv->dm.disable_framebursting =0 ; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue =0 ; rtlpriv->dbg.global_debuglevel = rtlpriv->cfg->mod_params->debug; rtlpriv->rtlhal.pfirmware =vmalloc (0x4000 );
drivers/net/wireless/rtlwifi/rtl8192de/sw.c +2 -2
@@ -99,9 +99,9 @@ static int rtl92d_init_sw_vars(struct ieee80211_hw *hw) rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ; - rtlpriv->dm.disable_framebursting =0 ; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue =0 ; - rtlpriv->dm.useramask =1 ; + rtlpriv->dm.useramask = true;/* dual mac */ if (rtlpriv->rtlhal.current_bandtype ==BAND_ON_5G )
drivers/net/wireless/rtlwifi/rtl8192se/sw.c +2 -2
@@ -98,9 +98,9 @@ static int rtl92s_init_sw_vars(struct ieee80211_hw *hw)int err =0 ;u16 earlyrxthreshold =7 ; - rtlpriv->dm.dm_initialgain_enable =1 ; + rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_flag =0 ; - rtlpriv->dm.disable_framebursting =0 ; + rtlpriv->dm.disable_framebursting = false; rtlpriv->dm.thermalvalue =0 ; rtlpriv->dm.useramask = true;
net/caif/caif_usb.c +1 -1
@@ -179,7 +179,7 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what, &layer, &caif_usb_type.func);if (!pack_added)dev_add_pack (&caif_usb_type); - pack_added =1 ; + pack_added = true;strncpy (layer->name, dev->name,sizeof (layer->name) -1 );
net/dccp/feat.c +8 -8
@@ -490,8 +490,8 @@ static int dccp_feat_push_change(struct list_head *fn_list, u8 feat, u8 local, new->feat_num = feat; new->is_local = local; new->state =FEAT_INITIALISING ; - new->needs_confirm =0 ; - new->empty_confirm =0 ; + new->needs_confirm = false; + new->empty_confirm = false; new->val = *fval; new->needs_mandatory = mandatory;
@@ -517,12 +517,12 @@ static int dccp_feat_push_confirm(struct list_head *fn_list, u8 feat, u8 local, new->feat_num = feat; new->is_local = local; new->state =FEAT_STABLE ;/* transition in 6.6.2 */ - new->needs_confirm =1 ; + new->needs_confirm = true; new->empty_confirm = (fval ==NULL ); new->val.nn =0 ;/* zeroes the whole structure */ if (!new->empty_confirm) new->val = *fval; - new->needs_mandatory =0 ; + new->needs_mandatory = false;return 0 ; }
@@ -1155,7 +1155,7 @@ static u8 dccp_feat_change_recv(struct list_head *fn, u8 is_mandatory, u8 opt, }if (dccp_feat_reconcile (&entry->val, val, len, server, true)) { - entry->empty_confirm =0 ; + entry->empty_confirm = false; }else if (is_mandatory) {return DCCP_RESET_CODE_MANDATORY_ERROR ; }else if (entry->state ==FEAT_INITIALISING ) {
@@ -1171,10 +1171,10 @@ static u8 dccp_feat_change_recv(struct list_head *fn, u8 is_mandatory, u8 opt, defval =dccp_feat_default_value (feat);if (!dccp_feat_reconcile (&entry->val, &defval,1 , server, true))return DCCP_RESET_CODE_OPTION_ERROR ; - entry->empty_confirm =1 ; + entry->empty_confirm = true; } - entry->needs_confirm =1 ; - entry->needs_mandatory =0 ; + entry->needs_confirm = true; + entry->needs_mandatory = false; entry->state =FEAT_STABLE ;return 0 ;
net/dccp/options.c +1 -1
@@ -544,7 +544,7 @@ int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, }if (unlikely (val ==NULL || len ==0 )) - len = repeat_first =0 ; + len = repeat_first = false; tot_len =3 + repeat_first + len;if (DCCP_SKB_CB (skb)->dccpd_opt_len + tot_len >DCCP_MAX_OPT_LEN ) {
net/ipv4/tcp_timer.c +2 -2
@@ -171,13 +171,13 @@ static int tcp_write_timeout(struct sock *sk) {struct inet_connection_sock *icsk =inet_csk (sk);int retry_until; -bool do_reset, syn_set =0 ; +bool do_reset, syn_set = false;if ((1 << sk->sk_state) & (TCPF_SYN_SENT |TCPF_SYN_RECV )) {if (icsk->icsk_retransmits)dst_negative_advice (sk); retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; - syn_set =1 ; + syn_set = true; }else {if (retransmits_timed_out (sk, sysctl_tcp_retries1,0 ,0 )) {/* Black hole detection */
net/mac80211/rc80211_pid_algo.c +2 -2
@@ -318,7 +318,7 @@ rate_control_pid_rate_init(void *priv, struct ieee80211_supported_band *sband, rinfo[i].diff = i * pinfo->norm_offset; }for (i =1 ; i < sband->n_bitrates; i++) { - s =0 ; + s = false;for (j =0 ; j < sband->n_bitrates - i; j++)if (unlikely (sband->bitrates[rinfo[j].index].bitrate > sband->bitrates[rinfo[j +1 ].index].bitrate)) {
@@ -327,7 +327,7 @@ rate_control_pid_rate_init(void *priv, struct ieee80211_supported_band *sband, rinfo[j +1 ].index = tmp; rinfo[rinfo[j].index].rev_index = j; rinfo[rinfo[j +1 ].index].rev_index = j +1 ; - s =1 ; + s = true; }if (!s)break ;
net/mac80211/scan.c +1 -1
@@ -106,7 +106,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local,/* save the ERP value so that it is available at association time */ if (elems->erp_info && elems->erp_info_len >=1 ) { bss->erp_value = elems->erp_info[0 ]; - bss->has_erp_value =1 ; + bss->has_erp_value = true; }if (elems->tim) {
net/netfilter/ipvs/ip_vs_pe_sip.c +2 -2
@@ -108,7 +108,7 @@ static bool ip_vs_sip_ct_match(const struct ip_vs_conn_param *p, struct ip_vs_conn *ct) { -bool ret =0 ; +bool ret = false; if (ct->af == p->af && ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) &&
@@ -121,7 +121,7 @@ static bool ip_vs_sip_ct_match(const struct ip_vs_conn_param *p, ct->protocol == p->protocol && ct->pe_data && ct->pe_data_len == p->pe_data_len && !memcmp(ct->pe_data, p->pe_data, p->pe_data_len)) - ret =1 ; + ret = true; IP_VS_DBG_BUF(9, "SIP template match %s %s->%s:%d %s\n", ip_vs_proto_name(p->protocol),
net/rfkill/rfkill-regulator.c +3 -3
@@ -36,12 +36,12 @@ static int rfkill_regulator_set_block(void *data, bool blocked)if (blocked) {if (rfkill_data->reg_enabled) {regulator_disable (rfkill_data->vcc); - rfkill_data->reg_enabled =0 ; + rfkill_data->reg_enabled = false; } }else {if (!rfkill_data->reg_enabled) {regulator_enable (rfkill_data->vcc); - rfkill_data->reg_enabled =1 ; + rfkill_data->reg_enabled = true; } }
@@ -96,7 +96,7 @@ static int __devinit rfkill_regulator_probe(struct platform_device *pdev)if (regulator_is_enabled (vcc)) {dev_dbg (&pdev->dev,"Regulator already enabled\n" ); - rfkill_data->reg_enabled =1 ; + rfkill_data->reg_enabled = true; } rfkill_data->vcc = vcc; rfkill_data->rf_kill = rf_kill;
net/rxrpc/ar-ack.c +7 -7
@@ -195,7 +195,7 @@ static void rxrpc_resend(struct rxrpc_call *call) sp =rxrpc_skb (txb);if (sp->need_resend) { - sp->need_resend =0 ; + sp->need_resend = false;/* each Tx packet has a new serial number */ sp->hdr.serial =
@@ -216,7 +216,7 @@ static void rxrpc_resend(struct rxrpc_call *call) }if (time_after_eq (jiffies +1 , sp->resend_at)) { - sp->need_resend =1 ; + sp->need_resend = true; resend |=1 ; }else if (resend &2 ) {if (time_before (sp->resend_at, resend_at))
@@ -265,7 +265,7 @@ static void rxrpc_resend_timer(struct rxrpc_call *call)if (sp->need_resend) { ; }else if (time_after_eq (jiffies +1 , sp->resend_at)) { - sp->need_resend =1 ; + sp->need_resend = true; resend |=1 ; }else if (resend &2 ) {if (time_before (sp->resend_at, resend_at))
@@ -314,11 +314,11 @@ static int rxrpc_process_soft_ACKs(struct rxrpc_call *call,switch (sacks[loop]) {case RXRPC_ACK_TYPE_ACK : - sp->need_resend =0 ; + sp->need_resend = false; *p_txb |=1 ;break ;case RXRPC_ACK_TYPE_NACK : - sp->need_resend =1 ; + sp->need_resend = true; *p_txb &= ~1 ; resend =1 ;break ;
@@ -344,13 +344,13 @@ static int rxrpc_process_soft_ACKs(struct rxrpc_call *call,if (*p_txb &1 ) {/* packet must have been discarded */ - sp->need_resend =1 ; + sp->need_resend = true; *p_txb &= ~1 ; resend |=1 ; }else if (sp->need_resend) { ; }else if (time_after_eq (jiffies +1 , sp->resend_at)) { - sp->need_resend =1 ; + sp->need_resend = true; resend |=1 ; }else if (resend &2 ) {if (time_before (sp->resend_at, resend_at))
net/rxrpc/ar-output.c +2 -2
@@ -486,7 +486,7 @@ static void rxrpc_queue_packet(struct rxrpc_call *call, struct sk_buff *skb,_proto ("Tx DATA %%%u { #%u }" ,ntohl (sp->hdr.serial),ntohl (sp->hdr.seq)); - sp->need_resend =0 ; + sp->need_resend = false; sp->resend_at = jiffies + rxrpc_resend_timeout *HZ ;if (!test_and_set_bit (RXRPC_CALL_RUN_RTIMER , &call->flags)) {_debug ("run timer" );
@@ -508,7 +508,7 @@ static void rxrpc_queue_packet(struct rxrpc_call *call, struct sk_buff *skb,if (ret <0 ) {_debug ("need instant resend %d" , ret); - sp->need_resend =1 ; + sp->need_resend = true;rxrpc_instant_resend (call); }
Re: [PATCH 1/2] net: fix assignment of 0/1 to bool variables.
Applied.
PATCH 2/2 module_param: make bool parameters really bool (net & drivers/net)
In reply to David Millermodule_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick.
It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version.
(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).
drivers/net/caif/caif_serial.c +3 -3
@@ -38,15 +38,15 @@ MODULE_ALIAS_LDISC(N_CAIF);/*This list is protected by the rtnl lock. */ static LIST_HEAD (ser_list); -static int ser_loop; +static bool ser_loop;module_param (ser_loop, bool,S_IRUGO );MODULE_PARM_DESC (ser_loop,"Run in simulated loopback mode." ); -static int ser_use_stx =1 ; +static bool ser_use_stx = true;module_param (ser_use_stx, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_stx,"STX enabled or not." ); -static int ser_use_fcs =1 ; +static bool ser_use_fcs = true;module_param (ser_use_fcs, bool,S_IRUGO );MODULE_PARM_DESC (ser_use_fcs,"FCS enabled or not." );
drivers/net/caif/caif_spi.c +1 -1
@@ -35,7 +35,7 @@ MODULE_DESCRIPTION("CAIF SPI driver");/* Returns the number of padding bytes for alignment. */ #define PAD_POW2 (x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) -static int spi_loop; +static bool spi_loop;module_param (spi_loop, bool,S_IRUGO );MODULE_PARM_DESC (spi_loop,"SPI running in loopback mode." );
drivers/net/can/vcan.c +1 -1
@@ -63,7 +63,7 @@ MODULE_AUTHOR("Urs Thuermann <[email protected]>");* See Documentation/networking/can.txt for details. */ -static int echo;/* echo testing. Default: 0 (Off) */ +static bool echo;/* echo testing. Default: 0 (Off) */ module_param (echo, bool,S_IRUGO );MODULE_PARM_DESC (echo,"Echo sent frames (for testing). Default: 0 (Off)" );
drivers/net/ethernet/amd/amd8111e.h +2 -2
@@ -807,8 +807,8 @@ typedef enum {static int card_idx;static int speed_duplex[MAX_UNITS ] = {0 , }; -static int coalesce[MAX_UNITS ] = {1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 }; -static int dynamic_ipg[MAX_UNITS ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +static bool coalesce[MAX_UNITS ] = { [0 ...MAX_UNITS -1 ] = true }; +static bool dynamic_ipg[MAX_UNITS ] = { [0 ...MAX_UNITS -1 ] = false };static unsigned int chip_version;#endif /* _AMD8111E_H */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -243,7 +243,7 @@ module_param_array(intr_cnt, uint, NULL, 0644);MODULE_PARM_DESC (intr_cnt,"thresholds 1..3 for queue interrupt packet counters" ); -static int vf_acls; +static bool vf_acls;#ifdef CONFIG_PCI_IOV module_param (vf_acls, bool,0644 );
drivers/net/ethernet/dlink/de600.c +1 -1
@@ -59,7 +59,7 @@ static const char version[] = "de600.c: $Revision: 1.41-2.5 $, Bjorn Ekwall (bj#include "de600.h" -static unsigned int check_lost =1 ; +static bool check_lost = true;module_param (check_lost, bool,0 );MODULE_PARM_DESC (check_lost,"If set then check for unplugged de600" );
drivers/net/ethernet/mellanox/mlx4/fw.c +1 -1
@@ -49,7 +49,7 @@ enum {extern void __buggy_use_of_MLX4_GET (void );extern void __buggy_use_of_MLX4_PUT (void ); -static int enable_qos; +static bool enable_qos;module_param (enable_qos, bool,0444 );MODULE_PARM_DESC (enable_qos,"Enable Quality of Service support in the HCA (default: off)" );
drivers/net/ethernet/mellanox/mlx4/main.c +1 -1
@@ -121,7 +121,7 @@ MODULE_PARM_DESC(log_num_vlan, "Log2 max number of VLANs per ETH port (0-7)");/* Log2 max number of VLANs per ETH port (0-7) */ #define MLX4_LOG_NUM_VLANS 7 -static int use_prio; +static bool use_prio;module_param_named (use_prio, use_prio, bool,0444 );MODULE_PARM_DESC (use_prio,"Enable steering by VLAN priority on ETH ports " "(0/1, default 0)" );
drivers/net/ethernet/via/via-rhine.c +3 -2
@@ -35,6 +35,7 @@#define DRV_VERSION "1.5.0"#define DRV_RELDATE "2010-10-09" +#include <linux/types.h> /* A few user-configurable values. These may be modified when a driver module is loaded. */
@@ -55,7 +56,7 @@ static int rx_copybreak;/* Work-around for broken BIOSes: they are unable to get the chip back out of power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */ -static int avoid_D3; +static bool avoid_D3;/* * In case you are looking for 'options[]' or 'full_duplex[]', they
@@ -2322,7 +2323,7 @@ static int __init rhine_init(void)#endif if (dmi_check_system (rhine_dmi_table)) {/* these BIOSes fail at PXE boot if chip is in D3 */ - avoid_D3 =1 ; + avoid_D3 = true;pr_warn ("Broken BIOS detected, avoid_D3 enabled\n" ); }else if (avoid_D3)
drivers/net/irda/donauboe.c +1 -1
@@ -197,7 +197,7 @@ static char *driver_name = DRIVER_NAME;static int max_baud =4000000 ;#ifdef USE_PROBE -static int do_probe =0 ; +static bool do_probe = false;#endif
drivers/net/irda/smsc-ircc2.c +1 -1
@@ -79,7 +79,7 @@ MODULE_AUTHOR("Daniele Peri <[email protected]>");MODULE_DESCRIPTION ("SMC IrCC SIR/FIR controller driver" );MODULE_LICENSE ("GPL" ); -static int smsc_nopnp =1 ; +static bool smsc_nopnp = true;module_param_named (nopnp, smsc_nopnp, bool,0 );MODULE_PARM_DESC (nopnp,"Do not use PNP to detect controller settings, defaults to true" );
drivers/net/usb/pegasus.c +2 -2
@@ -55,8 +55,8 @@ static const char driver_name[] = "pegasus";#define BMSR_MEDIA (BMSR_10HALF | BMSR_10FULL | BMSR_100HALF | \ BMSR_100FULL | BMSR_ANEGCAPABLE) -static int loopback; -static int mii_mode; +static bool loopback; +static bool mii_mode;static char *devid;static struct usb_eth_dev usb_dev_id[] = {
drivers/net/usb/smsc75xx.c +1 -1
@@ -76,7 +76,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/usb/smsc95xx.c +1 -1
@@ -59,7 +59,7 @@ struct usb_context {struct usbnet *dev; }; -static int turbo_mode = true; +static bool turbo_mode = true;module_param (turbo_mode, bool,0644 );MODULE_PARM_DESC (turbo_mode,"Enable multiple frames per Rx transaction" );
drivers/net/virtio_net.c +1 -1
@@ -30,7 +30,7 @@static int napi_weight =128 ;module_param (napi_weight, int,0444 ); -static int csum =1 , gso =1 ; +static bool csum = true, gso = true;module_param (csum, bool,0444 );module_param (gso, bool,0444 );
drivers/net/wan/sbni.c +1 -1
@@ -155,7 +155,7 @@ static int emancipate( struct net_device * );static const char version[] ="Granch SBNI12 driver ver 5.0.1 Jun 22 2001 Denis I.Timofeev.\n" ; -static int skip_pci_probe__initdata =0 ; +static bool skip_pci_probe__initdata = false;static int scandone__initdata =0 ;static int num__initdata =0 ;
drivers/net/wan/sealevel.c +1 -1
@@ -362,7 +362,7 @@ static int io=0x238;static int txdma=1 ;static int rxdma=3 ;static int irq=5 ; -static int slow=0 ; +static bool slow=false;module_param (io, int,0 );MODULE_PARM_DESC (io,"The I/O base of the Sealevel card" );
drivers/net/wireless/ath/ath5k/ath5k.h +1 -1
@@ -914,7 +914,7 @@ enum ath5k_dmasize {*/ #define AR5K_KEYCACHE_SIZE 8 -extern int ath5k_modparam_nohwcrypt; +extern bool ath5k_modparam_nohwcrypt;/***********************\ HW RELATED DEFINITIONS
drivers/net/wireless/ath/ath5k/base.c +3 -3
@@ -68,15 +68,15 @@#define CREATE_TRACE_POINTS #include "trace.h" -int ath5k_modparam_nohwcrypt; +bool ath5k_modparam_nohwcrypt;module_param_named (nohwcrypt, ath5k_modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." ); -static int modparam_all_channels; +static bool modparam_all_channels;module_param_named (all_channels, modparam_all_channels, bool,S_IRUGO );MODULE_PARM_DESC (all_channels,"Expose all channels the device can use." ); -static int modparam_fastchanswitch; +static bool modparam_fastchanswitch;module_param_named (fastchanswitch, modparam_fastchanswitch, bool,S_IRUGO );MODULE_PARM_DESC (fastchanswitch,"Enable fast channel switching for AR2413/AR5413 radios." );
drivers/net/wireless/ath/carl9170/main.c +1 -1
@@ -48,7 +48,7 @@#include "carl9170.h" #include "cmd.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware crypto offload." );
drivers/net/wireless/iwmc3200wifi/main.c +2 -2
@@ -91,11 +91,11 @@ static struct iwm_conf def_iwm_conf = { .mac_addr = {0x00, 0x02, 0xb3, 0x01, 0x02, 0x03}, }; -static int modparam_reset; +static bool modparam_reset;module_param_named (reset, modparam_reset, bool,0644 );MODULE_PARM_DESC (reset,"reset on firmware errors (default 0 [not reset])" ); -static int modparam_wimax_enable =1 ; +static bool modparam_wimax_enable = true;module_param_named (wimax_enable, modparam_wimax_enable, bool,0644 );MODULE_PARM_DESC (wimax_enable,"Enable wimax core (default 1 [wimax enabled])" );
drivers/net/wireless/mwl8k.c +1 -1
@@ -31,7 +31,7 @@#define MWL8K_VERSION "0.12"/* Module parameters */ -static unsigned ap_mode_default; +static bool ap_mode_default;module_param (ap_mode_default, bool,0 );MODULE_PARM_DESC (ap_mode_default,"Set to 1 to make ap mode the default instead of sta mode" );
drivers/net/wireless/orinoco/main.c +1 -1
@@ -121,7 +121,7 @@ module_param(orinoco_debug, int, 0644);MODULE_PARM_DESC (orinoco_debug,"Debug level" );#endif -static int suppress_linkstatus;/* = 0 */ +static bool suppress_linkstatus;/* = 0 */ module_param (suppress_linkstatus, bool,0644 );MODULE_PARM_DESC (suppress_linkstatus,"Don't log link status changes" );
drivers/net/wireless/p54/main.c +1 -1
@@ -27,7 +27,7 @@#include "p54.h" #include "lmac.h" -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );MODULE_AUTHOR ("Michael Wu <[email protected]>" );
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
@@ -39,7 +39,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800pci.c +1 -1
@@ -50,7 +50,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt = false;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt2800usb.c +1 -1
@@ -45,7 +45,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt61pci.c +1 -1
@@ -41,7 +41,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt =0 ; +static bool modparam_nohwcrypt = false;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rt2x00/rt73usb.c +1 -1
@@ -40,7 +40,7 @@/* * Allow hardware encryption to be disabled. */ -static int modparam_nohwcrypt; +static bool modparam_nohwcrypt;module_param_named (nohwcrypt, modparam_nohwcrypt, bool,S_IRUGO );MODULE_PARM_DESC (nohwcrypt,"Disable hardware encryption." );
drivers/net/wireless/rtlwifi/wifi.h +1 -1
@@ -1488,7 +1488,7 @@ struct rtl_intf_ops {struct rtl_mod_params {/* default: 0 = using hardware encryption */ -int sw_crypto; +bool sw_crypto;/* default: 0 = DBG_EMERG (0)*/ int debug;
include/net/bluetooth/l2cap.h +1 -1
@@ -791,7 +791,7 @@ static inline __u8 __ctrl_size(struct l2cap_chan *chan)return L2CAP_ENH_HDR_SIZE -L2CAP_HDR_SIZE ; } -extern int disable_ertm; +extern bool disable_ertm;int l2cap_init_sockets (void );void l2cap_cleanup_sockets (void );
include/net/sctp/structs.h +1 -1
@@ -235,7 +235,7 @@ extern struct sctp_globals {/* Flag to indicate whether computing and verifying checksum * is disabled. */ -int checksum_disable; +bool checksum_disable;/* Threshold for rwnd update SACKS. Receive buffer shifted this many * bits is an indicator of when to send and window update SACK.
net/bluetooth/bnep/core.c +2 -2
@@ -56,8 +56,8 @@#define VERSION "1.3" -static int compress_src =1 ; -static int compress_dst =1 ; +static bool compress_src = true; +static bool compress_dst = true;static LIST_HEAD (bnep_session_list);static DECLARE_RWSEM (bnep_session_sem);
net/bluetooth/hci_event.c +1 -1
@@ -45,7 +45,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_le; +static bool enable_le;/* Handle HCI Event packets */
net/bluetooth/hci_sock.c +1 -1
@@ -49,7 +49,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -static int enable_mgmt; +static bool enable_mgmt;/* ----- HCI socket interface ----- */
net/bluetooth/l2cap_core.c +1 -1
@@ -56,7 +56,7 @@#include <net/bluetooth/l2cap.h> #include <net/bluetooth/smp.h> -int disable_ertm; +bool disable_ertm;static u32 l2cap_feat_mask =L2CAP_FEAT_FIXED_CHAN ;static u8 l2cap_fixed_chan[8 ] = {L2CAP_FC_L2CAP , };
net/bluetooth/rfcomm/core.c +2 -2
@@ -51,8 +51,8 @@#define VERSION "1.11" -static int disable_cfc; -static int l2cap_ertm; +static bool disable_cfc; +static bool l2cap_ertm;static int channel_mtu =-1 ;static unsigned int l2cap_mtu =RFCOMM_MAX_L2CAP_MTU ;
net/bluetooth/sco.c +1 -1
@@ -51,7 +51,7 @@#include <net/bluetooth/hci_core.h> #include <net/bluetooth/sco.h> -static int disable_esco; +static bool disable_esco;static const struct proto_ops sco_sock_ops;
net/dccp/ccids/ccid2.c +2 -2
@@ -29,7 +29,7 @@#ifdef CONFIG_IP_DCCP_CCID2_DEBUG -static int ccid2_debug; +static bool ccid2_debug; #define ccid2_pr_debug(format, a...) DCCP_PR_DEBUG(ccid2_debug, format, ##a)#else #define ccid2_pr_debug(format, a...)
@@ -174,7 +174,7 @@ out:/* * Congestion window validation (RFC 2861). */ -static int ccid2_do_cwv =1 ; +static bool ccid2_do_cwv = true;module_param (ccid2_do_cwv, bool,0644 );MODULE_PARM_DESC (ccid2_do_cwv,"Perform RFC2861 Congestion Window Validation" );
net/dccp/ccids/ccid3.c +1 -1
@@ -38,7 +38,7 @@#include <asm/unaligned.h> #ifdef CONFIG_IP_DCCP_CCID3_DEBUG -static int ccid3_debug; +static bool ccid3_debug; #define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)#else #define ccid3_pr_debug(format, a...)
net/dccp/ccids/lib/tfrc.c +1 -1
@@ -8,7 +8,7 @@#include "tfrc.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -int tfrc_debug; +bool tfrc_debug;module_param (tfrc_debug, bool,0644 );MODULE_PARM_DESC (tfrc_debug,"Enable TFRC debug messages" );#endif
net/dccp/ccids/lib/tfrc.h +1 -1
@@ -21,7 +21,7 @@#include "packet_history.h" #ifdef CONFIG_IP_DCCP_TFRC_DEBUG -extern int tfrc_debug; +extern bool tfrc_debug; #define tfrc_pr_debug(format, a...) DCCP_PR_DEBUG(tfrc_debug, format, ##a)#else #define tfrc_pr_debug(format, a...)
net/dccp/dccp.h +1 -1
@@ -39,7 +39,7 @@ "%s: " fmt, __func__, ##a)#ifdef CONFIG_IP_DCCP_DEBUG -extern int dccp_debug; +extern bool dccp_debug; #define dccp_pr_debug(format, a...) DCCP_PR_DEBUG(dccp_debug, format, ##a) #define dccp_pr_debug_cat(format, a...) DCCP_PRINTK(dccp_debug, format, ##a) #define dccp_debug(fmt, a...) dccp_pr_debug_cat(KERN_DEBUG fmt, ##a)
net/dccp/proto.c +1 -1
@@ -1099,7 +1099,7 @@ module_param(thash_entries, int, 0444);MODULE_PARM_DESC (thash_entries,"Number of ehash buckets" );#ifdef CONFIG_IP_DCCP_DEBUG -int dccp_debug; +bool dccp_debug;module_param (dccp_debug, bool,0644 );MODULE_PARM_DESC (dccp_debug,"Enable debug messages" );
net/ipv4/netfilter/ipt_ULOG.c +1 -1
@@ -65,7 +65,7 @@ static unsigned int flushtimeout = 10;module_param (flushtimeout, uint,0600 );MODULE_PARM_DESC (flushtimeout,"buffer flush timeout (hundredths of a second)" ); -static int nflog =1 ; +static bool nflog = true;module_param (nflog, bool,0400 );MODULE_PARM_DESC (nflog,"register as internal netfilter logging module" );
net/ipv4/netfilter/iptable_filter.c +1 -1
@@ -52,7 +52,7 @@ iptable_filter_hook(unsigned int hook, struct sk_buff *skb,static struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init iptable_filter_net_init (struct net *net)
net/ipv6/netfilter/ip6table_filter.c +1 -1
@@ -44,7 +44,7 @@ ip6table_filter_hook(unsigned int hook, struct sk_buff *skb,static struct nf_hook_ops *filter_ops__read_mostly ;/* Default to forward because I got too much mail already. */ -static int forward =NF_ACCEPT ; +static bool forward =NF_ACCEPT ;module_param (forward, bool,0000 );static int __net_init ip6table_filter_net_init (struct net *net)
net/irda/irlan/irlan_common.c +1 -1
@@ -67,7 +67,7 @@ static void *ckey;static void *skey;/* Module parameters */ -static int eth;/* Use "eth" or "irlan" name for devices */ +static bool eth;/* Use "eth" or "irlan" name for devices */ static int access =ACCESS_PEER ;/* PEER, DIRECT or HOSTED */ #ifdef CONFIG_PROC_FS
net/netfilter/nf_conntrack_acct.c +1 -1
@@ -18,7 +18,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_acct.h> -static int nf_ct_acct__read_mostly ; +static bool nf_ct_acct__read_mostly ;module_param_named (acct, nf_ct_acct, bool,0644 );MODULE_PARM_DESC (acct,"Enable connection tracking flow accounting." );
net/netfilter/nf_conntrack_ftp.c +1 -1
@@ -42,7 +42,7 @@ static u_int16_t ports[MAX_PORTS];static unsigned int ports_c;module_param_array (ports, ushort, &ports_c,0400 ); -static int loose; +static bool loose;module_param (loose, bool,0600 ); unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
net/netfilter/nf_conntrack_h323_main.c +1 -1
@@ -42,7 +42,7 @@ static int gkrouted_only __read_mostly = 1;module_param (gkrouted_only, int,0600 );MODULE_PARM_DESC (gkrouted_only,"only accept calls from gatekeeper" ); -static int callforward_filter__read_mostly =1 ; +static bool callforward_filter__read_mostly = true;module_param (callforward_filter, bool,0600 );MODULE_PARM_DESC (callforward_filter,"only create call forwarding expectations " "if both endpoints are on different sides "
net/netfilter/nf_conntrack_timestamp.c +1 -1
@@ -15,7 +15,7 @@#include <net/netfilter/nf_conntrack_extend.h> #include <net/netfilter/nf_conntrack_timestamp.h> -static int nf_ct_tstamp__read_mostly ; +static bool nf_ct_tstamp__read_mostly ;module_param_named (tstamp, nf_ct_tstamp, bool,0644 );MODULE_PARM_DESC (tstamp,"Enable connection tracking flow timestamping." );
From: Rusty Russell <[email protected]>
Date: Tue, 20 Dec 2011 10:38:01 +1030
Quoted 4 lines
module_param(bool)used to counter-intuitively take an int. Infddd5201(mid-2009) we allowed bool or int/unsigned int using a messy trick.
Quoted 8 lines
It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version.
(Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false).
Cc "David S. Miller" <[email protected]>Signed-off-by Rusty Russell <[email protected]>
Applied.