[RFC,4/5] rpmsg: add rpmsg support for mt8183 SCP.

2018-12-25 Thread Pi-Hsun Shih
Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih --- There are lots of TODO comments on things that are not done yet / I have doubt on whether it's the best way to do it. drivers/remoteproc/mtk_common.h | 3 +

[RFC,5/5] mfd: cros_ec: add EC host command support using rpmsg.

2018-12-25 Thread Pi-Hsun Shih
Add EC host command support through rpmsg. Signed-off-by: Pi-Hsun Shih --- drivers/mfd/cros_ec_dev.c | 9 ++ drivers/platform/chrome/Kconfig | 8 ++ drivers/platform/chrome/Makefile| 1 + drivers/platform/chrome/cros_ec_rpmsg.c | 164

[RFC,2/5] remoteproc/mediatek: add SCP support for mt8183

2018-12-25 Thread Pi-Hsun Shih
From: Erin Lo Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo --- drivers/remoteproc/Kconfig| 9 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/mtk_scp.c | 568 ++

[RFC,0/5] Add support for mt8183 SCP.

2018-12-25 Thread Pi-Hsun Shih
Add support for controlling and communicating with mt8183's system control processor (SCP), using the remoteproc & rpmsg framework. And also add a cros_ec driver for CrOS EC host command over rpmsg. The overall structure of the series is: * remoteproc/mtk_scp.c: Control the start / stop of SCP

[RFC,1/5] dt-bindings: Add a binding for Mediatek SCP

2018-12-25 Thread Pi-Hsun Shih
From: Erin Lo Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo --- .../devicetree/bindings/remoteproc/mtk,scp.txt | 10 ++ 1 file changed, 10 insertions(+) create mode 100644

[RFC,3/5] remoteproc: move IPI interface into separate file.

2018-12-25 Thread Pi-Hsun Shih
Move the IPI interface into a separate file mtk_scp_ipi.c, so the things that use the interface only can depend on the module only. Signed-off-by: Pi-Hsun Shih --- drivers/remoteproc/Makefile | 2 +- drivers/remoteproc/mtk_common.h | 73 +++ drivers/remoteproc/mtk_scp.c

Re: [PATCH v2 2/3] ASoC: Documentation: Add google,cros-ec-codec

2018-12-25 Thread Cheng-yi Chiang
On Mon, Dec 24, 2018 at 10:38 PM Guenter Roeck wrote: > > On Mon, Dec 24, 2018 at 12:39 AM Cheng-Yi Chiang > wrote: > > > > Add documentation for Chrome EC codec driver. > > > > Signed-off-by: Cheng-Yi Chiang > > --- > > Change in v2: Fixed name of driver in MAINTAINERS. > > > >

Re: [PATCH v2 3/3] ASoC: cros_ec_codec: Add codec driver for Cros EC

2018-12-25 Thread Cheng-yi Chiang
Hi Guenter, Thanks a lot for reviewing the patch on holidays. On Mon, Dec 24, 2018 at 10:48 PM Guenter Roeck wrote: > > On Mon, Dec 24, 2018 at 12:45 AM Cheng-Yi Chiang > wrote: > > > > Add a codec driver to control ChromeOS EC codec. > > > > Use EC Host command to enable/disable I2S

[PATCH v3 3/3] ASoC: cros_ec_codec: Add codec driver for Cros EC

2018-12-25 Thread Cheng-Yi Chiang
Add a codec driver to control ChromeOS EC codec. Use EC Host command to enable/disable I2S recording and control other configurations. Signed-off-by: Cheng-Yi Chiang --- Changes in v3: 1.remove cros_ec_codec.h. 2.Fix error code overriding in set_i2s_config set_i2s_sample_depth

[PATCH v3 2/3] ASoC: Documentation: Add google,cros-ec-codec

2018-12-25 Thread Cheng-Yi Chiang
Add documentation for Chrome EC codec driver. Signed-off-by: Cheng-Yi Chiang --- +Rob Herring for reviewing this patch. Hi Rob, Could you please take a look ? Thanks! .../bindings/sound/google,cros-ec-codec.txt | 24 +++ MAINTAINERS |

Re: [PATCH] staging: erofs: fix return type of erofs_workgroup_get

