Skip to content

Commit

Permalink
Merge tag 'staging-6.6-rc1' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here are a set of staging driver cleanups for 6.6-rc1. Nothing huge in
  here at all, overall we dropped a few hundred lines of code, it's been
  a quiet development cycle for this subsystem.

  Nothing stands out, everything can be categorized as "minor coding
  style cleanups for staging drivers" and there was one race condition
  fixed.

  Full details in the shortlog.

  All have been in linux-next for a while with no reported problems"

* tag 'staging-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (71 commits)
  staging: rtl8192e: Annotate struct rtllib_txb with __counted_by
  staging: greybus: fix alignment of open parenthesis
  staging: sm750fb: fix sii164InitChip function name
  staging: vme_user: fix check lines should not end with a '('
  staging: vme_user: fix check blank lines not necessary
  staging: rtl8723bs: Use helpers to check broadcast and multicast Ether addresses
  staging: vt6655: replace camel case by snake case
  staging: rtl8192e: Remove unsupported mode IW_MODE_MESH
  staging: rtl8192e: Remove unsupported mode IW_MODE_REPEAT
  staging: rtl8192e: Remove unused function rtllib_start_master_bss()
  staging: rtl8192e: Remove unsupported mode IW_MODE_MASTER
  staging: vt6655: Change camel case variables to snake case
  staging: fieldbus: arcx-anybus: Remove redundant of_match_ptr()
  staging: vme_user: fix alignment of open parenthesis
  Staging: rtl8192e: Rename function RxBaInactTimeout
  Staging: rtl8192e: Rename function TxBaInactTimeout
  Staging: rtl8192e: Rename function BaSetupTimeOut
  Staging: rtl8192e: Rename function TsInitDelBA
  Staging: rtl8192e: Rename function TsInitAddBA
  staging: vme_user: fix check alignment should match open parenthesis
  ...
  • Loading branch information
Linus Torvalds committed Sep 1, 2023
2 parents 51e7acc + aee17df commit e925992
Show file tree
Hide file tree
Showing 62 changed files with 487 additions and 941 deletions.
18 changes: 4 additions & 14 deletions drivers/staging/axis-fifo/axis-fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <linux/device.h>
Expand All @@ -32,10 +34,6 @@
#include <linux/jiffies.h>
#include <linux/miscdevice.h>

#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>

/* ----------------------------
* driver parameters
* ----------------------------
Expand Down Expand Up @@ -839,16 +837,8 @@ static int axis_fifo_probe(struct platform_device *pdev)
* ----------------------------
*/

/* get iospace for the device */
r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r_mem) {
dev_err(fifo->dt_device, "invalid address\n");
rc = -ENODEV;
goto err_initial;
}

/* request physical memory */
fifo->base_addr = devm_ioremap_resource(fifo->dt_device, r_mem);
/* get iospace for the device and request physical memory */
fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
if (IS_ERR(fifo->base_addr)) {
rc = PTR_ERR(fifo->base_addr);
goto err_initial;
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/fieldbus/anybuss/arcx-anybus.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ create_anybus_host(struct platform_device *pdev, int idx)
if (IS_ERR(ops.regmap))
return ERR_CAST(ops.regmap);
ops.irq = platform_get_irq(pdev, idx);
if (ops.irq <= 0)
return ERR_PTR(-EINVAL);
if (ops.irq < 0)
return ERR_PTR(ops.irq);
return devm_anybuss_host_common_probe(&pdev->dev, &ops);
}

Expand Down Expand Up @@ -343,7 +343,7 @@ static struct platform_driver controller_driver = {
.remove_new = controller_remove,
.driver = {
.name = "arcx-anybus-controller",
.of_match_table = of_match_ptr(controller_of_match),
.of_match_table = controller_of_match,
},
};

Expand Down
1 change: 1 addition & 0 deletions drivers/staging/greybus/arche-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/suspend.h>
#include <linux/time.h>
#include <linux/greybus.h>
#include <linux/of.h>
#include "arche_platform.h"

#if IS_ENABLED(CONFIG_USB_HSIC_USB3613)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/greybus/fw-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
}

