arm: Change variable type to bool
Subsystems (21)
PATCH 1/19 arm: Change variable type to bool
The variable pll_overclock is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- arch/arm/mach-at91/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-at91/clock.c +1 -1
@@ -749,7 +749,7 @@ static int __init at91_pmc_init(unsigned long main_clock) {unsigned tmp, freq, mckr;int i; -int pll_overclock = false; +bool pll_overclock = false;/* * When the bootloader initialized the main oscillator correctly,
Signature · 1 line
1.8.3.1
PATCH 2/19 hv: Change variable type to bool
The variable execute_shutdown is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/hv/hv_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hv/hv_util.c +1 -1
@@ -82,7 +82,7 @@ static void shutdown_onchannelcallback(void *context)struct vmbus_channel *channel = context;u32 recvlen;u64 requestid; -u8 execute_shutdown = false; +bool execute_shutdown = false;u8 *shut_txf_buf = util_shutdown.recv_buffer;struct shutdown_msg_data *shutdown_msg;
Signature · 1 line
1.8.3.1
PATCH 3/19 infiniband: Change variable type to bool
In reply to Peter Senna TschudinThe variables found and is_uctx_pd are only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/ocrdma/ocrdma_main.c +1 -1
@@ -120,7 +120,7 @@ static bool ocrdma_add_sgid(struct ocrdma_dev *dev, unsigned char *mac_addr,static bool ocrdma_del_sgid (struct ocrdma_dev *dev,unsigned char *mac_addr,bool is_vlan,u16 vlan_id) { -int found = false; +bool found = false;int i;union ib_gid sgid;unsigned long flags;
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +1 -1
@@ -537,7 +537,7 @@ struct ib_pd *ocrdma_alloc_pd(struct ib_device *ibdev,struct ocrdma_pd *pd;struct ocrdma_ucontext *uctx =NULL ;int status; -u8 is_uctx_pd = false; +bool is_uctx_pd = false;if (udata && context) { uctx =get_ocrdma_ucontext (context);
Signature · 1 line
1.8.3.1
PATCH 4/19 isdn: Change variable type to bool
In reply to Peter Senna TschudinThe variable noCh is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/isdn/hardware/eicon/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/isdn/hardware/eicon/message.c +1 -1
@@ -1207,7 +1207,7 @@ static byte connect_req(dword Id, word Number, DIVA_CAPI_ADAPTER *a,byte m;static byte esc_chi[35 ] = {0x02 ,0x18 ,0x01 };static byte lli[2 ] = {0x01 ,0x00 }; -byte noCh =0 ; +bool noCh = false;word dir =0 ;byte *p_chi ="" ;
Signature · 1 line
1.8.3.1
PATCH 5/19 media: Change variable type to bool
In reply to Peter Senna TschudinThe variable vco_select is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/tuners/fc0012.c +1 -1
@@ -139,7 +139,7 @@ static int fc0012_set_params(struct dvb_frontend *fe)unsigned char reg[7 ], am, pm, multi, tmp;unsigned long f_vco;unsigned short xtal_freq_khz_2, xin, xdiv; -int vco_select = false; +bool vco_select = false;if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,
drivers/media/tuners/fc0013.c +1 -1
@@ -233,7 +233,7 @@ static int fc0013_set_params(struct dvb_frontend *fe)unsigned char reg[7 ], am, pm, multi, tmp;unsigned long f_vco;unsigned short xtal_freq_khz_2, xin, xdiv; -int vco_select = false; +bool vco_select = false;if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,
Signature · 1 line
1.8.3.1
PATCH 6/19 media: Change variable type to bool
In reply to Peter Senna TschudinThe variable frame_ready is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
---
This fails at checkpatch due initializing static variable to false. I haven't changed the assignment.
drivers/media/usb/cpia2/cpia2_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/cpia2/cpia2_usb.c +1 -1
@@ -209,7 +209,7 @@ static void cpia2_usb_complete(struct urb *urb) {int i;unsigned char *cdata; -static int frame_ready = false; +static bool frame_ready = false;struct camera_data *cam = (struct camera_data *) urb->context;if (urb->status!=0 ) {
Signature · 1 line
1.8.3.1
PATCH 7/19 mmc: Change variable type to bool
In reply to Peter Senna TschudinThe variable is_rpmb is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/mmc/card/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/card/block.c +1 -1
@@ -451,7 +451,7 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,struct mmc_request mrq = {NULL };struct scatterlist sg;int err; -int is_rpmb = false; +bool is_rpmb = false;u32 status =0 ;/*
Signature · 1 line
1.8.3.1
PATCH 8/19 net: Change variable type to bool
In reply to Peter Senna TschudinThe variable ret is only assigned the values true and false. The function atl1c_read_eeprom already returns bool. Change ret type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/atheros/atl1c/atl1c_hw.c +1 -1
@@ -153,7 +153,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)bool atl1c_read_eeprom (struct atl1c_hw *hw,u32 offset,u32 *p_value) {int i; -int ret = false; +bool ret = false;u32 otp_ctrl_data;u32 control;u32 data;
Signature · 1 line
1.8.3.1
PATCH 9/19 net: Change variable type to bool
In reply to Peter Senna TschudinThe variable rc is only assigned the values true and false. The function bnx2x_prev_is_path_marked already returns bool. Change rc type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +1 -1
@@ -9874,7 +9874,7 @@ static int bnx2x_prev_path_mark_eeh(struct bnx2x *bp)static bool bnx2x_prev_is_path_marked (struct bnx2x *bp) {struct bnx2x_prev_path_list *tmp_list; -int rc = false; +bool rc = false;if (down_trylock (&bnx2x_prev_sem))return false;
Signature · 1 line
1.8.3.1
PATCH 10/19 net: Change variable type to bool
In reply to Peter Senna TschudinThere is the rc variable on both myri10ge_ss_lock_napi and myri10ge_ss_lock_poll functions. In both cases rc is only assigned the values true and false. Both functions already return bool. Change rc type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/myricom/myri10ge/myri10ge.c +2 -2
@@ -934,7 +934,7 @@ static inline void myri10ge_ss_init_lock(struct myri10ge_slice_state *ss)static inline bool myri10ge_ss_lock_napi (struct myri10ge_slice_state *ss) { -int rc = true; +bool rc = true;spin_lock (&ss->lock);if ((ss->state &SLICE_LOCKED )) {WARN_ON ((ss->state &SLICE_STATE_NAPI ));
@@ -957,7 +957,7 @@ static inline void myri10ge_ss_unlock_napi(struct myri10ge_slice_state *ss)static inline bool myri10ge_ss_lock_poll (struct myri10ge_slice_state *ss) { -int rc = true; +bool rc = true;spin_lock_bh (&ss->lock);if ((ss->state &SLICE_LOCKED )) { ss->state |=SLICE_STATE_POLL_YIELD ;
Signature · 1 line
1.8.3.1
PATCH 11/19 wireless: Change variable type to bool
In reply to Peter Senna TschudinThe variables cancel_scan_cmd, enable_data, hs_activate and valid are only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/net/wireless/mwifiex/cmdevt.c | 2 +- drivers/net/wireless/mwifiex/join.c | 2 +- drivers/net/wireless/mwifiex/sta_cmd.c | 2 +- drivers/net/wireless/mwifiex/wmm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/mwifiex/cmdevt.c +1 -1
@@ -1048,7 +1048,7 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)struct cmd_ctrl_node *cmd_node =NULL , *tmp_node =NULL ;unsigned long cmd_flags;unsigned long scan_pending_q_flags; -uint16_t cancel_scan_cmd = false; +bool cancel_scan_cmd = false;if ((adapter->curr_cmd) && (adapter->curr_cmd->wait_q_enabled)) {
drivers/net/wireless/mwifiex/join.c +1 -1
@@ -621,7 +621,7 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,int ret =0 ;struct ieee_types_assoc_rsp *assoc_rsp;struct mwifiex_bssdescriptor *bss_desc; -u8 enable_data = true; +bool enable_data = true;u16 cap_info, status_code; assoc_rsp = (struct ieee_types_assoc_rsp *) &resp->params;
drivers/net/wireless/mwifiex/sta_cmd.c +1 -1
@@ -327,7 +327,7 @@ mwifiex_cmd_802_11_hs_cfg(struct mwifiex_private *priv, {struct mwifiex_adapter *adapter = priv->adapter;struct host_cmd_ds_802_11_hs_cfg_enh *hs_cfg = &cmd->params.opt_hs_cfg; -u16 hs_activate = false; +bool hs_activate = false;if (!hscfg_param)/* New Activate command */
drivers/net/wireless/mwifiex/wmm.c +1 -1
@@ -708,7 +708,7 @@ int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv, {u8 *curr = (u8 *) &resp->params.get_wmm_status;uint16_t resp_len =le16_to_cpu (resp->size), tlv_len; -int valid = true; +bool valid = true;struct mwifiex_ie_types_data *tlv_hdr;struct mwifiex_ie_types_wmm_queue_status *tlv_wmm_qstatus;
Signature · 1 line
1.8.3.1
PATCH 12/19 wireless: Change variable type to bool
In reply to Peter Senna TschudinThe variable continual is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/net/wireless/rtlwifi/efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rtlwifi/efuse.c +1 -1
@@ -1203,7 +1203,7 @@ static void efuse_power_switch(struct ieee80211_hw *hw, u8 write, u8 pwrstate)static u16 efuse_get_current_size (struct ieee80211_hw *hw) { -int continual = true; +bool continual = true;u16 efuse_addr =0 ;u8 hworden;u8 efuse_data, word_cnts;
Signature · 1 line
1.8.3.1
PATCH 13/19 rtc: Change variable type to bool
In reply to Peter Senna TschudinThe variable want_irq is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/rtc/rtc-ds1307.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-ds1307.c +1 -1
@@ -670,7 +670,7 @@ static int ds1307_probe(struct i2c_client *client,int tmp;const struct chip_desc *chip = &chips[id->driver_data];struct i2c_adapter *adapter =to_i2c_adapter (client->dev.parent); -int want_irq = false; +bool want_irq = false;unsigned char *buf;struct ds1307_platform_data *pdata = client->dev.platform_data;static const int bbsqi_bitpos[] = {
Signature · 1 line
1.8.3.1
PATCH 14/19 scsi: Change variable type to bool
In reply to Peter Senna TschudinThe variable success is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/scsi/isci/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/isci/port.c +1 -1
@@ -174,7 +174,7 @@ static void isci_port_link_up(struct isci_host *isci_host, {unsigned long flags;struct sci_port_properties properties; -unsigned long success = true; +bool success = true; dev_dbg(&isci_host->pdev->dev, "%s: isci_port = %p\n",
Signature · 1 line
1.8.3.1
PATCH 15/19 staging: Change variable type to bool
In reply to Peter Senna TschudinThe variable ownbit_flag is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8187se/r8180_core.c +1 -1
@@ -1704,7 +1704,7 @@ short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,u16 RtsDur =0 ;u16 ThisFrameTime =0 ;u16 TxDescDuration =0 ; -u8 ownbit_flag = false; +bool ownbit_flag = false;switch (priority) {case MANAGE_PRIORITY :
Signature · 1 line
1.8.3.1
PATCH 16/19 staging: Change variable type to bool
In reply to Peter Senna TschudinThe variables bMultiBand and bKeyTableFull are only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/staging/vt6656/channel.c | 2 +- drivers/staging/vt6656/hostap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/vt6656/channel.c +1 -1
@@ -403,7 +403,7 @@ exit:void CHvInitChannelTable (struct vnt_private *pDevice) { -int bMultiBand = false; +bool bMultiBand = false;int ii;for (ii =1 ; ii <=CB_MAX_CHANNEL ; ii++)
drivers/staging/vt6656/hostap.c +1 -1
@@ -414,7 +414,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice,int ret =0 ;s32 iNodeIndex =-1 ;int ii; -int bKeyTableFull = false; +bool bKeyTableFull = false;u16 wKeyCtl =0 ; param->u.crypt.err =0 ;
Signature · 1 line
1.8.3.1
PATCH 17/19 staging: Change variable type to bool
In reply to Peter Senna TschudinThe variable Trigger is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- drivers/staging/winbond/wb35tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/winbond/wb35tx.c +1 -1
@@ -180,7 +180,7 @@ void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount) {struct hw_data *pHwData = &adapter->sHwData;struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx; -unsigned char Trigger = false; +bool Trigger = false;if (pWb35Tx->TxTimer > TimeCount) Trigger = true;
Signature · 1 line
1.8.3.1
PATCH 18/19 nilfs2: Change variable type to bool
In reply to Peter Senna TschudinThe variable update_sr is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- fs/nilfs2/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/segment.c +1 -1
@@ -1746,7 +1746,7 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)struct nilfs_segment_buffer *segbuf;struct page *bd_page =NULL , *fs_page =NULL ;struct the_nilfs *nilfs = sci->sc_super->s_fs_info; -int update_sr = false; +bool update_sr = false;list_for_each_entry (segbuf, &sci->sc_write_logs, sb_list) {struct buffer_head *bh;
Signature · 1 line
1.8.3.1
PATCH 19/19 net: Change variable type to bool
In reply to Peter Senna TschudinThe variable fully_acked is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -2970,7 +2970,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,const struct inet_connection_sock *icsk =inet_csk (sk);struct sk_buff *skb;u32 now = tcp_time_stamp; -int fully_acked = true; +bool fully_acked = true;int flag =0 ;u32 pkts_acked =0 ;u32 reord = tp->packets_out;
Signature · 1 line
1.8.3.1
Greg KH
maintainerRe: [PATCH 15/19] staging: Change variable type to bool
In reply to Peter Senna TschudinQuoted 16 lines · Peter Senna Tschudin
The variable
ownbit_flagis only assigned the values true and false. Change its type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 4 lines
Signed-off-by Peter Senna Tschudin <[email protected]>--- drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
You sent me 3 patches with the exact same subject: line, which doesn't bode well for the changelog. You should update your script to put the driver name in the subject: to make it more unique and easier to identify in the future. I'll fix these 3 up for now.
thanks,
greg k-h
Re: [PATCH 12/19] wireless: Change variable type to bool
In reply to Peter Senna TschudinQuoted 2 lines · Peter Senna Tschudin
The variable continual is only assigned the values true and false. Change its type to bool.
[]
drivers/net/wireless/rtlwifi/efuse.c
Quoted 1 line
drivers/net/wireless/rtlwifi/efuse.c +0
-0
[]
drivers/net/wireless/rtlwifi/efuse.c static void efuse_power_switch(struct ieee80211_hw *hw, u8 write, u8 pwrstate) · line 1209
Quoted 9 lines
drivers/net/wireless/rtlwifi/efuse.c +1
-1@@ -1203,7 +1203,7 @@ static void efuse_power_switch(struct ieee80211_hw *hw, u8 write, u8 pwrstate)static u16 efuse_get_current_size (struct ieee80211_hw *hw) { -int continual = true; +bool continual = true;u16 efuse_addr =0 ;u8 hworden;u8 efuse_data, word_cnts;
Yes, this could use bool, but would probably be better written without continual at all
as it is before this patch:
static u16 efuse_get_current_size(struct ieee80211_hw *hw)
{
int continual = true;
u16 efuse_addr = 0;
u8 hworden;
u8 efuse_data, word_cnts;
while (continual && efuse_one_byte_read(hw, efuse_addr, &efuse_data)
&& (efuse_addr < EFUSE_MAX_SIZE)) {
if (efuse_data != 0xFF) {
hworden = efuse_data & 0x0F;
word_cnts = efuse_calculate_word_cnts(hworden);
efuse_addr = efuse_addr + (word_cnts * 2) + 1;
} else {
continual = false;
}
}
return efuse_addr;
}I think writing it without continual, which is effectively an ersatz "break", would be better
Something like:
static u16 efuse_get_current_size(struct ieee80211_hw *hw)
{
u16 efuse_addr = 0;
u8 hworden;
u8 efuse_data, word_cnts;
while (efuse_one_byte_read(hw, efuse_addr, &efuse_data) &&
(efuse_addr < EFUSE_MAX_SIZE) {
if (efuse_data = 0xff)
break;
hworden = efuse_data & 0x0F;
word_cnts = efuse_calculate_word_cnts(hworden);
efuse_addr = efuse_addr + (word_cnts * 2) + 1;
}
return efuse_addr;
}Re: [PATCH 17/19] staging: Change variable type to bool
In reply to Peter Senna TschudinQuoted 16 lines · Peter Senna Tschudin
The variable Trigger is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 02/19] hv: Change variable type to bool
In reply to Peter Senna Tschudindrivers/hv/hv_util.c static void shutdown_onchannelcallback(void *context) · line 87
Quoted 12 lines · Peter Senna Tschudin
drivers/hv/hv_util.c +1
-1@@ -82,7 +82,7 @@ static void shutdown_onchannelcallback(void *context)struct vmbus_channel *channel = context;u32 recvlen;u64 requestid; -u8 execute_shutdown = false; +bool execute_shutdown = false;u8 *shut_txf_buf = util_shutdown.recv_buffer;
The two spaces are meant so first letters 'r', 'r', 'e', and 's' are on the same column. It should just be one space so we don't have to re-align everything when we make a change like this.
regards,
dan carpenter
Dorau, Lukasz
Acked-byRE: [PATCH 14/19] scsi: Change variable type to bool
In reply to a message not in the archiveQuoted 36 lines · Peter Senna Tschudin
The variable success is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)Signed-off-by Peter Senna Tschudin <[email protected]>--- drivers/scsi/isci/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/isci/port.c +1
-2@@ -174,7 +174,7 @@ static void isci_port_link_up(struct isci_host *isci_host, {unsigned long flags;struct sci_port_properties properties; -unsigned long success = true; +bool success = true; dev_dbg(&isci_host->pdev->dev, "%s: isci_port = %p\n", --
Quoted 1 line
1.8.3.1
RE: [PATCH 11/19] wireless: Change variable type to bool
In reply to Peter Senna TschudinHi Peter,
Thanks for your patch.
Quoted 16 lines
The variables
cancel_scan_cmd,enable_data,hs_activateand valid are only assigned the values true and false. Change its type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 1 line
Signed-off-by Peter Senna Tschudin <[email protected]>
Thanks,
Bing
Quoted 6 lines
--- drivers/net/wireless/mwifiex/cmdevt.c | 2 +- drivers/net/wireless/mwifiex/join.c | 2 +- drivers/net/wireless/mwifiex/sta_cmd.c | 2 +- drivers/net/wireless/mwifiex/wmm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
David Miller
maintainerRe: [PATCH 09/19] net: Change variable type to bool
In reply to Peter Senna TschudinUsing the same prefix, "net: " for several patches gives no information to the person reading the shortlog.
Use more specific subsystem prefixes, such as "bnx2x: "myri10ge: ", "ipv6: ", etc.
Re: [PATCH 12/19] wireless: Change variable type to bool
In reply to Peter Senna TschudinQuoted 16 lines · Peter Senna Tschudin
The variable continual is only assigned the values true and false. Change its type to bool.
The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)
Quoted 4 lines
Signed-off-by Peter Senna Tschudin <[email protected]>--- drivers/net/wireless/rtlwifi/efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Please prefix the patch title with "rtlwifi:". We use "wireless:" for changes to net/wireless.
Signature · 1 line
Kalle Valo
Re: [PATCH 05/19] media: Change variable type to bool
In reply to Peter Senna TschudinAm Sonntag, 22. September 2013, 00:27:37 schrieb Peter Senna Tschudin:
Quoted 40 lines
The variable
vco_selectis only assigned the values true and false. Change its type to bool.The simplified semantic patch that find this problem is as follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
b = ...;
... when any
b = \(true\|false\)Signed-off-by Peter Senna Tschudin <[email protected]>--- drivers/media/tuners/fc0012.c | 2 +- drivers/media/tuners/fc0013.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/media/tuners/fc0012.c +1
-1@@ -139,7 +139,7 @@ static int fc0012_set_params(struct dvb_frontend *fe)unsigned char reg[7 ], am, pm, multi, tmp;unsigned long f_vco;unsigned short xtal_freq_khz_2, xin, xdiv; -int vco_select = false; +bool vco_select = false;if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,drivers/media/tuners/fc0013.c +0
-0
drivers/media/tuners/fc0013.c static int fc0013_set_params(struct dvb_frontend *fe) · line 239
Quoted 8 lines
drivers/media/tuners/fc0013.c +1
-1@@ -233,7 +233,7 @@ static int fc0013_set_params(struct dvb_frontend *fe)unsigned char reg[7 ], am, pm, multi, tmp;unsigned long f_vco;unsigned short xtal_freq_khz_2, xin, xdiv; -int vco_select = false; +bool vco_select = false;if (fe->callback) { ret = fe->callback(priv->i2c, DVB_FRONTEND_COMPONENT_TUNER,
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net