2018-12-25 Thread Chao Yu
On 2018/12/26 11:34, Gao Xiang wrote: > There exists a return type misuse (`int'->`bool') since all > users assume it fails if only return value != 0, let's fix > the return type to `int' instead of confusing `bool'. > > No logic changes. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu

[PATCH v3 1/3] mfd: cros_ec: Add commands to control codec

2018-12-25 Thread Cheng-Yi Chiang
Add EC host commands to control codec on EC. Signed-off-by: Cheng-Yi Chiang Signed-off-by: Lee Jones --- Note: This patch is merged to mfd tree for-mfd-next branch already. But this is still needed on sound tree for-next branch in order to compile cros_ec_codec driver.

Re: [PATCH] fs: proc: check status of register_filesystem

2018-12-25 Thread Al Viro
On Wed, Dec 26, 2018 at 09:18:56AM +0300, Alexey Dobriyan wrote: > On Tue, Dec 25, 2018 at 09:06:40PM -0600, Kangjie Lu wrote: > > register_filesystem() could fail. The fix issues an error message if it > > fails. > > > - register_filesystem(_fs_type); > > + if (register_filesystem(_fs_type))

[PATCH] target: fix a missing check for match_int

2018-12-25 Thread Kangjie Lu
When match_int fails, "arg" is left uninitialized and may contain random value, thus should not be used. The fix checks if match_int fails, and if so, break. Signed-off-by: Kangjie Lu --- drivers/target/target_core_rd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread Douglas Gilbert
On 2018-12-25 3:15 p.m., Kangjie Lu wrote: What we need is only "pack_id", so do not create a heap object or copy the whole object in. The fix efficiently copies "pack_id" only. Now this looks like a worthwhile optimization, in some pretty tricky code. I can't see a security angle in it. Did

RE: [PATCH] usb: chipidea: add a check for the availability of next child

2018-12-25 Thread Peter Chen
> Signed-off-by: Kangjie Lu > --- > drivers/usb/chipidea/ci_hdrc_msm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c > b/drivers/usb/chipidea/ci_hdrc_msm.c > index 880009987460..7dc987b4036a 100644 > --- a/drivers/usb/chipidea/ci_hdrc_msm.c >

[PATCH] wireless: ath: return error code upstream

2018-12-25 Thread Kangjie Lu
ath6kl_wmi_cmd_send could fail, so let's return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/wireless/ath/ath6kl/wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c

[PATCH] isdn: eicon: fix a missing check of api_parse

2018-12-25 Thread Kangjie Lu
api_parse can fail, and if it fails, we should not use the ss_parms which can be incorrect. The fix checks its return value and stops using ss_parms if api_parse fails. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/eicon/message.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-25 Thread Long Cheng
On Wed, 2018-12-26 at 08:05 +0800, Nicolas Boichat wrote: thanks. > On Tue, Dec 25, 2018 at 8:06 PM Long Cheng wrote: > > > > Thanks for your comments. > > > > On Tue, 2018-12-25 at 15:16 +0800, Nicolas Boichat wrote: > > > Not a full review, a few comments below. > > > > > > Thanks, > > > > >

[PATCH] net: marvell: fix a missing check of acpi_match_device

2018-12-25 Thread Kangjie Lu
When acpi_match_device fails, its return value is NULL. Directly using the return value without a check may result in a NULL-pointer dereference. The fix checks if acpi_match_device fails, and if so, returns -EINVAL. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

Re: [PATCH v5 1/5] Bluetooth: hci_qca: use wait_until_sent() for power pulses

2018-12-25 Thread Balakrishna Godavarthi
Hi Matthias, On 2018-12-22 07:29, Matthias Kaehlcke wrote: On Thu, Dec 20, 2018 at 08:16:35PM +0530, Balakrishna Godavarthi wrote: wcn3990 requires a power pulse to turn ON/OFF along with regulators. Sometimes we are observing the power pulses are sent out with some time delay, due to queuing

[PATCH] gpu: drm: fix an improper check of amdgpu_bo_create_kernel

2018-12-25 Thread Kangjie Lu
adev->firmware.fw_buf being not NULL may not indicate kernel buffer is created successful. A better way is to check the status (return value) of it. The fix does so. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 18 -- 1 file changed, 12

Re: [PATCH] fs: proc: check status of register_filesystem

2018-12-25 Thread Alexey Dobriyan
On Tue, Dec 25, 2018 at 09:06:40PM -0600, Kangjie Lu wrote: > register_filesystem() could fail. The fix issues an error message if it > fails. > - register_filesystem(_fs_type); > + if (register_filesystem(_fs_type)) > + pr_err("failed to register the filesystem.\n"); No,

[PATCH v2] thermal: uniphier: Convert to SPDX identifier

2018-12-25 Thread Kunihiko Hayashi
This converts license boilerplate to SPDX identifier, and removes unnecessary lines. Reviewed-by: Daniel Lezcano Signed-off-by: Kunihiko Hayashi --- drivers/thermal/uniphier_thermal.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) Changes since v1: - Add Reviewd-by line

