Skip to content

Commit 0601f25

Browse files
committed
Merge tag 'staging-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH: "Here is the "boring" staging driver update for 6.3-rc1. Nothing major in here at all, it's just lots of tiny code cleanups to bring some of the staging drivers more in line with the real portion of the kernel (apis and coding style.) Overall we remove more lines of code than we add, always a nice result. The big work was done by Martin Kaiser and Philipp Hortmann, both tackling some of the older wifi drivers, removing unused code and structures and a file in one case. Full details of the changes are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (219 commits) staging: r8188eu: Revert "staging: r8188eu: simplify rtw_get_ff_hwaddr" staging: r8188eu: replace hand coded loop with list_for_each_entry staging: r8188eu: merge _rtw_enqueue_cmd into its caller most: add maintainer entry staging: rtl8192e: Use BIT() instead of << for bit field MSR_LINK_MASK staging: rtl8192e: Rename DM_RxPathSelTable staging: rtl8192e: Rename diff_TH and disabledRF staging: rtl8192e: Rename Enable, cck_Rx_path and SS_TH_low staging: rtl8192e: Rename RateAdaptiveTH.., VeryLowRSSI and WAIotTHVal staging: rtl8192e: Rename RxPathSelectio.., RateAdaptive.. and RateAdap.. staging: rtl8192e: Rename OFDM_Table.., CCK_Table_.. and RxPathSelecti.. staging: rtl8192e: Rename MacBlkCtrl and remove double definition staging: rtl8192e: Remove blank lines in r8192E_hw.h, rtl_core.h and .. staging: rtl8192e: Rename AcmHw_ViqEn, AcmHw_VoqEn and ANAPAR_FOR_8192PciE staging: r8188eu: bagg_pkt parameter is not used staging: r8188eu: simplify rtw_get_ff_hwaddr staging: r8188eu: simplify xmit_buf flags staging: r8188eu: xmit_buf's ff_hwaddr is not used staging: r8188eu: remove unused frametag defines staging: r8188eu: simplify rtw_alloc_xmitframe ...
2 parents 17cd4d6 + b592932 commit 0601f25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1330
-2666
lines changed

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14069,6 +14069,16 @@ F: drivers/regulator/mpq7920.c
1406914069
F: drivers/regulator/mpq7920.h
1407014070
F: include/linux/mfd/mp2629.h
1407114071

14072+
MOST(R) TECHNOLOGY DRIVER
14073+
M: Parthiban Veerasooran <[email protected]>
14074+
M: Christian Gromm <[email protected]>
14075+
S: Maintained
14076+
F: Documentation/ABI/testing/configfs-most
14077+
F: Documentation/ABI/testing/sysfs-bus-most
14078+
F: drivers/most/
14079+
F: drivers/staging/most/
14080+
F: include/linux/most.h
14081+
1407214082
MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
1407314083
S: Orphan
1407414084
W: http://popies.net/meye/

