diff options
-rw-r--r-- | drivers/staging/gpib/TODO | 5 | ||||
-rw-r--r-- | drivers/staging/gpib/hp_82341/hp_82341.c | 10 | ||||
-rw-r--r-- | drivers/staging/gpib/include/gpibP.h | 1 | ||||
-rw-r--r-- | drivers/staging/gpib/include/gpib_cmd.h | 112 | ||||
-rw-r--r-- | drivers/staging/gpib/uapi/gpib.h | 198 | ||||
-rw-r--r-- | drivers/staging/gpib/uapi/gpib_ioctl.h | 112 | ||||
-rw-r--r-- | drivers/staging/greybus/gpio.c | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_ap.c | 9 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_mlme.c | 18 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 9 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/os_intfs.c | 6 | ||||
-rw-r--r-- | drivers/staging/sm750fb/sm750.c | 2 | ||||
-rw-r--r-- | drivers/staging/sm750fb/sm750.h | 2 | ||||
-rw-r--r-- | drivers/staging/vme_user/vme.c | 2 |
15 files changed, 190 insertions, 304 deletions
diff --git a/drivers/staging/gpib/TODO b/drivers/staging/gpib/TODO index bf2c39742548..ab41a7f9ca5b 100644 --- a/drivers/staging/gpib/TODO +++ b/drivers/staging/gpib/TODO @@ -1,6 +1,9 @@ TODO: - checkpatch.pl fixes -- fix device drivers that are broken ("depends on BROKEN" in Kconfig) + These checks should be ignored: + CHECK:ALLOC_SIZEOF_STRUCT: Prefer kmalloc(sizeof(*board->private_data)...) over kmalloc(sizeof(struct xxx_priv)...) + ./gpio/gpib_bitbang.c:50: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parenthese + This warning will be addressed later: WARNING:UNDOCUMENTED_DT_STRING: DT compatible string - tidy-up comments: - there are some "//comments" and "// comments" scattered around - sometimes they are misaligned diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c index 1b0822b2a3b8..e5c1997ce7d9 100644 --- a/drivers/staging/gpib/hp_82341/hp_82341.c +++ b/drivers/staging/gpib/hp_82341/hp_82341.c @@ -79,10 +79,7 @@ static int hp_82341_accel_read(struct gpib_board *board, u8 *buffer, size_t leng int j; int count; - if (num_fifo_bytes - i < hp_82341_fifo_size) - block_size = num_fifo_bytes - i; - else - block_size = hp_82341_fifo_size; + block_size = min(num_fifo_bytes - i, hp_82341_fifo_size); set_transfer_counter(hp_priv, block_size); outb(ENABLE_TI_BUFFER_BIT | DIRECTION_GPIB_TO_HOST_BIT, hp_priv->iobase[3] + BUFFER_CONTROL_REG); @@ -195,10 +192,7 @@ static int hp_82341_accel_write(struct gpib_board *board, u8 *buffer, size_t len for (i = 0; i < fifo_xfer_len;) { int block_size; - if (fifo_xfer_len - i < hp_82341_fifo_size) - block_size = fifo_xfer_len - i; - else - block_size = hp_82341_fifo_size; + block_size = min(fifo_xfer_len - i, hp_82341_fifo_size); set_transfer_counter(hp_priv, block_size); // load data into board's fifo for (j = 0; j < block_size;) { diff --git a/drivers/staging/gpib/include/gpibP.h b/drivers/staging/gpib/include/gpibP.h index 0af72934ce24..1b27f37e0ba0 100644 --- a/drivers/staging/gpib/include/gpibP.h +++ b/drivers/staging/gpib/include/gpibP.h @@ -11,6 +11,7 @@ #include "gpib_types.h" #include "gpib_proto.h" +#include "gpib_cmd.h" #include "gpib.h" #include "gpib_ioctl.h" diff --git a/drivers/staging/gpib/include/gpib_cmd.h b/drivers/staging/gpib/include/gpib_cmd.h new file mode 100644 index 000000000000..9e96a3bfa22d --- /dev/null +++ b/drivers/staging/gpib/include/gpib_cmd.h @@ -0,0 +1,112 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _GPIB_CMD_H +#define _GPIB_CMD_H + +#include <linux/types.h> + +/* Command byte definitions tests and functions */ + +/* mask of bits that actually matter in a command byte */ +enum { + gpib_command_mask = 0x7f, +}; + +/* Possible GPIB command messages */ + +enum cmd_byte { + GTL = 0x1, /* go to local */ + SDC = 0x4, /* selected device clear */ + PP_CONFIG = 0x5, + GET = 0x8, /* group execute trigger */ + TCT = 0x9, /* take control */ + LLO = 0x11, /* local lockout */ + DCL = 0x14, /* device clear */ + PPU = 0x15, /* parallel poll unconfigure */ + SPE = 0x18, /* serial poll enable */ + SPD = 0x19, /* serial poll disable */ + CFE = 0x1f, /* configure enable */ + LAD = 0x20, /* value to be 'ored' in to obtain listen address */ + UNL = 0x3F, /* unlisten */ + TAD = 0x40, /* value to be 'ored' in to obtain talk address */ + UNT = 0x5F, /* untalk */ + SAD = 0x60, /* my secondary address (base) */ + PPE = 0x60, /* parallel poll enable (base) */ + PPD = 0x70 /* parallel poll disable */ +}; + +/* confine address to range 0 to 30. */ +static inline unsigned int gpib_address_restrict(u32 addr) +{ + addr &= 0x1f; + if (addr == 0x1f) + addr = 0; + return addr; +} + +static inline u8 MLA(u32 addr) +{ + return gpib_address_restrict(addr) | LAD; +} + +static inline u8 MTA(u32 addr) +{ + return gpib_address_restrict(addr) | TAD; +} + +static inline u8 MSA(u32 addr) +{ + return (addr & 0x1f) | SAD; +} + +static inline s32 gpib_address_equal(u32 pad1, s32 sad1, u32 pad2, s32 sad2) +{ + if (pad1 == pad2) { + if (sad1 == sad2) + return 1; + if (sad1 < 0 && sad2 < 0) + return 1; + } + + return 0; +} + +static inline s32 is_PPE(u8 command) +{ + return (command & 0x70) == 0x60; +} + +static inline s32 is_PPD(u8 command) +{ + return (command & 0x70) == 0x70; +} + +static inline s32 in_addressed_command_group(u8 command) +{ + return (command & 0x70) == 0x0; +} + +static inline s32 in_universal_command_group(u8 command) +{ + return (command & 0x70) == 0x10; +} + +static inline s32 in_listen_address_group(u8 command) +{ + return (command & 0x60) == 0x20; +} + +static inline s32 in_talk_address_group(u8 command) +{ + return (command & 0x60) == 0x40; +} + +static inline s32 in_primary_command_group(u8 command) +{ + return in_addressed_command_group(command) || + in_universal_command_group(command) || + in_listen_address_group(command) || + in_talk_address_group(command); +} + +#endif /* _GPIB_CMD_H */ diff --git a/drivers/staging/gpib/uapi/gpib.h b/drivers/staging/gpib/uapi/gpib.h index 41500cee4029..ddf82a4d989f 100644 --- a/drivers/staging/gpib/uapi/gpib.h +++ b/drivers/staging/gpib/uapi/gpib.h @@ -83,204 +83,12 @@ enum bus_control_line { BUS_EOI = 0x8000 /* EOI line status bit */ }; -/* Possible GPIB command messages */ - -enum cmd_byte { - GTL = 0x1, /* go to local */ - SDC = 0x4, /* selected device clear */ - PP_CONFIG = 0x5, -#ifndef PPC - PPC = PP_CONFIG, /* parallel poll configure */ -#endif - GET = 0x8, /* group execute trigger */ - TCT = 0x9, /* take control */ - LLO = 0x11, /* local lockout */ - DCL = 0x14, /* device clear */ - PPU = 0x15, /* parallel poll unconfigure */ - SPE = 0x18, /* serial poll enable */ - SPD = 0x19, /* serial poll disable */ - CFE = 0x1f, /* configure enable */ - LAD = 0x20, /* value to be 'ored' in to obtain listen address */ - UNL = 0x3F, /* unlisten */ - TAD = 0x40, /* value to be 'ored' in to obtain talk address */ - UNT = 0x5F, /* untalk */ - SAD = 0x60, /* my secondary address (base) */ - PPE = 0x60, /* parallel poll enable (base) */ - PPD = 0x70 /* parallel poll disable */ -}; - enum ppe_bits { PPC_DISABLE = 0x10, PPC_SENSE = 0x8, /* parallel poll sense bit */ PPC_DIO_MASK = 0x7 }; -/* confine address to range 0 to 30. */ -static inline unsigned int gpib_address_restrict(unsigned int addr) -{ - addr &= 0x1f; - if (addr == 0x1f) - addr = 0; - return addr; -} - -static inline __u8 MLA(unsigned int addr) -{ - return gpib_address_restrict(addr) | LAD; -} - -static inline __u8 MTA(unsigned int addr) -{ - return gpib_address_restrict(addr) | TAD; -} - -static inline __u8 MSA(unsigned int addr) -{ - return (addr & 0x1f) | SAD; -} - -static inline __u8 PPE_byte(unsigned int dio_line, int sense) -{ - __u8 cmd; - - cmd = PPE; - if (sense) - cmd |= PPC_SENSE; - cmd |= (dio_line - 1) & 0x7; - return cmd; -} - -/* mask of bits that actually matter in a command byte */ -enum { - gpib_command_mask = 0x7f, -}; - -static inline int is_PPE(__u8 command) -{ - return (command & 0x70) == 0x60; -} - -static inline int is_PPD(__u8 command) -{ - return (command & 0x70) == 0x70; -} - -static inline int in_addressed_command_group(__u8 command) -{ - return (command & 0x70) == 0x0; -} - -static inline int in_universal_command_group(__u8 command) -{ - return (command & 0x70) == 0x10; -} - -static inline int in_listen_address_group(__u8 command) -{ - return (command & 0x60) == 0x20; -} - -static inline int in_talk_address_group(__u8 command) -{ - return (command & 0x60) == 0x40; -} - -static inline int in_primary_command_group(__u8 command) -{ - return in_addressed_command_group(command) || - in_universal_command_group(command) || - in_listen_address_group(command) || - in_talk_address_group(command); -} - -static inline int gpib_address_equal(unsigned int pad1, int sad1, unsigned int pad2, int sad2) -{ - if (pad1 == pad2) { - if (sad1 == sad2) - return 1; - if (sad1 < 0 && sad2 < 0) - return 1; - } - - return 0; -} - -enum ibask_option { - IBA_PAD = 0x1, - IBA_SAD = 0x2, - IBA_TMO = 0x3, - IBA_EOT = 0x4, - IBA_PPC = 0x5, /* board only */ - IBA_READ_DR = 0x6, /* device only */ - IBA_AUTOPOLL = 0x7, /* board only */ - IBA_CICPROT = 0x8, /* board only */ - IBA_IRQ = 0x9, /* board only */ - IBA_SC = 0xa, /* board only */ - IBA_SRE = 0xb, /* board only */ - IBA_EOS_RD = 0xc, - IBA_EOS_WRT = 0xd, - IBA_EOS_CMP = 0xe, - IBA_EOS_CHAR = 0xf, - IBA_PP2 = 0x10, /* board only */ - IBA_TIMING = 0x11, /* board only */ - IBA_DMA = 0x12, /* board only */ - IBA_READ_ADJUST = 0x13, - IBA_WRITE_ADJUST = 0x14, - IBA_EVENT_QUEUE = 0x15, /* board only */ - IBA_SPOLL_BIT = 0x16, /* board only */ - IBA_SEND_LLO = 0x17, /* board only */ - IBA_SPOLL_TIME = 0x18, /* device only */ - IBA_PPOLL_TIME = 0x19, /* board only */ - IBA_END_BIT_IS_NORMAL = 0x1a, - IBA_UN_ADDR = 0x1b, /* device only */ - IBA_HS_CABLE_LENGTH = 0x1f, /* board only */ - IBA_IST = 0x20, /* board only */ - IBA_RSV = 0x21, /* board only */ - IBA_BNA = 0x200, /* device only */ - /* linux-gpib extensions */ - IBA_7_BIT_EOS = 0x1000 /* board only. Returns 1 if board supports 7 bit eos compares*/ -}; - -enum ibconfig_option { - IBC_PAD = 0x1, - IBC_SAD = 0x2, - IBC_TMO = 0x3, - IBC_EOT = 0x4, - IBC_PPC = 0x5, /* board only */ - IBC_READDR = 0x6, /* device only */ - IBC_AUTOPOLL = 0x7, /* board only */ - IBC_CICPROT = 0x8, /* board only */ - IBC_IRQ = 0x9, /* board only */ - IBC_SC = 0xa, /* board only */ - IBC_SRE = 0xb, /* board only */ - IBC_EOS_RD = 0xc, - IBC_EOS_WRT = 0xd, - IBC_EOS_CMP = 0xe, - IBC_EOS_CHAR = 0xf, - IBC_PP2 = 0x10, /* board only */ - IBC_TIMING = 0x11, /* board only */ - IBC_DMA = 0x12, /* board only */ - IBC_READ_ADJUST = 0x13, - IBC_WRITE_ADJUST = 0x14, - IBC_EVENT_QUEUE = 0x15, /* board only */ - IBC_SPOLL_BIT = 0x16, /* board only */ - IBC_SEND_LLO = 0x17, /* board only */ - IBC_SPOLL_TIME = 0x18, /* device only */ - IBC_PPOLL_TIME = 0x19, /* board only */ - IBC_END_BIT_IS_NORMAL = 0x1a, - IBC_UN_ADDR = 0x1b, /* device only */ - IBC_HS_CABLE_LENGTH = 0x1f, /* board only */ - IBC_IST = 0x20, /* board only */ - IBC_RSV = 0x21, /* board only */ - IBC_BNA = 0x200 /* device only */ -}; - -enum t1_delays { - T1_DELAY_2000ns = 1, - T1_DELAY_500ns = 2, - T1_DELAY_350ns = 3 -}; - enum { request_service_bit = 0x40, }; @@ -292,11 +100,5 @@ enum gpib_events { EVENT_IFC = 3 }; -enum gpib_stb { - IB_STB_RQS = 0x40, /* IEEE 488.1 & 2 */ - IB_STB_ESB = 0x20, /* IEEE 488.2 only */ - IB_STB_MAV = 0x10 /* IEEE 488.2 only */ -}; - #endif /* _GPIB_H */ diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index 0fed5c0fa7f2..55bf5e55507a 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -19,87 +19,90 @@ struct gpib_board_type_ioctl { /* argument for read/write/command ioctls */ struct gpib_read_write_ioctl { __u64 buffer_ptr; - unsigned int requested_transfer_count; - unsigned int completed_transfer_count; - int end; /* end flag return for reads, end io suppression request for cmd*/ - int handle; + __u32 requested_transfer_count; + __u32 completed_transfer_count; + __s32 end; /* end flag return for reads, end io suppression request for cmd*/ + __s32 handle; }; struct gpib_open_dev_ioctl { - unsigned int handle; - unsigned int pad; - int sad; - unsigned is_board : 1; + __u32 handle; + __u32 pad; + __s32 sad; + __u32 is_board; }; struct gpib_close_dev_ioctl { - unsigned int handle; + __u32 handle; }; struct gpib_serial_poll_ioctl { - unsigned int pad; - int sad; + __u32 pad; + __s32 sad; __u8 status_byte; + __u8 padding[3]; // align to 32 bit boundary }; struct gpib_eos_ioctl { - int eos; - int eos_flags; + __s32 eos; + __s32 eos_flags; }; struct gpib_wait_ioctl { - int handle; - int wait_mask; - int clear_mask; - int set_mask; - int ibsta; - int pad; - int sad; - unsigned int usec_timeout; + __s32 handle; + __s32 wait_mask; + __s32 clear_mask; + __s32 set_mask; + __s32 ibsta; + __s32 pad; + __s32 sad; + __u32 usec_timeout; }; struct gpib_online_ioctl { __u64 init_data_ptr; - int init_data_length; - int online; + __s32 init_data_length; + __s32 online; }; struct gpib_spoll_bytes_ioctl { - unsigned int num_bytes; - unsigned int pad; - int sad; + __u32 num_bytes; + __u32 pad; + __s32 sad; }; struct gpib_board_info_ioctl { - unsigned int pad; - int sad; - int parallel_poll_configuration; - int autopolling; - int is_system_controller; - unsigned int t1_delay; + __u32 pad; + __s32 sad; + __s32 parallel_poll_configuration; + __s32 autopolling; + __s32 is_system_controller; + __u32 t1_delay; unsigned ist : 1; unsigned no_7_bit_eos : 1; + unsigned padding :30; // align to 32 bit boundary }; struct gpib_select_pci_ioctl { - int pci_bus; - int pci_slot; + __s32 pci_bus; + __s32 pci_slot; }; struct gpib_ppoll_config_ioctl { __u8 config; unsigned set_ist : 1; unsigned clear_ist : 1; + unsigned padding :22; // align to 32 bit boundary }; struct gpib_pad_ioctl { - unsigned int handle; - unsigned int pad; + __u32 handle; + __u32 pad; }; struct gpib_sad_ioctl { - unsigned int handle; - int sad; + __u32 handle; + __s32 sad; }; // select a piece of hardware to attach by its sysfs device path @@ -110,7 +113,8 @@ struct gpib_select_device_path_ioctl { // update status byte and request service struct gpib_request_service2 { __u8 status_byte; - int new_reason_for_service; + __u8 padding[3]; // align to 32 bit boundary + __s32 new_reason_for_service; }; /* Standard functions. */ @@ -123,38 +127,38 @@ enum gpib_ioctl { IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl), IBRPP = _IOWR(GPIB_CODE, 6, __u8), - IBSIC = _IOW(GPIB_CODE, 9, unsigned int), - IBSRE = _IOW(GPIB_CODE, 10, int), + IBSIC = _IOW(GPIB_CODE, 9, __u32), + IBSRE = _IOW(GPIB_CODE, 10, __s32), IBGTS = _IO(GPIB_CODE, 11), - IBCAC = _IOW(GPIB_CODE, 12, int), - IBLINES = _IOR(GPIB_CODE, 14, short), + IBCAC = _IOW(GPIB_CODE, 12, __s32), + IBLINES = _IOR(GPIB_CODE, 14, __s16), IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl), IBSAD = _IOW(GPIB_CODE, 16, struct gpib_sad_ioctl), - IBTMO = _IOW(GPIB_CODE, 17, unsigned int), + IBTMO = _IOW(GPIB_CODE, 17, __u32), IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl), IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl), IBRSV = _IOW(GPIB_CODE, 20, __u8), CFCBASE = _IOW(GPIB_CODE, 21, __u64), - CFCIRQ = _IOW(GPIB_CODE, 22, unsigned int), - CFCDMA = _IOW(GPIB_CODE, 23, unsigned int), + CFCIRQ = _IOW(GPIB_CODE, 22, __u32), + CFCDMA = _IOW(GPIB_CODE, 23, __u32), CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl), - IBMUTEX = _IOW(GPIB_CODE, 26, int), + IBMUTEX = _IOW(GPIB_CODE, 26, __s32), IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl), IBPPC = _IOW(GPIB_CODE, 28, struct gpib_ppoll_config_ioctl), IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl), - IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int), + IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, __s32), IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl), - IBEVENT = _IOR(GPIB_CODE, 33, short), - IBRSC = _IOW(GPIB_CODE, 34, int), - IB_T1_DELAY = _IOW(GPIB_CODE, 35, unsigned int), + IBEVENT = _IOR(GPIB_CODE, 33, __s16), + IBRSC = _IOW(GPIB_CODE, 34, __s32), + IB_T1_DELAY = _IOW(GPIB_CODE, 35, __u32), IBLOC = _IO(GPIB_CODE, 36), - IBAUTOSPOLL = _IOW(GPIB_CODE, 38, short), + IBAUTOSPOLL = _IOW(GPIB_CODE, 38, __s16), IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl), - IBPP2_SET = _IOW(GPIB_CODE, 40, short), - IBPP2_GET = _IOR(GPIB_CODE, 41, short), + IBPP2_SET = _IOW(GPIB_CODE, 40, __s16), + IBPP2_GET = _IOR(GPIB_CODE, 41, __s16), IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl), // 44 was IBSELECT_SERIAL_NUMBER IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2) diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c index f81c34160f72..1280530c8987 100644 --- a/drivers/staging/greybus/gpio.c +++ b/drivers/staging/greybus/gpio.c @@ -192,12 +192,6 @@ static int gb_gpio_set_value_operation(struct gb_gpio_controller *ggc, struct gb_gpio_set_value_request request; int ret; - if (ggc->lines[which].direction == 1) { - dev_warn(dev, "refusing to set value of input gpio %u\n", - which); - return -EPERM; - } - request.which = which; request.value = value_high ? 1 : 0; ret = gb_operation_sync(ggc->connection, GB_GPIO_TYPE_SET_VALUE, diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 383a6f7c06f4..b2e7e7267aa4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -741,13 +741,8 @@ void start_bss_network(struct adapter *padapter) if (p && ie_len) { pht_info = (struct HT_info_element *)(p + 2); - if (cur_channel > 14) { - if ((pregpriv->bw_mode & 0xf0) > 0) - cbw40_enable = 1; - } else { - if ((pregpriv->bw_mode & 0x0f) > 0) - cbw40_enable = 1; - } + if ((pregpriv->bw_mode & 0x0f) > 0) + cbw40_enable = 1; if ((cbw40_enable) && (pht_info->infos[0] & BIT(2))) { /* switch to the 40M Hz mode */ diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 6301dbbcc472..b60f5a456543 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2252,13 +2252,8 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ } /* to disable 40M Hz support while gd_bw_40MHz_en = 0 */ - if (channel > 14) { - if ((pregistrypriv->bw_mode & 0xf0) > 0) - cbw40_enable = 1; - } else { - if ((pregistrypriv->bw_mode & 0x0f) > 0) - cbw40_enable = 1; - } + if ((pregistrypriv->bw_mode & 0x0f) > 0) + cbw40_enable = 1; if ((cbw40_enable == 1) && (operation_bw == CHANNEL_WIDTH_40)) { ht_capie.cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH); @@ -2366,13 +2361,8 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe /* todo: */ } - if (channel > 14) { - if ((pregistrypriv->bw_mode & 0xf0) > 0) - cbw40_enable = 1; - } else { - if ((pregistrypriv->bw_mode & 0x0f) > 0) - cbw40_enable = 1; - } + if ((pregistrypriv->bw_mode & 0x0f) > 0) + cbw40_enable = 1; /* update cur_bwmode & cur_ch_offset */ if ((cbw40_enable) && diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c index 73c70b016f00..0c6072d08661 100644 --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c @@ -854,13 +854,8 @@ static void bwmode_update_check(struct adapter *padapter, struct ndis_80211_var_ pHT_info = (struct HT_info_element *)pIE->data; - if (pmlmeext->cur_channel > 14) { - if ((pregistrypriv->bw_mode & 0xf0) > 0) - cbw40_enable = 1; - } else { - if ((pregistrypriv->bw_mode & 0x0f) > 0) - cbw40_enable = 1; - } + if ((pregistrypriv->bw_mode & 0x0f) > 0) + cbw40_enable = 1; if ((pHT_info->infos[0] & BIT(2)) && cbw40_enable) { new_bwmode = CHANNEL_WIDTH_40; diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index 026d58b4bd7f..8c6841f078b4 100644 --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c @@ -381,7 +381,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame * while (true) { /* IOT action */ if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == true) && - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { + (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { pattrib->vcs_mode = CTS_TO_SELF; break; } diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index 0248dff8f2aa..3cbfc305ede3 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -1112,7 +1112,7 @@ void rtw_suspend_common(struct adapter *padapter) if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) { pdbgpriv->dbg_suspend_error_cnt++; - goto exit; + return; } rtw_ps_deny(padapter, PS_DENY_SUSPEND); @@ -1134,10 +1134,6 @@ void rtw_suspend_common(struct adapter *padapter) netdev_dbg(padapter->pnetdev, "rtw suspend success in %d ms\n", jiffies_to_msecs(jiffies - start_time)); - -exit: - - return; } static int rtw_resume_process_normal(struct adapter *padapter) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 1d929aca399c..62d8701d18dd 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -598,7 +598,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par) crtc->vidmem_size >>= 1; /* setup crtc and output member */ - sm750_dev->hwCursor = g_hwcursor; + sm750_dev->hw_cursor = g_hwcursor; crtc->line_pad = 16; crtc->xpanstep = 8; diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h index 9cf8b3d30aac..52ccf1b51630 100644 --- a/drivers/staging/sm750fb/sm750.h +++ b/drivers/staging/sm750fb/sm750.h @@ -113,7 +113,7 @@ struct sm750_dev { * 2: secondary crtc hw cursor enabled * 3: both ctrc hw cursor enabled */ - int hwCursor; + int hw_cursor; }; struct lynx_cursor { diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c index 42304c9f83a2..57eb9d227819 100644 --- a/drivers/staging/vme_user/vme.c +++ b/drivers/staging/vme_user/vme.c @@ -1925,7 +1925,7 @@ EXPORT_SYMBOL(vme_unregister_driver); static int vme_bus_match(struct device *dev, const struct device_driver *drv) { - struct vme_driver *vme_drv; + const struct vme_driver *vme_drv; vme_drv = container_of(drv, struct vme_driver, driver); |