Re: [PATCH 1/2 v3] kdump: add the vmcoreinfo documentation

2018-12-25 Thread lijiang
在 2018年12月26日 11:36, Dave Young 写道: > On 12/26/18 at 11:24am, Dave Young wrote: > + > +KERNEL_IMAGE_SIZE > += > +The size of 'KERNEL_IMAGE_SIZE', currently unused. So remove? >>> >>> I'm not sure whether it should be removed, so i keep it. >> >> Just

[PATCH] tipc: fix a missing check of genlmsg_put

2018-12-25 Thread Kangjie Lu
genlmsg_put could fail. The fix inserts a check of its return value, and if it fails, returns -EMSGSIZE. Signed-off-by: Kangjie Lu --- net/tipc/netlink_compat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index

[PATCH] xfs: add a check for xfs_trans_commit

2018-12-25 Thread Kangjie Lu
xfs_trans_commit could fails. The checks issues an error message upon its failure. Signed-off-by: Kangjie Lu --- fs/xfs/xfs_super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index d3e6cd063688..8ec2e3c8e946 100644 ---

Re: [PATCH 06/18] drm/mediatek: add mmsys private data for ddp path config

2018-12-25 Thread CK Hu
Hi, Yongqiang: On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > This patch add mmsys private data for ddp path config Describe WHY do this. > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 ++ > drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 102 >

[PATCH] usb: dvb: check status of mxl111sf_read_reg

2018-12-25 Thread Kangjie Lu
When mxl111sf_read_reg fails, we shouldn't use "mode". The fix checks its return value using mxl_fail Signed-off-by: Kangjie Lu --- drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-phy.c

[PATCH] scsi: aacraid: add a check for aac_fib_send

2018-12-25 Thread Kangjie Lu
aac_fib_send could fail, so add a check to its return value: If it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/scsi/aacraid/dpcsup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index

[PATCH] scsi: associate bio write hint with WRITE CDB

2018-12-25 Thread Randall Huang
In SPC-3, WRITE(10)/(16) support grouping function. Let's associate bio write hint with group number for enabling StreamID or Turbo Write feature. Signed-off-by: Randall Huang --- drivers/scsi/sd.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git

[PATCH v2] f2fs: fix use-after-free issue when accessing sbi->stat_info

2018-12-25 Thread Sahitya Tummala
iput() on sbi->node_inode can update sbi->stat_info in the below context, if the f2fs_write_checkpoint() has failed with error. f2fs_balance_fs_bg+0x1ac/0x1ec f2fs_write_node_pages+0x4c/0x260 do_writepages+0x80/0xbc __writeback_single_inode+0xdc/0x4ac writeback_single_inode+0x9c/0x144

Re: [PATCH v2] btrfs: add a check for sysfs_create_group

2018-12-25 Thread Qu Wenruo
On 2018/12/26 下午1:37, Kangjie Lu wrote: > In case sysfs_create_group fails, let's check its return value and > issues an error message. > > Signed-off-by: Kangjie Lu > --- > fs/btrfs/sysfs.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c >

Re: [PATCH v5 2/5] Bluetooth: hci_qca: Deassert RTS while baudrate change command

2018-12-25 Thread Balakrishna Godavarthi
Hi Matthias, On 2018-12-22 06:01, Matthias Kaehlcke wrote: On Thu, Dec 20, 2018 at 08:16:36PM +0530, Balakrishna Godavarthi wrote: This patch will help to stop frame reassembly errors while changing the baudrate. This is because host send a change baudrate request command to the chip with

