Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Commit

Permalink
Merge tag 'v3.18.130' into XOS-8.1
Browse files Browse the repository at this point in the history
This is the 3.18.130 stable release

* tag 'v3.18.130': (38 commits)
  Linux 3.18.130
  selftests: Move networking/timestamping from Documentation
  staging: rts5208: fix gcc-8 logic error warning
  vme: ca91cx42: fix LM_CTL address mask
  vme: Fix wrong pointer utilization in ca91cx42_slave_get
  exec: avoid gcc-8 warning for get_task_comm
  kconfig: Avoid format overflow warning from GCC 8.1
  staging: speakup: Replace strncpy with memcpy
  matroxfb: fix size of memcpy
  pstore: Convert console write to use ->write_buf
  ocfs2: fix potential use after free
  debugobjects: avoid recursive calls with kmemleak
  hfsplus: do not free node before using
  hfs: do not free node before using
  ocfs2: fix deadlock caused by ocfs2_defrag_extent()
  fscache, cachefiles: remove redundant variable 'cache'
  fscache: fix race between enablement and dropping of object
  drm/ast: fixed reading monitor EDID not stable issue
  KVM: x86: fix empty-body warnings
  USB: omap_udc: fix USB gadget functionality on Palm Tungsten E
  ...

Signed-off-by: Harsh Shandilya <[email protected]>
  • Loading branch information
Harsh Shandilya committed Dec 18, 2018
2 parents 8ad8582 + 49a6ef5 commit 63ed41b
Show file tree
Hide file tree
Showing 42 changed files with 242 additions and 158 deletions.
3 changes: 1 addition & 2 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
subdir-y := accounting auxdisplay blackfin connector \
filesystems filesystems ia64 laptops misc-devices \
networking pcmcia prctl ptp spi timers vDSO video4linux \
watchdog
pcmcia prctl ptp spi timers vDSO video4linux watchdog
1 change: 0 additions & 1 deletion Documentation/networking/Makefile

This file was deleted.

14 changes: 0 additions & 14 deletions Documentation/networking/timestamping/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 129
SUBLEVEL = 130
EXTRAVERSION =
NAME = Diseased Newt

Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-omap1/board-ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
{
struct modem_private_data *priv = port->private_data;

if (!priv)
return;

if (IS_ERR(priv->regulator))
return;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/prm44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void omap44xx_prm_reconfigure_io_chain(void)
* to occur, WAKEUPENABLE bits must be set in the pad mux registers, and
* omap44xx_prm_reconfigure_io_chain() must be called. No return value.
*/
static void __init omap44xx_prm_enable_io_wakeup(void)
static void omap44xx_prm_enable_io_wakeup(void)
{
s32 inst = omap4_prmst_get_prm_dev_inst();

Expand Down
2 changes: 2 additions & 0 deletions arch/s390/kernel/perf_cpum_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ static int __hw_perf_event_init(struct perf_event *event)
break;

case PERF_TYPE_HARDWARE:
if (is_sampling_event(event)) /* No sampling support */
return -ENOENT;
ev = attr->config;
/* Count user space (problem-state) only */
if (!attr->exclude_user && attr->exclude_kernel) {
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kvm/lapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
#define APIC_BUS_CYCLE_NS 1

/* #define apic_debug(fmt,arg...) printk(KERN_WARNING fmt,##arg) */
#define apic_debug(fmt, arg...)
#define apic_debug(fmt, arg...) do {} while (0)

#define APIC_LVT_NUM 6
/* 14 is the version for Xeon and Pentium 8.4.8*/
Expand Down
36 changes: 30 additions & 6 deletions drivers/gpu/drm/ast/ast_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,19 +968,43 @@ static int get_clock(void *i2c_priv)
{
struct ast_i2c_chan *i2c = i2c_priv;
struct ast_private *ast = i2c->dev->dev_private;
uint32_t val;
uint32_t val, val2, count, pass;

count = 0;
pass = 0;
val = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4) & 0x01;
do {
val2 = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4) & 0x01;
if (val == val2) {
pass++;
} else {
pass = 0;
val = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4) & 0x01;
}
} while ((pass < 5) && (count++ < 0x10000));

val = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x10) >> 4;
return val & 1 ? 1 : 0;
}

static int get_data(void *i2c_priv)
{
struct ast_i2c_chan *i2c = i2c_priv;
struct ast_private *ast = i2c->dev->dev_private;
uint32_t val;
uint32_t val, val2, count, pass;

count = 0;
pass = 0;
val = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x20) >> 5) & 0x01;
do {
val2 = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x20) >> 5) & 0x01;
if (val == val2) {
pass++;
} else {
pass = 0;
val = (ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x20) >> 5) & 0x01;
}
} while ((pass < 5) && (count++ < 0x10000));

val = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x20) >> 5;
return val & 1 ? 1 : 0;
}

Expand All @@ -993,7 +1017,7 @@ static void set_clock(void *i2c_priv, int clock)

