Skip to content

Commit b83a708

Browse files
committed
Merge tag 'staging-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver updates from Greg KH: "Here is the large set of staging driver changes for 6.2-rc1. Another round of cleanups for staging drivers with no big additions. Overall more lines were removed than added, always a nice sign, with nothing happening in here other than general coding style cleanups and minor fixes in the drivers. Full, boring, details are in the shortlog. All of these have been in linux-next for a while with no reported problems" * tag 'staging-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (253 commits) vme: Use root_device_register() not underlined version staging: rtl8192e: Fix spelling mistake "ContryIE" -> "CountryIE" vme: Fix error not catched in fake_init() staging: vme_user: remove multiple blank lines staging: r8188eu: use subtype helper in rtw_check_bcn_info staging: r8188eu: use subtype helpers in collect_bss_info staging: r8188eu: remove unused da parameter staging: r8188eu: merge two probereq_p2p functions staging: r8188eu: simplify err handling for unknown station staging: r8188eu: handle the non-ap case first staging: r8188eu: move bBusyTraffic update staging: r8188eu: read reason code from ieee80211_mgmt staging: r8188eu: use ieee80211_mgmt to parse addresses staging: r8188eu: remove a variable staging: r8188eu: simplify error handling for missing station staging: r8188eu: stop beacon processing if kmalloc fails staging: r8188eu: exit if beacon is not from our bss staging: r8188eu: simplify update_sta_support_rate params staging: r8188eu: use ie buffer in update_beacon_info staging: r8188eu: pass only ies to process_p2p_ps_ie ...
2 parents 58bcac1 + 37aa6b9 commit b83a708

File tree

122 files changed

+1741
-2789
lines changed

Some content is hidden

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

122 files changed

+1741
-2789
lines changed