Re: [PATCH net V2 4/4] vhost: log dirty page correctly

2018-12-25 Thread Jason Wang
On 2018/12/26 上午12:25, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 05:43:25PM +0800, Jason Wang wrote: On 2018/12/25 上午1:41, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 11:43:31AM +0800, Jason Wang wrote: On 2018/12/14 下午9:20, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at

Re: [PATCH v2] btrfs: add a check for sysfs_create_group

2018-12-25 Thread Su Yue
On 12/26/18 1:37 PM, Kangjie Lu wrote: In case sysfs_create_group fails, let's check its return value and issues an error message. Signed-off-by: Kangjie Lu --- fs/btrfs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index

[PATCH v2] btrfs: add a check for sysfs_create_group

2018-12-25 Thread Kangjie Lu
In case sysfs_create_group fails, let's check its return value and issues an error message. Signed-off-by: Kangjie Lu --- fs/btrfs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 3717c864ba23..24ef416e700b 100644 --- a/fs/btrfs/sysfs.c +++

Re: [PATCH] mm, swap: Fix swapoff with KSM pages

2018-12-25 Thread Huang, Ying
Hi, Andrew, This patch is based on linus' tree instead of the head of mmotm tree because it is to fix a bug there. The bug is introduced by commit e07098294adf ("mm, THP, swap: support to reclaim swap space for THP swapped out"), which is merged by v4.14-rc1. So I think we should backport the

[PATCH] firmware: (memconsole) do not count numbers if read fails

2018-12-25 Thread Kangjie Lu
When memory_read_from_buffer() fails, the return value is a negative error code, thus we shouldn't count it as the number of read bytes. The fix checks the return value of memory_read_from_buffer, and count the number only when it succeeds. Signed-off-by: Kangjie Lu ---

Re: [PATCH 05/18] drm/mediatek: add ddp component CCORR

2018-12-25 Thread CK Hu
Hi, Yongqiang: On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > This patch add ddp component CCORR Reviewed-by: CK Hu > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 32 > + >

Re: [PATCH] btrfs: add a check for sysfs_create_group

2018-12-25 Thread Qu Wenruo
On 2018/12/26 上午11:46, Kangjie Lu wrote: > In case sysfs_create_group fails, let's check its return value and > issues an error message. > > Signed-off-by: Kangjie Lu > --- > fs/btrfs/sysfs.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c >

[PATCH] mm, swap: Fix swapoff with KSM pages