drivers/staging/emxx_udc/emxx_udc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2587,10 +2587,15 @@ static int nbu2ss_ep_queue(struct usb_ep *_ep,
25872587
req->unaligned = false;
25882588

25892589
if (req->unaligned) {
2590-
if (!ep->virt_buf)
2590+
if (!ep->virt_buf) {
25912591
ep->virt_buf = dma_alloc_coherent(udc->dev, PAGE_SIZE,
25922592
&ep->phys_buf,
25932593
GFP_ATOMIC | GFP_DMA);
2594+
if (!ep->virt_buf) {
2595+
spin_unlock_irqrestore(&udc->lock, flags);
2596+
return -ENOMEM;
2597+
}
2598+
}
25942599
if (ep->epnum > 0) {
25952600
if (ep->direct == USB_DIR_IN)
25962601
memcpy(ep->virt_buf, req->req.buf,

drivers/staging/greybus/gpio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ struct gb_gpio_controller {
4343
};
4444
#define gpio_chip_to_gb_gpio_controller(chip) \
4545
container_of(chip, struct gb_gpio_controller, chip)
46-
#define irq_data_to_gpio_chip(d) (d->domain->host_data)
46+
47+
static struct gpio_chip *irq_data_to_gpio_chip(struct irq_data *d)
48+
{
49+
return d->domain->host_data;
50+
}
4751

4852
static int gb_gpio_line_count_operation(struct gb_gpio_controller *ggc)
4953
{

drivers/staging/greybus/usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct gb_usb_hub_control_request {
2727
};
2828

2929
struct gb_usb_hub_control_response {
30-
u8 buf[0];
30+
DECLARE_FLEX_ARRAY(u8, buf);
3131
};
3232

3333
struct gb_usb_device {

drivers/staging/ks7010/ks_wlan_net.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ static int ks_wlan_get_nick(struct net_device *dev,
382382
return -EPERM;
383383

384384
/* for SLEEP MODE */
385-
strncpy(extra, priv->nick, 16);
386-
extra[16] = '\0';
385+
strscpy(extra, priv->nick, 17);
387386
dwrq->data.length = strlen(extra) + 1;
388387

389388
return 0;

drivers/staging/pi433/TODO

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
* Some missing data (marked with ###) needs to be added in the documentation
44
* Change (struct pi433_tx_cfg)->bit_rate to be a u32 so that we can support
55
bit rates up to 300kbps per the spec.
6+
-> This configuration needs to be moved to sysfs instead of being done through
7+
IOCTL. Going forward, we need to port userspace tools to use sysfs instead
8+
of IOCTL and then we would delete IOCTL.

drivers/staging/pi433/pi433_if.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
static dev_t pi433_dev;
5656
static DEFINE_IDR(pi433_idr);
5757
static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */
58+
static struct dentry *root_dir; /* debugfs root directory for the driver */
5859

5960
static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */
6061

@@ -1306,8 +1307,7 @@ static int pi433_probe(struct spi_device *spi)
13061307
/* spi setup */
13071308
spi_set_drvdata(spi, device);
13081309

1309-
entry = debugfs_create_dir(dev_name(device->dev),
1310-
debugfs_lookup(KBUILD_MODNAME, NULL));
1310+
entry = debugfs_create_dir(dev_name(device->dev), root_dir);
13111311
debugfs_create_file("regs", 0400, entry, device, &pi433_debugfs_regs_fops);
13121312

13131313
return 0;
@@ -1333,9 +1333,8 @@ static int pi433_probe(struct spi_device *spi)
13331333
static void pi433_remove(struct spi_device *spi)
13341334
{
13351335
struct pi433_device *device = spi_get_drvdata(spi);
1336-
struct dentry *mod_entry = debugfs_lookup(KBUILD_MODNAME, NULL);
13371336

1338-
debugfs_remove(debugfs_lookup(dev_name(device->dev), mod_entry));
1337+
debugfs_lookup_and_remove(dev_name(device->dev), root_dir);
13391338

13401339
/* free GPIOs */
13411340
free_gpio(device);
@@ -1408,7 +1407,7 @@ static int __init pi433_init(void)
14081407
return PTR_ERR(pi433_class);
14091408
}
14101409

1411-
debugfs_create_dir(KBUILD_MODNAME, NULL);
1410+
root_dir = debugfs_create_dir(KBUILD_MODNAME, NULL);
14121411

14131412
status = spi_register_driver(&pi433_spi_driver);
14141413
if (status < 0) {
@@ -1427,7 +1426,7 @@ static void __exit pi433_exit(void)
14271426
spi_unregister_driver(&pi433_spi_driver);
14281427
class_destroy(pi433_class);
14291428
unregister_chrdev(MAJOR(pi433_dev), pi433_spi_driver.driver.name);
1430-
debugfs_remove_recursive(debugfs_lookup(KBUILD_MODNAME, NULL));
1429+
debugfs_remove(root_dir);
14311430
}
14321431
module_exit(pi433_exit);
14331432

drivers/staging/r8188eu/core/rtw_cmd.c

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,6 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv)
2828
}
2929
}
3030

31-
/* Calling Context:
32-
*
33-
* rtw_enqueue_cmd can only be called between kernel thread,
34-
* since only spin_lock is used.
35-
*
36-
* ISR/Call-Back functions can't call this sub-function.
37-
*/
38-
39-
static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
40-
{
41-
unsigned long flags;
42-
43-
if (!obj)
44-
goto exit;
45-
46-
spin_lock_irqsave(&queue->lock, flags);
47-
48-
list_add_tail(&obj->list, &queue->queue);
49-
50-
spin_unlock_irqrestore(&queue->lock, flags);
51-
52-
exit:
53-
54-
return _SUCCESS;
55-
}
56-
5731
int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
5832
{
5933
init_completion(&pcmdpriv->enqueue_cmd);
@@ -65,8 +39,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
6539

6640
/* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */
6741

68-
pcmdpriv->cmd_seq = 1;
69-
7042
pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
7143
GFP_KERNEL);
7244

@@ -127,28 +99,25 @@ static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
12799

128100
u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
129101
{
130-
int res = _FAIL;
102+
unsigned long flags;
131103
struct adapter *padapter = pcmdpriv->padapter;
132104

133105
if (!cmd_obj)
134-
goto exit;
106+
return _FAIL;
135107

136108
cmd_obj->padapter = padapter;
137109

138-
res = rtw_cmd_filter(pcmdpriv, cmd_obj);
139-
if (res == _FAIL) {
110+
if (rtw_cmd_filter(pcmdpriv, cmd_obj) == _FAIL) {
140111
rtw_free_cmd_obj(cmd_obj);
141-
goto exit;
112+
return _FAIL;
142113
}
143114

144-
res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
145-
146-
if (res == _SUCCESS)
147-
complete(&pcmdpriv->enqueue_cmd);
148-
149-
exit:
115+
spin_lock_irqsave(&pcmdpriv->cmd_queue.lock, flags);
116+
list_add_tail(&cmd_obj->list, &pcmdpriv->cmd_queue.queue);
117+
spin_unlock_irqrestore(&pcmdpriv->cmd_queue.lock, flags);
150118

151-
return res;
119+
complete(&pcmdpriv->enqueue_cmd);
120+
return _SUCCESS;
152121
}
153122

154123
struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
@@ -233,8 +202,6 @@ int rtw_cmd_thread(void *context)
233202
ret = cmd_hdl(pcmd->padapter, pcmdbuf);
234203
pcmd->res = ret;
235204
}
236-
237-
pcmdpriv->cmd_seq++;
238205
} else {
239206
pcmd->res = H2C_PARAMETERS_ERROR;
240207
}
@@ -1201,24 +1168,20 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
12011168
}
12021169
}
12031170

1204-
u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
1171+
void rtw_chk_hi_queue_cmd(struct adapter *padapter)
12051172
{
12061173
struct cmd_obj *ph2c;
12071174
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
12081175
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
1209-
u8 res = _SUCCESS;
12101176

12111177
ph2c = kzalloc(sizeof(*ph2c), GFP_ATOMIC);
1212-
if (!ph2c) {
1213-
res = _FAIL;
1214-
goto exit;
1215-
}
1178+
if (!ph2c)
1179+
return;
12161180

12171181
pdrvextra_cmd_parm = kzalloc(sizeof(*pdrvextra_cmd_parm), GFP_ATOMIC);
12181182
if (!pdrvextra_cmd_parm) {
12191183
kfree(ph2c);
1220-
res = _FAIL;
1221-
goto exit;
1184+
return;
12221185
}
12231186

12241187
pdrvextra_cmd_parm->ec_id = CHECK_HIQ_WK_CID;
@@ -1227,9 +1190,7 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
12271190

12281191
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
12291192

1230-
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
1231-
exit:
1232-
return res;
1193+
rtw_enqueue_cmd(pcmdpriv, ph2c);
12331194
}
12341195

12351196
u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)

drivers/staging/r8188eu/core/rtw_fw.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ static int block_write(struct adapter *padapter, u8 *buffer, u32 size)
8989
addr = FW_8188E_START_ADDRESS + i * block_size;
9090
data = buffer + i * block_size;
9191

92-
ret = rtw_writeN(padapter, addr, block_size, data);
93-
if (ret == _FAIL)
94-
goto exit;
92+
if (rtw_writeN(padapter, addr, block_size, data))
93+
return _FAIL;
9594
}
9695