arch/mips/include/asm/octeon/cvmx.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ static inline uint64_t cvmx_build_bits(uint64_t high_bit,
154154

155155
/**
156156
* Convert a memory pointer (void*) into a hardware compatible
157-
* memory address (uint64_t). Octeon hardware widgets don't
157+
* memory address (phys_addr_t). Octeon hardware widgets don't
158158
* understand logical addresses.
159159
*
160160
* @ptr: C style memory pointer
161161
* Returns Hardware physical address
162162
*/
163-
static inline uint64_t cvmx_ptr_to_phys(void *ptr)
163+
static inline phys_addr_t cvmx_ptr_to_phys(void *ptr)
164164
{
165165
if (sizeof(void *) == 8) {
166166
/*

drivers/staging/emxx_udc/emxx_udc.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,7 @@ static int _nbu2ss_in_dma(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
10041004
/* MAX Packet Size */
10051005
mpkt = _nbu2ss_readl(&preg->EP_REGS[num].EP_PCKT_ADRS) & EPN_MPKT;
10061006

1007-
if ((DMA_MAX_COUNT * mpkt) < length)
1008-
i_write_length = DMA_MAX_COUNT * mpkt;
1009-
else
1010-
i_write_length = length;
1007+
i_write_length = min(DMA_MAX_COUNT * mpkt, length);
10111008

10121009
/*------------------------------------------------------------*/
10131010
/* Number of transmission packets */

drivers/staging/fieldbus/dev_core.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static ssize_t online_show(struct device *dev, struct device_attribute *attr,
2828
{
2929
struct fieldbus_dev *fb = dev_get_drvdata(dev);
3030

31-
return sprintf(buf, "%d\n", !!fb->online);
31+
return sysfs_emit(buf, "%d\n", !!fb->online);
3232
}
3333
static DEVICE_ATTR_RO(online);
3434

@@ -39,7 +39,7 @@ static ssize_t enabled_show(struct device *dev, struct device_attribute *attr,
3939

4040
if (!fb->enable_get)
4141
return -EINVAL;
42-
return sprintf(buf, "%d\n", !!fb->enable_get(fb));
42+
return sysfs_emit(buf, "%d\n", !!fb->enable_get(fb));
4343
}
4444

4545
static ssize_t enabled_store(struct device *dev, struct device_attribute *attr,
@@ -66,11 +66,8 @@ static ssize_t card_name_show(struct device *dev, struct device_attribute *attr,
6666
{
6767
struct fieldbus_dev *fb = dev_get_drvdata(dev);
6868

69-
/*
70-
* card_name was provided by child driver, could potentially be long.
71-
* protect against buffer overrun.
72-
*/
73-
return snprintf(buf, PAGE_SIZE, "%s\n", fb->card_name);
69+
/* card_name was provided by child driver. */
70+
return sysfs_emit(buf, "%s\n", fb->card_name);
7471
}
7572
static DEVICE_ATTR_RO(card_name);
7673

@@ -79,7 +76,7 @@ static ssize_t read_area_size_show(struct device *dev,
7976
{
8077
struct fieldbus_dev *fb = dev_get_drvdata(dev);
8178

82-
return sprintf(buf, "%zu\n", fb->read_area_sz);
79+
return sysfs_emit(buf, "%zu\n", fb->read_area_sz);
8380
}
8481
static DEVICE_ATTR_RO(read_area_size);
8582

@@ -88,7 +85,7 @@ static ssize_t write_area_size_show(struct device *dev,
8885
{
8986
struct fieldbus_dev *fb = dev_get_drvdata(dev);
9087

91-
return sprintf(buf, "%zu\n", fb->write_area_sz);
88+
return sysfs_emit(buf, "%zu\n", fb->write_area_sz);
9289
}
9390
static DEVICE_ATTR_RO(write_area_size);
9491

@@ -116,7 +113,7 @@ static ssize_t fieldbus_type_show(struct device *dev,
116113
break;
117114
}
118115

119-
return sprintf(buf, "%s\n", t);
116+
return sysfs_emit(buf, "%s\n", t);
120117
}
121118
static DEVICE_ATTR_RO(fieldbus_type);
122119

drivers/staging/gdm724x/gdm_tty.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121

2222
#define MUX_TX_MAX_SIZE 2048
2323

24-
#define GDM_TTY_READY(gdm) (gdm && gdm->tty_dev && gdm->port.count)
24+
static inline bool gdm_tty_ready(struct gdm *gdm)
25+
{
26+
return gdm && gdm->tty_dev && gdm->port.count;
27+
}
2528

2629
static struct tty_driver *gdm_driver[TTY_MAX_COUNT];
2730
static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
@@ -113,7 +116,7 @@ static int gdm_tty_recv_complete(void *data,
113116
{
114117
struct gdm *gdm = tty_dev->gdm[index];
115118

116-
if (!GDM_TTY_READY(gdm)) {
119+
if (!gdm_tty_ready(gdm)) {
117120
if (complete == RECV_PACKET_PROCESS_COMPLETE)
118121
gdm->tty_dev->recv_func(gdm->tty_dev->priv_dev,
119122
gdm_tty_recv_complete);
@@ -140,7 +143,7 @@ static void gdm_tty_send_complete(void *arg)
140143
{
141144
struct gdm *gdm = arg;
142145

143-
if (!GDM_TTY_READY(gdm))
146+
if (!gdm_tty_ready(gdm))
144147
return;
145148

146149
tty_port_tty_wakeup(&gdm->port);
@@ -154,7 +157,7 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
154157
int sent_len = 0;
155158
int sending_len = 0;
156159

157-
if (!GDM_TTY_READY(gdm))
160+
if (!gdm_tty_ready(gdm))
158161
return -ENODEV;
159162

160163
if (!len)
@@ -181,7 +184,7 @@ static unsigned int gdm_tty_write_room(struct tty_struct *tty)
181184
{
182185
struct gdm *gdm = tty->driver_data;
183186

184-
if (!GDM_TTY_READY(gdm))
187+
if (!gdm_tty_ready(gdm))
185188
return 0;
186189

187190
return WRITE_SIZE;

drivers/staging/greybus/tools/loopback_test.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ static void show_loopback_devices(struct loopback_test *t)
239239

240240
for (i = 0; i < t->device_count; i++)
241241
printf("device[%d] = %s\n", i, t->devices[i].name);
242-
243242
}
244243

245244
int open_sysfs(const char *sys_pfx, const char *node, int flags)
@@ -274,7 +273,6 @@ float read_sysfs_float_fd(int fd, const char *sys_pfx, const char *node)
274273
char buf[SYSFS_MAX_INT];
275274

276275
if (read(fd, buf, sizeof(buf)) < 0) {
277-
278276
fprintf(stderr, "unable to read from %s%s %s\n", sys_pfx, node,
279277
strerror(errno));
280278
close(fd);
@@ -367,7 +365,6 @@ static int get_results(struct loopback_test *t)
367365
r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
368366
r->gbphy_firmware_latency_jitter =
369367
r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;
370-
371368
}
372369

373370
/*calculate the aggregate results of all enabled devices */
@@ -407,7 +404,6 @@ static int get_results(struct loopback_test *t)
407404
r->apbridge_unipro_latency_max - r->apbridge_unipro_latency_min;
408405
r->gbphy_firmware_latency_jitter =
409406
r->gbphy_firmware_latency_max - r->gbphy_firmware_latency_min;
410-
411407
}
412408

413409
return 0;
@@ -536,7 +532,6 @@ static int log_results(struct loopback_test *t)
536532
fprintf(stderr, "unable to open %s for appending\n", file_name);
537533
abort();
538534
}
539-
540535
}
541536
for (i = 0; i < t->device_count; i++) {
542537
if (!device_enabled(t, i))
@@ -550,10 +545,8 @@ static int log_results(struct loopback_test *t)
550545
if (ret == -1)
551546
fprintf(stderr, "unable to write %d bytes to csv.\n", len);
552547
}
553-
554548
}
555549

556-
557550
if (t->aggregate_output) {
558551
len = format_output(t, &t->aggregate_results, "aggregate",
559552
data, sizeof(data), &tm);
@@ -675,6 +668,7 @@ static int open_poll_files(struct loopback_test *t)
675668
static int close_poll_files(struct loopback_test *t)
676669
{
677670
int i;
671+
678672
for (i = 0; i < t->poll_count; i++)
679673
close(t->fds[i].fd);
680674

@@ -740,7 +734,6 @@ static int wait_for_complete(struct loopback_test *t)
740734
ts = &t->poll_timeout;
741735

742736
while (1) {
743-
744737
ret = ppoll(t->fds, t->poll_count, ts, &mask_old);
745738
if (ret <= 0) {
746739
stop_tests(t);
@@ -780,7 +773,6 @@ static void prepare_devices(struct loopback_test *t)
780773
if (t->stop_all || device_enabled(t, i))
781774
write_sysfs_val(t->devices[i].sysfs_entry, "type", 0);
782775

783-
784776
for (i = 0; i < t->device_count; i++) {
785777
if (!device_enabled(t, i))
786778
continue;
@@ -823,7 +815,6 @@ static int start(struct loopback_test *t)
823815
return 0;
824816
}
825817

826-
827818
void loopback_run(struct loopback_test *t)
828819
{
829820
int i;
@@ -852,7 +843,6 @@ void loopback_run(struct loopback_test *t)
852843
if (ret)
853844
goto err;
854845

855-
856846
get_results(t);
857847

858848
log_results(t);
@@ -861,7 +851,6 @@ void loopback_run(struct loopback_test *t)
861851

862852
err:
863853
printf("Error running test\n");
864-
return;
865854
}
866855

867856
static int sanity_check(struct loopback_test *t)
@@ -881,10 +870,8 @@ static int sanity_check(struct loopback_test *t)
881870
fprintf(stderr, "Bad device mask %x\n", (1 << i));
882871
return -1;
883872
}
884-
885873
}
886874

887-
888875
return 0;
889876
}
890877

drivers/staging/iio/frequency/ad9834.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,9 @@ static IIO_DEV_ATTR_PHASE(0, 1, 0200, NULL, ad9834_write, AD9834_REG_PHASE1);
331331
static IIO_DEV_ATTR_PHASESYMBOL(0, 0200, NULL, ad9834_write, AD9834_PSEL);
332332
static IIO_CONST_ATTR_PHASE_SCALE(0, "0.0015339808"); /* 2PI/2^12 rad*/
333333

334-
static IIO_DEV_ATTR_PINCONTROL_EN(0, 0200, NULL,
335-
ad9834_write, AD9834_PIN_SW);
334+
static IIO_DEV_ATTR_PINCONTROL_EN(0, 0200, NULL, ad9834_write, AD9834_PIN_SW);
336335
static IIO_DEV_ATTR_OUT_ENABLE(0, 0200, NULL, ad9834_write, AD9834_RESET);
337-
static IIO_DEV_ATTR_OUTY_ENABLE(0, 1, 0200, NULL,
338-
ad9834_write, AD9834_OPBITEN);
336+
static IIO_DEV_ATTR_OUTY_ENABLE(0, 1, 0200, NULL, ad9834_write, AD9834_OPBITEN);
339337
static IIO_DEV_ATTR_OUT_WAVETYPE(0, 0, ad9834_store_wavetype, 0);
340338
static IIO_DEV_ATTR_OUT_WAVETYPE(0, 1, ad9834_store_wavetype, 1);
341339

drivers/staging/iio/meter/ade7854-i2c.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ static int ade7854_i2c_read_reg(struct device *dev,
109109
return ret;
110110
}
111111

112-
static int ade7854_i2c_probe(struct i2c_client *client,
113-
const struct i2c_device_id *id)
112+
static int ade7854_i2c_probe(struct i2c_client *client)
114113
{
115114
struct ade7854_state *st;
116115
struct iio_dev *indio_dev;
@@ -141,7 +140,7 @@ static struct i2c_driver ade7854_i2c_driver = {
141140
.driver = {
142141
.name = "ade7854",
143142
},
144-
.probe = ade7854_i2c_probe,
143+
.probe_new = ade7854_i2c_probe,
145144
.id_table = ade7854_id,
146145
};
147146
module_i2c_driver(ade7854_i2c_driver);

drivers/staging/ks7010/TODO

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Now the TODOs:
2727
- fix the 'card removal' event when card is inserted when booting
2828
- check what other upstream wireless mechanisms can be used instead of the
2929
custom ones here
30+
- Switch to use LIB80211.
31+
- Switch to use MAC80211.
32+
- Switch to use CFG80211.
3033

3134
Please send any patches to:
3235
Greg Kroah-Hartman <[email protected]>

0 commit comments

Comments
 (0)