for (i = 0; i < 0x10000; i++) {
ujcrb7 = ((clock & 0x01) ? 0 : 1);
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xfe, ujcrb7);
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xf4, ujcrb7);
jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x01);
if (ujcrb7 == jtemp)
break;
Expand All @@ -1009,7 +1033,7 @@ static void set_data(void *i2c_priv, int data)

for (i = 0; i < 0x10000; i++) {
ujcrb7 = ((data & 0x01) ? 0 : 1) << 2;
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xfb, ujcrb7);
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0xf1, ujcrb7);
jtemp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb7, 0x04);
if (ujcrb7 == jtemp)
break;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/w83795.c
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,7 @@ store_sf_setup(struct device *dev, struct device_attribute *attr,
* somewhere else in the code
*/
#define SENSOR_ATTR_TEMP(index) { \
SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \
SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 5 ? S_IWUSR : 0), \
show_temp_mode, store_temp_mode, NOT_USED, index - 1), \
SENSOR_ATTR_2(temp##index##_input, S_IRUGO, show_temp, \
NULL, TEMP_READ, index - 1), \
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,18 @@ static irqreturn_t cp_interrupt (int irq, void *dev_instance)
struct cp_private *cp;
int handled = 0;
u16 status;
u16 mask;

if (unlikely(dev == NULL))
return IRQ_NONE;
cp = netdev_priv(dev);

spin_lock(&cp->lock);

mask = cpr16(IntrMask);
if (!mask)
goto out_unlock;

status = cpr16(IntrStatus);
if (!status || (status == 0xFFFF))
goto out_unlock;
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1427,9 +1427,9 @@ static void tun_setup(struct net_device *dev)
*/
static int tun_validate(struct nlattr *tb[], struct nlattr *data[])
{
if (!data)
return 0;
return -EINVAL;
/* NL_SET_ERR_MSG(extack,
"tun/tap creation via rtnetlink is not supported."); */
return -EOPNOTSUPP;
}