9796
if (remain) {
@@ -105,9 +104,8 @@ static int block_write(struct adapter *padapter, u8 *buffer, u32 size)
105104
addr = FW_8188E_START_ADDRESS + offset + i * block_size;
106105
data = buffer + offset + i * block_size;
107106

108-
ret = rtw_writeN(padapter, addr, block_size, data);
109-
if (ret == _FAIL)
110-
goto exit;
107+
if (rtw_writeN(padapter, addr, block_size, data))
108+
return _FAIL;
111109
}
112110
}
113111

drivers/staging/r8188eu/core/rtw_mlme.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,6 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
444444
if (check_fwstate(pmlmepriv, _FW_LINKED) &&
445445
is_same_network(&pmlmepriv->cur_network.network, pnetwork)) {
446446
update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true);
447-
rtw_update_protection(adapter, (pmlmepriv->cur_network.network.IEs) + sizeof(struct ndis_802_11_fixed_ie),
448-
pmlmepriv->cur_network.network.IELength);
449447
}
450448

451449
}
@@ -1027,9 +1025,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
10271025
break;
10281026
}
10291027

1030-
rtw_update_protection(padapter, (cur_network->network.IEs) +
1031-
sizeof(struct ndis_802_11_fixed_ie),
1032-
(cur_network->network.IELength));
10331028
rtw_update_ht_cap(padapter, cur_network->network.IEs, cur_network->network.IELength);
10341029
}
10351030

0 commit comments

Comments
 (0)