connection = gb_connection_create(bundle, cport_id,
gb_fw_mgmt_request_handler);
gb_fw_mgmt_request_handler);
if (IS_ERR(connection)) {
ret = PTR_ERR(connection);
dev_err(&bundle->dev,
Expand All @@ -110,7 +110,7 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
}

connection = gb_connection_create(bundle, cport_id,
gb_fw_download_request_handler);
gb_fw_download_request_handler);
if (IS_ERR(connection)) {
dev_err(&bundle->dev, "failed to create download connection (%ld)\n",
PTR_ERR(connection));
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/greybus/pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ struct gb_pwm_chip {
u8 pwm_max; /* max pwm number */

struct pwm_chip chip;
struct pwm_chip *pwm;
};

static inline struct gb_pwm_chip *pwm_chip_to_gb_pwm_chip(struct pwm_chip *chip)
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/imx/imx-media-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/media/imx/imx-media-dev-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Copyright (c) 2016 Mentor Graphics Inc.
*/

#include <linux/of_graph.h>
#include <linux/of_platform.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/imx/imx8mq-mipi-csi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/meson/vdec/esparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <linux/ioctl.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/reset.h>
#include <linux/interrupt.h>
#include <media/videobuf2-dma-contig.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/meson/vdec/vdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Author: Maxime Jourdan <mjourdan@baylibre.com>
*/

#include <linux/of_device.h>
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/module.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/sunxi/cedrus/cedrus_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of_reserved_mem.h>
#include <linux/of_device.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/tegra-video/csi.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/tegra-video/vi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_graph.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/media/tegra-video/vip.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/most/dim2/dim2.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/printk.h>
#include <linux/kernel.h>
#include <linux/init.h>
Expand All @@ -21,6 +20,7 @@
#include <linux/sched.h>
#include <linux/kthread.h>
#include <linux/most.h>
#include <linux/of.h>
#include "hal.h"
#include "errors.h"
#include "sysfs.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/pi433/pi433_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/errno.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/gpio/consumer.h>
Expand Down
11 changes: 2 additions & 9 deletions drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ static void _rtl92e_update_msr(struct net_device *dev)
if (priv->rtllib->link_state == MAC80211_LINKED)
msr |= MSR_LINK_ADHOC;
break;
case IW_MODE_MASTER:
if (priv->rtllib->link_state == MAC80211_LINKED)
msr |= MSR_LINK_MASTER;
break;
default:
break;
}
Expand Down Expand Up @@ -419,10 +415,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)

rtl92e_init_adaptive_rate(dev);

if (priv->reg_chnl_plan == 0xf)
priv->chnl_plan = priv->eeprom_chnl_plan;
else
priv->chnl_plan = priv->reg_chnl_plan;
priv->chnl_plan = priv->eeprom_chnl_plan;

switch (priv->eeprom_customer_id) {
case EEPROM_CID_NetCore:
Expand Down Expand Up @@ -1915,7 +1908,7 @@ void rtl92e_enable_tx(struct net_device *dev)
rtl92e_writel(dev, TX_DESC_BASE[i], priv->tx_ring[i].dma);
}

void rtl92e_ack_irq(struct net_device *dev, u32 *p_inta, u32 *p_intb)
void rtl92e_ack_irq(struct net_device *dev, u32 *p_inta)
{
*p_inta = rtl92e_readl(dev, ISR);
rtl92e_writel(dev, ISR, *p_inta);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool rtl92e_is_halfn_supported_by_ap(struct net_device *dev);
bool rtl92e_get_nmode_support_by_sec(struct net_device *dev);
bool rtl92e_is_tx_stuck(struct net_device *dev);
bool rtl92e_is_rx_stuck(struct net_device *dev);
void rtl92e_ack_irq(struct net_device *dev, u32 *p_inta, u32 *p_intb);
void rtl92e_ack_irq(struct net_device *dev, u32 *p_inta);
void rtl92e_enable_rx(struct net_device *dev);
void rtl92e_enable_tx(struct net_device *dev);
void rtl92e_enable_irq(struct net_device *dev);
Expand Down
17 changes: 7 additions & 10 deletions drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,20 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
}