2018-12-25 Thread Huang Ying
KSM pages may be mapped to the multiple VMAs that cannot be reached from one anon_vma. So during swapin, a new copy of the page need to be generated if a different anon_vma is needed, please refer to comments of ksm_might_need_to_copy() for details. During swapoff, unuse_vma() uses anon_vma (if

[PATCH] pci: fix a missing check of snd_i2c_sendbytes

2018-12-25 Thread Kangjie Lu
snd_i2c_sendbytes could fail. The fix checks its return value: if it fails, issues an error message and returns with its error code. Signed-off-by: Kangjie Lu --- sound/pci/ice1712/ews.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/pci/ice1712/ews.c

[PATCH] net: sfc: checks status of efx_mcdi_rpc

2018-12-25 Thread Kangjie Lu
efx_mcdi_rpc() could fail. The fix checks its status and issues an error message if it fails. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/sfc/mcdi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index

[PATCH] wan: fix a missing check of spi_write_then_read

2018-12-25 Thread Kangjie Lu
When spi_write_then_read() fails, "data" can be uninitialized and thus may contain a random value; the following execution checks "data" with a mask, the result could be random. The fix inserts a check of spi_write_then_read(): if it fails, always returns -1. Signed-off-by: Kangjie Lu ---

Re: [PATCH] f2fs: fix use-after-free issue with sbi->stat_info

2018-12-25 Thread Sahitya Tummala
On Tue, Dec 25, 2018 at 11:06:45AM +0800, Chao Yu wrote: > On 2018/12/24 21:06, Sahitya Tummala wrote: > > iput() on sbi->node_inode can update sbi->stat_info > > in the below context, if the f2fs_write_checkpoint() > > has failed with error. > > > > f2fs_balance_fs_bg+0x1ac/0x1ec > >

[PATCH] ethernet: atl1e: checking the status of atl1e_write_phy_reg

2018-12-25 Thread Kangjie Lu
atl1e_write_phy_reg() could fail. The fix issues an error message when it fails. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c

[PATCH] leds: fix a missing check of return value of lp55xx_read

2018-12-25 Thread Kangjie Lu
When lp55xx_read() fails, "status" is an uninitialized variable and thus may contain random value; using it leads to undefined behaviors. The fix inserts a check for the return value of lp55xx_read: if it fails, returns with its error code. Signed-off-by: Kangjie Lu ---

[PATCH] time: fix a missing check of rtc_read_time

2018-12-25 Thread Kangjie Lu
When rtc_read_time fails, we shouldn't use it read time. The fix returns with its error code when it fails. Signed-off-by: Kangjie Lu --- kernel/time/alarmtimer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index

[PATCH] dsa: return error code upstream

2018-12-25 Thread Kangjie Lu
Both bcm_sf2_sw_indir_rw and mdiobus_write_nested could fail, so let's return their error codes upstream. Signed-off-by: Kangjie Lu --- drivers/net/dsa/bcm_sf2.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c

Re: [PATCH net-next 0/3] vhost: accelerate metadata access through vmap()

2018-12-25 Thread Jason Wang
On 2018/12/25 下午8:52, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:09:19PM +0800, Jason Wang wrote: On 2018/12/25 上午2:12, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 04:32:39PM +0800, Jason Wang wrote: On 2018/12/14 下午8:33, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at

Re: [PATCH net-next 3/3] vhost: access vq metadata through kernel virtual address

2018-12-25 Thread Jason Wang
On 2018/12/25 下午8:50, Michael S. Tsirkin wrote: On Tue, Dec 25, 2018 at 06:05:25PM +0800, Jason Wang wrote: On 2018/12/25 上午2:10, Michael S. Tsirkin wrote: On Mon, Dec 24, 2018 at 03:53:16PM +0800, Jason Wang wrote: On 2018/12/14 下午8:36, Michael S. Tsirkin wrote: On Fri, Dec 14, 2018 at

Re: [PATCH 04/18] drm/mediatek: move rdma sout from mtk_ddp_mout_en into mtk_ddp_sout_sel

2018-12-25 Thread CK Hu
Hi, Yongqiang: On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > This patch move rdma sout from mtk_ddp_mout_en into mtk_ddp_sout_sel This patch looks good to me, but you should describe why do you do this. Regards, CK > > Signed-off-by: Yongqiang Niu > --- >

[PATCH] ipset: fix a missing check of nla_parse

2018-12-25 Thread Kangjie Lu
When nla_parse fails, we should not use the results (the first argument). The fix checks if it fails, and if so, returns its error code upstream. Signed-off-by: Kangjie Lu --- net/netfilter/ipset/ip_set_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH] btrfs: add a check for sysfs_create_group

2018-12-25 Thread Kangjie Lu
In case sysfs_create_group fails, let's check its return value and issues an error message. Signed-off-by: Kangjie Lu --- fs/btrfs/sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 3717c864ba23..62529153a51a 100644 --- a/fs/btrfs/sysfs.c +++

[PATCH] wireless: marvell: add checks for the return value of sysfs_create_group

2018-12-25 Thread Kangjie Lu
sysfs_create_group() could fail, so let's check its return values and issue error messages if it fails. Signed-off-by: Kangjie Lu --- drivers/net/wireless/marvell/libertas/mesh.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/marvell/libertas/mesh.c

Re: [PATCH] scsi: fix a double-fetch bug in sg_write

2018-12-25 Thread Douglas Gilbert
On 2018-12-25 3:24 p.m., Kangjie Lu wrote: "opcode" has been copied in from user space and checked. We should not copy it in again, which may have been modified by malicous multi-threading user programs through race conditions. The fix uses the opcode fetched in the first copy. Signed-off-by:

[PATCH] line6: add a check for snd_card_register

