Merge tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull uninitialized_var() macro removal from Kees Cook: "This is long overdue, and has hidden too many bugs over the years. The series has several "by hand" fixes, and then a trivial treewide replacement. - Clean up non-trivial uses of uninitialized_var() - Update documentation and checkpatch for uninitialized_var() removal - Treewide removal of uninitialized_var()" * tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: compiler: Remove uninitialized_var() macro treewide: Remove uninitialized_var() usage checkpatch: Remove awareness of uninitialized_var() macro mm/debug_vm_pgtable: Remove uninitialized_var() usage f2fs: Eliminate usage of uninitialized_var() macro media: sur40: Remove uninitialized_var() usage KVM: PPC: Book3S PR: Remove uninitialized_var() usage clk: spear: Remove uninitialized_var() usage clk: st: Remove uninitialized_var() usage spi: davinci: Remove uninitialized_var() usage ide: Remove uninitialized_var() usage rtlwifi: rtl8192cu: Remove uninitialized_var() usage b43: Remove uninitialized_var() usage drbd: Remove uninitialized_var() usage x86/mm/numa: Remove uninitialized_var() usage docs: deprecated.rst: Add uninitialized_var()
This commit is contained in:
@@ -2240,7 +2240,7 @@ static int ath10k_init_uart(struct ath10k *ar)
|
||||
|
||||
static int ath10k_init_hw_params(struct ath10k *ar)
|
||||
{
|
||||
const struct ath10k_hw_params *uninitialized_var(hw_params);
|
||||
const struct ath10k_hw_params *hw_params;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
|
||||
|
@@ -1575,7 +1575,7 @@ static int ath6kl_init_upload(struct ath6kl *ar)
|
||||
|
||||
int ath6kl_init_hw_params(struct ath6kl *ar)
|
||||
{
|
||||
const struct ath6kl_hw *uninitialized_var(hw);
|
||||
const struct ath6kl_hw *hw;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(hw_list); i++) {
|
||||
|
@@ -230,7 +230,7 @@ static unsigned int ath9k_reg_rmw(void *hw_priv, u32 reg_offset, u32 set, u32 cl
|
||||
struct ath_hw *ah = hw_priv;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
unsigned long uninitialized_var(flags);
|
||||
unsigned long flags;
|
||||
u32 val;
|
||||
|
||||
if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_ON) {
|
||||
|
@@ -493,7 +493,7 @@ static ssize_t b43_debugfs_read(struct file *file, char __user *userbuf,
|
||||
struct b43_wldev *dev;
|
||||
struct b43_debugfs_fops *dfops;
|
||||
struct b43_dfs_file *dfile;
|
||||
ssize_t uninitialized_var(ret);
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
const size_t bufsize = 1024 * 16; /* 16 kiB buffer */
|
||||
const size_t buforder = get_order(bufsize);
|
||||
|
@@ -37,7 +37,7 @@
|
||||
static u32 b43_dma_address(struct b43_dma *dma, dma_addr_t dmaaddr,
|
||||
enum b43_addrtype addrtype)
|
||||
{
|
||||
u32 uninitialized_var(addr);
|
||||
u32 addr;
|
||||
|
||||
switch (addrtype) {
|
||||
case B43_DMA_ADDR_LOW:
|
||||
|
@@ -729,7 +729,7 @@ struct b43_lo_calib *b43_calibrate_lo_setting(struct b43_wldev *dev,
|
||||
};
|
||||
int max_rx_gain;
|
||||
struct b43_lo_calib *cal;
|
||||
struct lo_g_saved_values uninitialized_var(saved_regs);
|
||||
struct lo_g_saved_values saved_regs;
|
||||
/* Values from the "TXCTL Register and Value Table" */
|
||||
u16 txctl_reg;
|
||||
u16 txctl_value;
|
||||
|
@@ -4222,7 +4222,7 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev)
|
||||
u32 rfpwr_offset;
|
||||
u8 pga_gain, pad_gain;
|
||||
int i;
|
||||
const s16 *uninitialized_var(rf_pwr_offset_table);
|
||||
const s16 *rf_pwr_offset_table = NULL;
|
||||
|
||||
table = b43_nphy_get_tx_gain_table(dev);
|
||||
if (!table)
|
||||
@@ -5643,7 +5643,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev,
|
||||
u8 rfctl[2];
|
||||
u8 afectl_core;
|
||||
u16 tmp[6];
|
||||
u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna;
|
||||
u16 cur_hpf1, cur_hpf2, cur_lna;
|
||||
u32 real, imag;
|
||||
enum nl80211_band band;
|
||||
|
||||
|
@@ -422,10 +422,10 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
if ((rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) ||
|
||||
(rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) {
|
||||
unsigned int len;
|
||||
struct ieee80211_hdr *uninitialized_var(hdr);
|
||||
struct ieee80211_hdr *hdr;
|
||||
int rts_rate, rts_rate_fb;
|
||||
int rts_rate_ofdm, rts_rate_fb_ofdm;
|
||||
struct b43_plcp_hdr6 *uninitialized_var(plcp);
|
||||
struct b43_plcp_hdr6 *plcp;
|
||||
struct ieee80211_rate *rts_cts_rate;
|
||||
|
||||
rts_cts_rate = ieee80211_get_rts_cts_rate(dev->wl->hw, info);
|
||||
@@ -436,7 +436,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
rts_rate_fb_ofdm = b43_is_ofdm_rate(rts_rate_fb);
|
||||
|
||||
if (rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
|
||||
struct ieee80211_cts *uninitialized_var(cts);
|
||||
struct ieee80211_cts *cts;
|
||||
|
||||
switch (dev->fw.hdr_format) {
|
||||
case B43_FW_HDR_598:
|
||||
@@ -458,7 +458,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
|
||||
mac_ctl |= B43_TXH_MAC_SENDCTS;
|
||||
len = sizeof(struct ieee80211_cts);
|
||||
} else {
|
||||
struct ieee80211_rts *uninitialized_var(rts);
|
||||
struct ieee80211_rts *rts;
|
||||
|
||||
switch (dev->fw.hdr_format) {
|
||||
case B43_FW_HDR_598:
|
||||
@@ -637,8 +637,8 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
|
||||
const struct b43_rxhdr_fw4 *rxhdr = _rxhdr;
|
||||
__le16 fctl;
|
||||
u16 phystat0, phystat3;
|
||||
u16 uninitialized_var(chanstat), uninitialized_var(mactime);
|
||||
u32 uninitialized_var(macstat);
|
||||
u16 chanstat, mactime;
|
||||
u32 macstat;
|
||||
u16 chanid;
|
||||
int padding, rate_idx;
|
||||
|
||||
|
@@ -190,7 +190,7 @@ static ssize_t b43legacy_debugfs_read(struct file *file, char __user *userbuf,
|
||||
struct b43legacy_wldev *dev;
|
||||
struct b43legacy_debugfs_fops *dfops;
|
||||
struct b43legacy_dfs_file *dfile;
|
||||
ssize_t uninitialized_var(ret);
|
||||
ssize_t ret;
|
||||
char *buf;
|
||||
const size_t bufsize = 1024 * 16; /* 16 KiB buffer */
|
||||
const size_t buforder = get_order(bufsize);
|
||||
|
@@ -2580,7 +2580,7 @@ static void b43legacy_put_phy_into_reset(struct b43legacy_wldev *dev)
|
||||
static int b43legacy_switch_phymode(struct b43legacy_wl *wl,
|
||||
unsigned int new_mode)
|
||||
{
|
||||
struct b43legacy_wldev *uninitialized_var(up_dev);
|
||||
struct b43legacy_wldev *up_dev;
|
||||
struct b43legacy_wldev *down_dev;
|
||||
int err;
|
||||
bool gmode = false;
|
||||
|
@@ -2100,7 +2100,7 @@ il3945_txpower_set_from_eeprom(struct il_priv *il)
|
||||
|
||||
/* set tx power value for all OFDM rates */
|
||||
for (rate_idx = 0; rate_idx < IL_OFDM_RATES; rate_idx++) {
|
||||
s32 uninitialized_var(power_idx);
|
||||
s32 power_idx;
|
||||
int rc;
|
||||
|
||||
/* use channel group's clip-power table,
|
||||
|
@@ -2769,7 +2769,7 @@ il4965_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb)
|
||||
struct ieee80211_tx_info *info;
|
||||
struct il4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
|
||||
u32 status = le32_to_cpu(tx_resp->u.status);
|
||||
int uninitialized_var(tid);
|
||||
int tid;
|
||||
int sta_id;
|
||||
int freed;
|
||||
u8 *qc = NULL;
|
||||
|
@@ -592,7 +592,7 @@ static void _rtl92cu_init_chipn_one_out_ep_priority(struct ieee80211_hw *hw,
|
||||
bool wmm_enable,
|
||||
u8 queue_sel)
|
||||
{
|
||||
u16 uninitialized_var(value);
|
||||
u16 value;
|
||||
|
||||
switch (queue_sel) {
|
||||
case TX_SELE_HQ:
|
||||
@@ -606,7 +606,7 @@ static void _rtl92cu_init_chipn_one_out_ep_priority(struct ieee80211_hw *hw,
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1); /* Shall not reach here! */
|
||||
break;
|
||||
return;
|
||||
}
|
||||
_rtl92c_init_chipn_reg_priority(hw, value, value, value, value,
|
||||
value, value);
|
||||
@@ -618,8 +618,8 @@ static void _rtl92cu_init_chipn_two_out_ep_priority(struct ieee80211_hw *hw,
|
||||
u8 queue_sel)
|
||||
{
|
||||
u16 beq, bkq, viq, voq, mgtq, hiq;
|
||||
u16 uninitialized_var(valuehi);
|
||||
u16 uninitialized_var(valuelow);
|
||||
u16 valuehi;
|
||||
u16 valuelow;
|
||||
|
||||
switch (queue_sel) {
|
||||
case (TX_SELE_HQ | TX_SELE_LQ):
|
||||
|
Reference in New Issue
Block a user