static struct rtnl_link_ops tun_link_ops __read_mostly = {
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/rts5208/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3531,9 +3531,6 @@ int ext_sd_send_cmd_get_rsp(struct rtsx_chip *chip, u8 cmd_idx,
if ((ptr[3] & 0x1E) != 0x04)
TRACE_RET(chip, STATUS_FAIL);

} else if (rsp_type == SD_RSP_TYPE_R0) {
if ((ptr[3] & 0x1E) != 0x03)
TRACE_RET(chip, STATUS_FAIL);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/speakup/kobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr,
len = strlen(buf);
if (len < 2 || len > 9)
return -EINVAL;
strncpy(new_synth_name, buf, len);
memcpy(new_synth_name, buf, len);
if (new_synth_name[len - 1] == '\n')
len--;
new_synth_name[len] = '\0';
Expand Down Expand Up @@ -513,7 +513,7 @@ static ssize_t punc_store(struct kobject *kobj, struct kobj_attribute *attr,
return -EINVAL;
}

strncpy(punc_buf, buf, x);
memcpy(punc_buf, buf, x);

while (x && punc_buf[x - 1] == '\n')
x--;
Expand Down
87 changes: 30 additions & 57 deletions drivers/usb/gadget/udc/omap_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,7 @@ static inline int machine_without_vbus_sense(void)
{
return machine_is_omap_innovator()
|| machine_is_omap_osk()
|| machine_is_omap_palmte()
|| machine_is_sx1()
/* No known omap7xx boards with vbus sense */
|| cpu_is_omap7xx();
Expand All @@ -2045,7 +2046,7 @@ static inline int machine_without_vbus_sense(void)
static int omap_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver)
{
int status = -ENODEV;
int status;
struct omap_ep *ep;
unsigned long flags;

Expand Down Expand Up @@ -2083,6 +2084,7 @@ static int omap_udc_start(struct usb_gadget *g,
goto done;
}
} else {
status = 0;
if (can_pullup(udc))
pullup_enable(udc);
else
Expand Down Expand Up @@ -2591,9 +2593,22 @@ omap_ep_setup(char *name, u8 addr, u8 type,

static void omap_udc_release(struct device *dev)
{
complete(udc->done);
pullup_disable(udc);
if (!IS_ERR_OR_NULL(udc->transceiver)) {
usb_put_phy(udc->transceiver);
udc->transceiver = NULL;
}
omap_writew(0, UDC_SYSCON1);
remove_proc_file();
if (udc->dc_clk) {
if (udc->clk_requested)
omap_udc_enable_clock(0);
clk_put(udc->hhc_clk);
clk_put(udc->dc_clk);
}
if (udc->done)
complete(udc->done);
kfree(udc);
udc = NULL;
}

static int
Expand Down Expand Up @@ -2865,29 +2880,29 @@ static int omap_udc_probe(struct platform_device *pdev)
udc->clr_halt = UDC_RESET_EP;

/* USB general purpose IRQ: ep0, state changes, dma, etc */
status = request_irq(pdev->resource[1].start, omap_udc_irq,
0, driver_name, udc);
status = devm_request_irq(&pdev->dev, pdev->resource[1].start,
omap_udc_irq, 0, driver_name, udc);
if (status != 0) {
ERR("can't get irq %d, err %d\n",
(int) pdev->resource[1].start, status);
goto cleanup1;
}

/* USB "non-iso" IRQ (PIO for all but ep0) */
status = request_irq(pdev->resource[2].start, omap_udc_pio_irq,
0, "omap_udc pio", udc);
status = devm_request_irq(&pdev->dev, pdev->resource[2].start,
omap_udc_pio_irq, 0, "omap_udc pio", udc);
if (status != 0) {
ERR("can't get irq %d, err %d\n",
(int) pdev->resource[2].start, status);
goto cleanup2;
goto cleanup1;
}
#ifdef USE_ISO
status = request_irq(pdev->resource[3].start, omap_udc_iso_irq,
0, "omap_udc iso", udc);
status = devm_request_irq(&pdev->dev, pdev->resource[3].start,
omap_udc_iso_irq, 0, "omap_udc iso", udc);
if (status != 0) {
ERR("can't get irq %d, err %d\n",
(int) pdev->resource[3].start, status);
goto cleanup3;
goto cleanup1;
}
#endif
if (cpu_is_omap16xx() || cpu_is_omap7xx()) {
Expand All @@ -2898,23 +2913,8 @@ static int omap_udc_probe(struct platform_device *pdev)
}

create_proc_file();
status = usb_add_gadget_udc_release(&pdev->dev, &udc->gadget,
omap_udc_release);
if (status)
goto cleanup4;

return 0;

cleanup4:
remove_proc_file();

#ifdef USE_ISO
cleanup3:
free_irq(pdev->resource[2].start, udc);
#endif

cleanup2:
free_irq(pdev->resource[1].start, udc);
return usb_add_gadget_udc_release(&pdev->dev, &udc->gadget,
omap_udc_release);

cleanup1:
kfree(udc);
Expand All @@ -2941,42 +2941,15 @@ static int omap_udc_remove(struct platform_device *pdev)
{
DECLARE_COMPLETION_ONSTACK(done);

if (!udc)
return -ENODEV;

usb_del_gadget_udc(&udc->gadget);
if (udc->driver)
return -EBUSY;

udc->done = &done;

pullup_disable(udc);
if (!IS_ERR_OR_NULL(udc->transceiver)) {
usb_put_phy(udc->transceiver);
udc->transceiver = NULL;
}
omap_writew(0, UDC_SYSCON1);

remove_proc_file();

#ifdef USE_ISO
free_irq(pdev->resource[3].start, udc);
#endif
free_irq(pdev->resource[2].start, udc);
free_irq(pdev->resource[1].start, udc);
usb_del_gadget_udc(&udc->gadget);

if (udc->dc_clk) {
if (udc->clk_requested)
omap_udc_enable_clock(0);
clk_put(udc->hhc_clk);
clk_put(udc->dc_clk);
}
wait_for_completion(&done);

release_mem_region(pdev->resource[0].start,
pdev->resource[0].end - pdev->resource[0].start + 1);

wait_for_completion(&done);

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/video/fbdev/matrox/matroxfb_Ti3026.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m)

DBG(__func__)

memcpy(hw->DACreg, MGADACbpp32, sizeof(hw->DACreg));
memcpy(hw->DACreg, MGADACbpp32, sizeof(MGADACbpp32));
switch (minfo->fbcon.var.bits_per_pixel) {
case 4: hw->DACreg[POS3026_XLATCHCTRL] = TVP3026_XLATCHCTRL_16_1; /* or _8_1, they are same */
hw->DACreg[POS3026_XTRUECOLORCTRL] = TVP3026_XTRUECOLORCTRL_PSEUDOCOLOR;
Expand Down
2 changes: 1 addition & 1 deletion drivers/vme/bridges/vme_ca91cx42.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ static int ca91cx42_slave_get(struct vme_slave_resource *image, int *enabled,
vme_bound = ioread32(bridge->base + CA91CX42_VSI_BD[i]);
pci_offset = ioread32(bridge->base + CA91CX42_VSI_TO[i]);

*pci_base = (dma_addr_t)vme_base + pci_offset;
*pci_base = (dma_addr_t)*vme_base + pci_offset;
*size = (unsigned long long)((vme_bound - *vme_base) + granularity);

*enabled = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/vme/bridges/vme_ca91cx42.h
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ static const int CA91CX42_LINT_LM[] = { CA91CX42_LINT_LM0, CA91CX42_LINT_LM1,
#define CA91CX42_LM_CTL_DATA (1<<22)
#define CA91CX42_LM_CTL_SUPR (1<<21)
#define CA91CX42_LM_CTL_NPRIV (1<<20)
#define CA91CX42_LM_CTL_AS_M (5<<16)
#define CA91CX42_LM_CTL_AS_M (7<<16)
#define CA91CX42_LM_CTL_AS_A16 0
#define CA91CX42_LM_CTL_AS_A24 (1<<16)
#define CA91CX42_LM_CTL_AS_A32 (1<<17)
Expand Down
Loading

0 comments on commit 63ed41b

Please sign in to comment.