2018-12-25 Thread Kangjie Lu
The fix checks if snd_card_register() fails, and if so, issues a warning. Signed-off-by: Kangjie Lu --- sound/usb/line6/pod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c index 020c81818951..da8837bc5a5b 100644 ---

Re: [PATCH 1/2 v3] kdump: add the vmcoreinfo documentation

2018-12-25 Thread Dave Young
On 12/26/18 at 11:24am, Dave Young wrote: > > >> + > > >> +KERNEL_IMAGE_SIZE > > >> += > > >> +The size of 'KERNEL_IMAGE_SIZE', currently unused. > > > > > > So remove? > > > > > > > I'm not sure whether it should be removed, so i keep it. > > Just remove it. It was added by

RE: [PATCH V5 2/4] thermal: imx_sc: add i.MX system controller thermal support

2018-12-25 Thread Anson Huang
Hi, Eduardo Best Regards! Anson Huang > -Original Message- > From: Eduardo Valentin [mailto:edubez...@gmail.com] > Sent: 2018年12月26日 6:44 > To: Anson Huang > Cc: robh...@kernel.org; mark.rutl...@arm.com; catalin.mari...@arm.com; > will.dea...@arm.com; rui.zh...@intel.com;

[PATCH] staging: erofs: fix return type of erofs_workgroup_get

2018-12-25 Thread Gao Xiang
There exists a return type misuse (`int'->`bool') since all users assume it fails if only return value != 0, let's fix the return type to `int' instead of confusing `bool'. No logic changes. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] ACPI: Change wrong print type to display the real value for i386-PAE

2018-12-25 Thread Chao Fan
There is a wrong display for memory address of NUMA node in i386-PAE. That may mislead developers. Here is a debian9-32bit with PAE in QEMU guest whose total memory is more than 4G: qemu-system-i386 \ -hda /var/lib/libvirt/images/debian32.qcow2 \ -m 5G \ -enable-kvm \ -smp 10 \ -numa

Re: [PATCH 0/2 v4] kdump,vmcoreinfo: Export the value of sme mask to vmcoreinfo

2018-12-25 Thread Dave Young
Add Kazu and Dave in cc On 12/20/18 at 01:40pm, Lianbo Jiang wrote: > This patchset did two things: > a. add a new document for vmcoreinfo > > This document lists some variables that export to vmcoreinfo, and briefly > describles what these variables indicate. It should be instructive for > many

[PATCH] sound: line6: fix a missing check of snd_card_register

2018-12-25 Thread Kangjie Lu
snd_card_register() may fail, so let's check its status and issue an error message if it fails. Signed-off-by: Kangjie Lu --- sound/usb/line6/variax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/usb/line6/variax.c b/sound/usb/line6/variax.c index

Re: [PATCH 1/2 v3] kdump: add the vmcoreinfo documentation

2018-12-25 Thread Dave Young
> >> + > >> +KERNEL_IMAGE_SIZE > >> += > >> +The size of 'KERNEL_IMAGE_SIZE', currently unused. > > > > So remove? > > > > I'm not sure whether it should be removed, so i keep it. Just remove it. It was added by Baoquan for KASLR issues, later makedumpfile reverted the

[PATCH] sunrpc: remove redundant code

2018-12-25 Thread Kangjie Lu
If no bytes to decode, just use "xdr->p" instead of calling xdr_inline_decode to get it. The fix cleans up the code. Signed-off-by: Kangjie Lu --- net/sunrpc/xprtrdma/rpc_rdma.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c

[PATCH] sunrpc: fix a missing check of xdr_inline_decode

2018-12-25 Thread Kangjie Lu
xdr_inline_decode() could fail. When it fails, the return value is NULL and should not be dereferenced. The fix checks if xdr_inline_decode fails, and if so, returns. Signed-off-by: Kangjie Lu --- net/sunrpc/xprtrdma/backchannel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] usb: dwc3: gadget: Fix the uninitialized link_state when udc starts

2018-12-25 Thread Zeng Tao
Currently the link_state is uninitialized and the default value is 0(U0) before the first time we start the udc, and after we start the udc then stop the udc, the link_state will be undefined. We may have the following warnings if we start the udc again with an undefined link_state: WARNING:

[PATCH] rtc: fix a missing check of block data read

