Skip to content

Commit cc250e2

Browse files
committed
Merge tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc fixes from Greg KH: "Here are a few small char/misc driver fixes for 4.10-rc3. Two MEI driver fixes, and three NVMEM patches for reported issues, and a new Hyper-V driver MAINTAINER update. Nothing major at all, all have been in linux-next with no reported issues" * tag 'char-misc-4.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: hyper-v: Add myself as additional MAINTAINER nvmem: fix nvmem_cell_read() return type doc nvmem: imx-ocotp: Fix wrong register size nvmem: qfprom: Allow single byte accesses for read/write mei: move write cb to completion on credentials failures mei: bus: fix mei_cldev_enable KDoc
2 parents 6ea17ed + 421463b commit cc250e2

File tree

6 files changed

+24
-19
lines changed

6 files changed

+24
-19
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5965,6 +5965,7 @@ F: drivers/media/platform/sti/hva
59655965
Hyper-V CORE AND DRIVERS
59665966
M: "K. Y. Srinivasan" <kys@microsoft.com>
59675967
M: Haiyang Zhang <haiyangz@microsoft.com>
5968+
M: Stephen Hemminger <sthemmin@microsoft.com>
59685969
L: devel@linuxdriverproject.org
59695970
S: Maintained
59705971
F: arch/x86/include/asm/mshyperv.h

drivers/misc/mei/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ bool mei_cldev_enabled(struct mei_cl_device *cldev)
450450
EXPORT_SYMBOL_GPL(mei_cldev_enabled);
451451

452452
/**
453-
* mei_cldev_enable_device - enable me client device
453+
* mei_cldev_enable - enable me client device
454454
* create connection with me client
455455
*
456456
* @cldev: me client device

drivers/misc/mei/client.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
15411541

15421542
rets = first_chunk ? mei_cl_tx_flow_ctrl_creds(cl) : 1;
15431543
if (rets < 0)
1544-
return rets;
1544+
goto err;
15451545

15461546
if (rets == 0) {
15471547
cl_dbg(dev, cl, "No flow control credentials: not sending.\n");
@@ -1575,26 +1575,30 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
15751575
cb->buf.size, cb->buf_idx);
15761576

15771577
rets = mei_write_message(dev, &mei_hdr, buf->data + cb->buf_idx);
1578-
if (rets) {
1579-
cl->status = rets;
1580-
list_move_tail(&cb->list, &cmpl_list->list);
1581-
return rets;
1582-
}
1578+
if (rets)
1579+
goto err;
15831580

15841581
cl->status = 0;
15851582
cl->writing_state = MEI_WRITING;
15861583
cb->buf_idx += mei_hdr.length;
15871584
cb->completed = mei_hdr.msg_complete == 1;
15881585

15891586
if (first_chunk) {
1590-
if (mei_cl_tx_flow_ctrl_creds_reduce(cl))
1591-
return -EIO;
1587+
if (mei_cl_tx_flow_ctrl_creds_reduce(cl)) {
1588+
rets = -EIO;
1589+
goto err;
1590+
}
15921591
}
15931592

15941593
if (mei_hdr.msg_complete)
15951594
list_move_tail(&cb->list, &dev->write_waiting_list.list);
15961595

15971596
return 0;
1597+
1598+
err:
1599+
cl->status = rets;
1600+
list_move_tail(&cb->list, &cmpl_list->list);
1601+
return rets;
15981602
}
15991603

16001604
/**

drivers/nvmem/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,8 @@ static int __nvmem_cell_read(struct nvmem_device *nvmem,
981981
* @cell: nvmem cell to be read.
982982
* @len: pointer to length of cell which will be populated on successful read.
983983
*
984-
* Return: ERR_PTR() on error or a valid pointer to a char * buffer on success.
985-
* The buffer should be freed by the consumer with a kfree().
984+
* Return: ERR_PTR() on error or a valid pointer to a buffer on success. The
985+
* buffer should be freed by the consumer with a kfree().
986986
*/
987987
void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
988988
{

drivers/nvmem/imx-ocotp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static struct nvmem_config imx_ocotp_nvmem_config = {
7171

7272
static const struct of_device_id imx_ocotp_dt_ids[] = {
7373
{ .compatible = "fsl,imx6q-ocotp", (void *)128 },
74-
{ .compatible = "fsl,imx6sl-ocotp", (void *)32 },
74+
{ .compatible = "fsl,imx6sl-ocotp", (void *)64 },
7575
{ .compatible = "fsl,imx6sx-ocotp", (void *)128 },
7676
{ },
7777
};

drivers/nvmem/qfprom.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ static int qfprom_reg_read(void *context,
2121
unsigned int reg, void *_val, size_t bytes)
2222
{
2323
void __iomem *base = context;
24-
u32 *val = _val;
25-
int i = 0, words = bytes / 4;
24+
u8 *val = _val;
25+
int i = 0, words = bytes;
2626

2727
while (words--)
28-
*val++ = readl(base + reg + (i++ * 4));
28+
*val++ = readb(base + reg + i++);
2929

3030
return 0;
3131
}
@@ -34,11 +34,11 @@ static int qfprom_reg_write(void *context,
3434
unsigned int reg, void *_val, size_t bytes)
3535
{
3636
void __iomem *base = context;
37-
u32 *val = _val;
38-
int i = 0, words = bytes / 4;
37+
u8 *val = _val;
38+
int i = 0, words = bytes;
3939

4040
while (words--)
41-
writel(*val++, base + reg + (i++ * 4));
41+
writeb(*val++, base + reg + i++);
4242

4343
return 0;
4444
}
@@ -53,7 +53,7 @@ static int qfprom_remove(struct platform_device *pdev)
5353
static struct nvmem_config econfig = {
5454
.name = "qfprom",
5555
.owner = THIS_MODULE,
56-
.stride = 4,
56+
.stride = 1,
5757
.word_size = 1,
5858
.reg_read = qfprom_reg_read,
5959
.reg_write = qfprom_reg_write,

0 commit comments

Comments
 (0)