void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent, u8 is_mesh)
u16 KeyType, const u8 *MacAddr, u32 *KeyContent)
{
struct r8192_priv *priv = rtllib_priv(dev);
struct rtllib_device *ieee = priv->rtllib;

if (EntryNo >= TOTAL_CAM_ENTRY)
return;

if (!is_mesh) {
ieee->swcamtable[EntryNo].bused = true;
ieee->swcamtable[EntryNo].key_index = KeyIndex;
ieee->swcamtable[EntryNo].key_type = KeyType;
memcpy(ieee->swcamtable[EntryNo].macaddr, MacAddr, 6);
ieee->swcamtable[EntryNo].useDK = DefaultKey;
memcpy(ieee->swcamtable[EntryNo].key_buf, (u8 *)KeyContent, 16);
}
ieee->swcamtable[EntryNo].bused = true;
ieee->swcamtable[EntryNo].key_index = KeyIndex;
ieee->swcamtable[EntryNo].key_type = KeyType;
memcpy(ieee->swcamtable[EntryNo].macaddr, MacAddr, 6);
ieee->swcamtable[EntryNo].useDK = 0;
memcpy(ieee->swcamtable[EntryNo].key_buf, (u8 *)KeyContent, 16);
}

void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/rtl8192e/rtl8192e/rtl_cam.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent);
void rtl92e_set_swcam(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
u16 KeyType, const u8 *MacAddr, u8 DefaultKey,
u32 *KeyContent, u8 is_mesh);
u16 KeyType, const u8 *MacAddr, u32 *KeyContent);
void rtl92e_cam_restore(struct net_device *dev);

#endif
25 changes: 1 addition & 24 deletions drivers/staging/rtl8192e/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,6 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
(&priv->rtllib->pwr_save_ctrl);
bool init_status;

priv->bdisable_nic = false;

priv->up = 1;
priv->rtllib->ieee_up = 1;

Expand Down Expand Up @@ -760,13 +758,11 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->up_first_time = 1;
priv->blinked_ingpio = false;
priv->being_init_adapter = false;
priv->bdisable_nic = false;
priv->txringcount = 64;
priv->rxbuffersize = 9100;
priv->rxringcount = MAX_RX_COUNT;
priv->irq_enabled = 0;
priv->chan = 1;
priv->reg_chnl_plan = 0xf;
priv->rtllib->mode = WIRELESS_MODE_AUTO;
priv->rtllib->iw_mode = IW_MODE_INFRA;
priv->rtllib->net_promiscuous_md = false;
Expand All @@ -778,7 +774,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->retry_data = DEFAULT_RETRY_DATA;
priv->rtllib->rts = DEFAULT_RTS_THRESHOLD;
priv->rtllib->rate = 110;
priv->rtllib->short_slot = 1;
priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
priv->bcck_in_ch14 = false;
priv->cck_present_attn = 0;
Expand All @@ -804,15 +799,9 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->rtllib->iw_mode = IW_MODE_INFRA;
priv->rtllib->active_scan = 1;
priv->rtllib->be_scan_inprogress = false;
priv->rtllib->modulation = RTLLIB_CCK_MODULATION |
RTLLIB_OFDM_MODULATION;
priv->rtllib->host_encrypt = 1;
priv->rtllib->host_decrypt = 1;

priv->rtllib->fts = DEFAULT_FRAG_THRESHOLD;

priv->card_type = PCI;

priv->fw_info = vzalloc(sizeof(struct rt_firmware));
if (!priv->fw_info)
netdev_err(dev,
Expand Down Expand Up @@ -1504,12 +1493,6 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
int idx;
u32 fwinfo_size = 0;

if (priv->bdisable_nic) {
netdev_warn(dev, "%s: Nic is disabled! Can't tx packet.\n",
__func__);
return skb->len;
}

priv->rtllib->bAwakePktSent = true;

fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
Expand Down Expand Up @@ -1990,16 +1973,13 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
struct r8192_priv *priv = rtllib_priv(dev);
unsigned long flags;
u32 inta;
u32 intb;

intb = 0;

if (priv->irq_enabled == 0)
goto done;

spin_lock_irqsave(&priv->irq_th_lock, flags);

rtl92e_ack_irq(dev, &inta, &intb);
rtl92e_ack_irq(dev, &inta);

if (!inta) {
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
Expand Down Expand Up @@ -2251,20 +2231,17 @@ bool rtl92e_enable_nic(struct net_device *dev)

if (!priv->up) {
netdev_warn(dev, "%s(): Driver is already down!\n", __func__);
priv->bdisable_nic = false;
return false;
}

init_status = rtl92e_start_adapter(dev);
if (!init_status) {
netdev_warn(dev, "%s(): Initialization failed!\n", __func__);
priv->bdisable_nic = false;
return false;
}
RT_CLEAR_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);

rtl92e_irq_enable(dev);
priv->bdisable_nic = false;
return init_status;
}

Expand Down
Loading

0 comments on commit e925992

Please sign in to comment.