2018-12-25 Thread Kangjie Lu
When i2c_smbus_read_i2c_block_data() fails, the read data in "buf" could be incorrect and should not be used. The fix checks if i2c_smbus_read_i2c_block_data fails, and if so, return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/rtc/rtc-hym8563.c | 2 ++ 1 file changed, 2

[PATCH] fs: proc: check status of register_filesystem

2018-12-25 Thread Kangjie Lu
register_filesystem() could fail. The fix issues an error message if it fails. Signed-off-by: Kangjie Lu --- fs/proc/root.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/proc/root.c b/fs/proc/root.c index f4b1a9d2eca6..7dcd947cba23 100644 --- a/fs/proc/root.c +++

[PATCH] net: stmicro: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 02/18] drm/mediatek: add mutex mod and sof into ddp private data

2018-12-25 Thread CK Hu
Hi, Yongqiang: On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > This patch add mutex mod and sof into ddp private data Usually, the commit title shows 'WHAT' does this patch do, commit message shows 'WHY' does this patch do, and commit body shows 'HOW' does this patch do. This commit

[PATCH] net: (cpts) fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/net/ethernet/ti/cpts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/cpts.c

[PATCH] atmel: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/misc/atmel-ssc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index

[PATCH] clocksource: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/clocksource/sh_cmt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index

[PATCH] base: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/base/power/clock_ops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index

[PATCH] rtc: fix a missing check of clk_prepare

2018-12-25 Thread Kangjie Lu
clk_prepare() could fail, so let's check its status and if it fails return its error code upstream. Signed-off-by: Kangjie Lu --- drivers/rtc/rtc-coh901331.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index

[PATCH v2] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/staging/rtl8712/hal_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c

[PATCH -mmotm] efi: drop kmemleak_ignore() for page allocator

2018-12-25 Thread Qian Cai
a0fc5578f1d (efi: Let kmemleak ignore false positives) is no longer needed due to efi_mem_reserve_persistent() uses __get_free_page() instead where kmemelak is not able to track regardless. Otherwise, kernel reported "kmemleak: Trying to color unknown object at 0x801060ef as Black"

Re: [PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] sound: atom: fix a missing check of snd_pcm_lib_malloc_pages

2018-12-25 Thread Kangjie Lu
snd_pcm_lib_malloc_pages() may fail, so let's check its status and return its error code upstream. Signed-off-by: Kangjie Lu --- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c

Re: [PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread kbuild test robot
Hi Kangjie, Thank you for the patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on v4.20 next-20181224] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] pci: dwc: add a check for resetting gpio

2018-12-25 Thread Kangjie Lu
devm_gpio_request_one() could fail. The fix checks its status and issues an error if it fails. Signed-off-by: Kangjie Lu --- drivers/pci/controller/dwc/pci-exynos.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-exynos.c

[PATCH] infiniband: add checks for the status of nla_put

2018-12-25 Thread Kangjie Lu
The fix inserts multiple checks for nla_put, and issues warnings if it fails. Signed-off-by: Kangjie Lu --- drivers/infiniband/core/sa_query.c | 39 ++ 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/infiniband/core/sa_query.c

[PATCH] infiniband: fix a missing check of nla_put

2018-12-25 Thread Kangjie Lu
nla_put() may fail. The fix adds a check for its return value, and returns -EMSGSIZE if it fails. Signed-off-by: Kangjie Lu --- drivers/infiniband/core/addr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c

[PATCH -mmotm] arm64: skip kmemleak for KASAN again

2018-12-25 Thread Qian Cai
Due to 871ac3d540f (kasan: initialize shadow to 0xff for tag-based mode), kmemleak is broken again with KASAN. It needs a similar fix from e55058c2983 (mm/memblock.c: skip kmemleak for kasan_init()). Signed-off-by: Qian Cai --- arch/arm64/mm/kasan_init.c | 3 +-- 1 file changed, 1 insertion(+),

[PATCH] usb: chipidea: add a check for the availability of next child

2018-12-25 Thread Kangjie Lu
of_get_next_available_child returns NULL when no child nodes are found. The fix checks its return value instead of assuming a child is found. Signed-off-by: Kangjie Lu --- drivers/usb/chipidea/ci_hdrc_msm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c

Re: [PATCHv2] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2018-12-25 Thread Dave Young
On 12/14/18 at 12:07pm, Pingfan Liu wrote: > Customer reported a bug on a high end server with many pcie devices, where > kernel bootup with crashkernel=384M, and kaslr is enabled. Even > though we still see much memory under 896 MB, the finding still failed > intermittently. Because currently we

[PATCH] keyboard: (samsung) fix a missing check of return value

2018-12-25 Thread Kangjie Lu
of_device_is_compatible() returns false if the device is incompatible. The fix adds a check for its return value; Signed-off-by: Kangjie Lu --- drivers/input/keyboard/samsung-keypad.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

Re: [PATCH 01/18] drm/mediatek: update dt-bindings for mt8183

2018-12-25 Thread CK Hu
Hi, Yongqiang: I would like you to add 'dt-bindings' in title. On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > Update device tree binding documention for the display subsystem for > Mediatek MT8183 SOCs > > Signed-off-by: Yongqiang Niu > --- >

Re: [GIT PULL] arm64: updates for 4.21

2018-12-25 Thread pr-tracker-bot
The pull request you sent on Fri, 14 Dec 2018 16:14:13 +: > git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git > tags/arm64-upstream has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/5694cecdb092656a822287a6691aa7ce668c8160 Thank you! -- Deet-doot-dot,

Re: [GIT PULL] arm64: updates for 4.21

2018-12-25 Thread Linus Torvalds
On Fri, Dec 14, 2018 at 8:14 AM Will Deacon wrote: > > * The A76 workaround for erratum #1286807 landed in mainline after -rc3 > ("ce8c80c536da"), so there's some shuffling needed to accomodate that > in conjunction with the workaround for erratum #1165522 here. I've > included my

Re: [PATCHv2] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2018-12-25 Thread Dave Young
On 12/14/18 at 12:07pm, Pingfan Liu wrote: > Customer reported a bug on a high end server with many pcie devices, where > kernel bootup with crashkernel=384M, and kaslr is enabled. Even > though we still see much memory under 896 MB, the finding still failed > intermittently. Because currently we

[PATCH] sound: sb: fix a missing check of snd_ctl_add

2018-12-25 Thread Kangjie Lu
snd_ctl_add() could fail, so let's check its return value and return its error code upstream upon failure. Signed-off-by: Kangjie Lu --- sound/isa/sb/sb16_main.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c

[PATCH] gus: add a check of the status of snd_ctl_add

2018-12-25 Thread Kangjie Lu
snd_ctl_add() could fail, so let's check its status and issue an error message if it indeed fails. Signed-off-by: Kangjie Lu --- sound/isa/gus/gus_main.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index

Re: [PATCH 07/14] clock: milbeaut: Add Milbeaut M10V clock control

2018-12-25 Thread Sugaya, Taichi
Hi On 2018/11/30 17:31, Stephen Boyd wrote: + init.num_parents = parents; + init.parent_names = parent_names; + + mcm->cname = clk_name; + mcm->parent = 0; + mcm->hw.init = + + clk = clk_register(NULL, >hw); + if (IS_ERR(clk)) + goto

[PATCH] rtl8712: add a check for the status of register_netdev

2018-12-25 Thread Kangjie Lu
register_netdev() may fail, so let's check its return value, and if it fails, issue an error message. Signed-off-by: Kangjie Lu --- drivers/staging/rtl8712/hal_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c

[PATCH] tty: pass return value of spi_register_driver

2018-12-25 Thread Kangjie Lu
spi_register_driver() may fail, so let's pass its return value upstream. Signed-off-by: Kangjie Lu --- drivers/tty/serial/max310x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index

[PATCH] net: brcm80211: add a check for the status of usb_register

2018-12-25 Thread Kangjie Lu
usb_register() may fail, so let's check its status and issue an error message if it fails. Signed-off-by: Kangjie Lu --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[PATCH] slimbus: add a check for the status of platform_driver_register

2018-12-25 Thread Kangjie Lu
platform_driver_register() may fail. The fix checks its status and issues an error message if it fails. Signed-off-by: Kangjie Lu --- drivers/slimbus/qcom-ngd-ctrl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c

  1   2   3   >