[PATCH] Re: [PATCH] jbd2: add jbd2_journal_init() helper

2016-09-07 Thread Geliang Tang
On Tue, Sep 06, 2016 at 05:15:54PM +0200, Jan Kara wrote: > On Sat 03-09-16 17:33:39, Eric Ren wrote: > > Hi Geliang, > > > > On 08/31/2016 08:23 PM, Geliang Tang wrote: > > >There are some repetitive code in jbd2_journal_init_dev() and > > >jbd2_journal_i

[PATCH] jbd2: move more common code into journal_init_common()

2016-09-07 Thread Geliang Tang
There are some repetitive code in jbd2_journal_init_dev() and jbd2_journal_init_inode(). So this patch moves the common code into journal_init_common() helper to simplify the code. And fix the coding style warnings reported by checkpatch.pl by the way. Signed-off-by: Geliang Tang --- fs/jbd2

[PATCH] jbd2: add jbd2_journal_init() helper

2016-08-31 Thread Geliang Tang
There are some repetitive code in jbd2_journal_init_dev() and jbd2_journal_init_inode(). So this patch extracts the common code into jbd2_journal_init() helper to simplify the code. And fix the coding style warnings reported by checkpatch.pl by the way. Signed-off-by: Geliang Tang --- fs/jbd2

[PATCH v2] pstore: add lz4hc and 842 compression support

2017-11-01 Thread Geliang Tang
From: Geliang Tang Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang --- Changes in v2: fix checkpatch.pl WARNING: please write a paragraph that describes the config

[PATCH v2] ath6kl: drop unlikely behind WARN_ON()

2015-10-05 Thread Geliang Tang
WARN_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- Changes in v2: - change subject prefix to ath6kl. --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl

[PATCH v2 2/3] sched/core: drop unlikely behind BUG_ON()

2015-10-05 Thread Geliang Tang
) For CONFIG_BUG and !HAVE_ARCH_BUG_ON cases, BUG_ON() contains an unlikely compiler flag already. Hence, we can drop unlikely behind BUG_ON(). [1] http://lkml.iu.edu/hypermail/linux/kernel/1101.3/02289.html Signed-off-by: Geliang Tang --- Changes in v2: - Just rewrite the commit log. --- k

[PATCH v2 1/3] scsi: drop unlikely behind BUG_ON()

2015-10-05 Thread Geliang Tang
) For CONFIG_BUG and !HAVE_ARCH_BUG_ON cases, BUG_ON() contains an unlikely compiler flag already. Hence, we can drop unlikely behind BUG_ON(). [1] http://lkml.iu.edu/hypermail/linux/kernel/1101.3/02289.html Signed-off-by: Geliang Tang Reviewed-by: Bart Van Assche --- Changes in v2: - Just re

[PATCH v2 3/3] mm/nommu: drop unlikely behind BUG_ON()

2015-10-05 Thread Geliang Tang
) For CONFIG_BUG and !HAVE_ARCH_BUG_ON cases, BUG_ON() contains an unlikely compiler flag already. Hence, we can drop unlikely behind BUG_ON(). [1] http://lkml.iu.edu/hypermail/linux/kernel/1101.3/02289.html Signed-off-by: Geliang Tang Acked-by: Davidlohr Bueso --- Changes in v2: - Just rewrit

[PATCH v2] mISDN: use kstrdup() in dsp_pipeline_build

2015-10-12 Thread Geliang Tang
Use kstrdup instead of strlen-kmalloc-strcpy. Remove unneeded NULL test, it will be tested inside kstrdup. Remove 0 length string test, it has been tested in the caller of dsp_pipeline_build. Signed-off-by: Geliang Tang --- Changes in v2: - Remove unneeded NULL test. --- drivers/isdn/mISDN

Re: [PATCH] pcnet32: fix a logic error with pci_set_dma_mask

2015-10-13 Thread Geliang Tang
On Mon, Oct 12, 2015 at 05:38:14AM -0700, David Miller wrote: > From: Geliang Tang > Date: Fri, 9 Oct 2015 03:45:39 -0700 > > > pcnet32 can't work on my machine recently. It says "architecture > > does not support 32bit PCI busmaster DMA". There is a log

[PATCH] pstore: add vmalloc error check

2015-10-13 Thread Geliang Tang
If vmalloc is failed, return -ENOMEM. Signed-off-by: Geliang Tang --- fs/pstore/pmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index feb5dd2..5a2f05a 100644 --- a/fs/pstore/pmsg.c +++ b/fs/pstore/pmsg.c @@ -37,6 +37,8 @@ static ssize_t

[PATCH] pstore: add a helper function pstore_register_kmsg

2015-10-13 Thread Geliang Tang
Add a new wraper function pstore_register_kmsg to keep the consistency with the other similar pstore_register_* functions. Signed-off-by: Geliang Tang --- fs/pstore/platform.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c

[PATCH] block: Fix compiler warnings in blk-merge.c

2015-09-06 Thread Geliang Tang
^ Signed-off-by: Geliang Tang --- block/blk-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index d088cff..5bd84c8 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -67,7 +67,7 @@ static struct bio *blk_bio_

[PATCH 3/3] pstore: add 'rmmod ramoops' support

2015-10-16 Thread Geliang Tang
y and free it. 5) Set console flags, make sure it can be registered again after be unregistered. Signed-off-by: Geliang Tang --- fs/pstore/ftrace.c | 15 ++- fs/pstore/internal.h | 4 fs/pstore/platform.c | 40 fs/pstore/p

[PATCH 2/3] pstore: add a helper function pstore_register_kmsg

2015-10-16 Thread Geliang Tang
Add a new wraper function pstore_register_kmsg to keep the consistency with the other similar pstore_register_* functions. Signed-off-by: Geliang Tang --- Send it again. --- fs/pstore/platform.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/pstore/platform.c b/fs

[PATCH 1/3] pstore: add vmalloc error check

2015-10-16 Thread Geliang Tang
If vmalloc is failed, return -ENOMEM. Signed-off-by: Geliang Tang Acked-by: Kees Cook --- Send it again. --- fs/pstore/pmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index feb5dd2..5a2f05a 100644 --- a/fs/pstore/pmsg.c +++ b/fs/pstore/pmsg.c

Re: [PATCH v3 0/3] pstore: add pstore unregister

2015-10-20 Thread Geliang Tang
On Tue, Oct 20, 2015 at 10:19:09AM -0700, Kees Cook wrote: > On Tue, Oct 20, 2015 at 12:39 AM, Geliang Tang wrote: > > On Mon, Oct 19, 2015 at 10:56:54PM +, Luck, Tony wrote: > >> Thanks for looking to close out this TODO item. > >> > >> The thing that

Re: [PATCH v3 0/3] pstore: add pstore unregister

2015-10-20 Thread Geliang Tang
On Tue, Oct 20, 2015 at 08:01:20PM -0700, Kees Cook wrote: > On Tue, Oct 20, 2015 at 7:52 PM, Geliang Tang wrote: > > On Tue, Oct 20, 2015 at 10:19:09AM -0700, Kees Cook wrote: > >> On Tue, Oct 20, 2015 at 12:39 AM, Geliang Tang wrote: > >> > On Mon, Oct 19, 2015 a

[PATCH] pstore: fix return type of pstore_is_mounted

2015-10-22 Thread Geliang Tang
This patch changes return type of pstore_is_mounted from int to bool. Signed-off-by: Geliang Tang --- fs/pstore/inode.c| 2 +- fs/pstore/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 3586491..d8c439d 100644

Re: [PATCH] pstore: remove __exit annotation for ramoops_remove

2015-10-22 Thread Geliang Tang
7;t reported as an error on my machine. But I think you are right. __exit should't be there. Acked-by: Geliang Tang > > Signed-off-by: Arnd Bergmann > Fixes: 2adb611ef932 ("pstore: add pstore unregister") > > diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c >

[PATCH v2 1/3] pstore: add vmalloc error check

2015-10-18 Thread Geliang Tang
When vmalloc is failed, let write_pmsg return -ENOMEM. Signed-off-by: Geliang Tang Acked-by: Kees Cook --- Changes in v2: - update commit log. --- fs/pstore/pmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index feb5dd2..5a2f05a 100644 --- a/fs

[PATCH v2 3/3] pstore: add pstore unregister

2015-10-18 Thread Geliang Tang
ystem. Signed-off-by: Geliang Tang --- Changes in v2: - Add pstore filesystem unregister. - update commit log. --- fs/pstore/Kconfig | 2 +- fs/pstore/Makefile | 6 +++--- fs/pstore/ftrace.c | 23 ++- fs/pstore/inode.c | 7 +++ fs/pstore/internal.h

[PATCH v2 2/3] pstore: add a helper function pstore_register_kmsg

2015-10-18 Thread Geliang Tang
Add a new wraper function pstore_register_kmsg to keep the consistency with other similar pstore_register_* functions. Signed-off-by: Geliang Tang --- Changes in v2: - update commit log. --- fs/pstore/platform.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs

[PATCH v2 0/3] pstore: add pstore unregister

2015-10-18 Thread Geliang Tang
On Fri, Oct 16, 2015 at 08:50:42AM -0700, Kees Cook wrote: > On Fri, Oct 16, 2015 at 8:25 AM, Geliang Tang wrote: > > +static struct dentry *dir; > > Since this is no longer a local, it should probably be renamed > something more descriptive. > I renamed it pstore_ftrace_d

[PATCH v2 1/2] staging: IB/ipath: use TASK_COMM_LEN in ipath_portdata

2015-10-18 Thread Geliang Tang
Use comm[TASK_COMM_LEN] instead of comm[16] in ipath_kernel.h. And add sched.h header in it. Signed-off-by: Geliang Tang --- Changes in v2: - split it into two patches. --- drivers/staging/rdma/ipath/ipath_kernel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 2/2] staging: IB/ipath: remove sched.h header

2015-10-18 Thread Geliang Tang
sched.h header in ipath_*.c is now unnecessary, since I have added sched.h in ipath_kernel.h. So remove it. Signed-off-by: Geliang Tang --- Changes in v2: - split it into two patches. --- drivers/staging/rdma/ipath/ipath_driver.c | 1 - drivers/staging/rdma/ipath/ipath_intr.c| 1

[PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk return boolean

2015-10-18 Thread Geliang Tang
This patch makes sptlrpc_flavor_has_bulk return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang --- drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++--- 2 files

[PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean

2015-10-18 Thread Geliang Tang
This patch makes ni_tio_has_gate2_registers return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang --- drivers/staging/comedi/drivers/ni_tio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH 3/3] staging: xgifb: make XGIfb_has_VB return boolean

2015-10-18 Thread Geliang Tang
This patch makes XGIfb_has_VB return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang --- drivers/staging/xgifb/XGI_main_26.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/xgifb/XGI_main_26.c

[PATCH 1/9] drm: fix trivial typos

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/gpu/drm/amd/include/atombios.h | 2 +- drivers/gpu/drm/radeon/cayman_blit_shaders.c| 2 +- drivers/gpu/drm/radeon/evergreen_blit_shaders.c | 2 +- drivers/gpu/drm/radeon/r600_blit_shaders.c | 2 +- 4 files changed, 4

[PATCH 2/9] scsi: fix trivial typos

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/scsi/isci/registers.h | 4 ++-- drivers/scsi/mpt2sas/mpt2sas_base.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/isci/registers.h b/drivers/scsi

[PATCH 4/9] dma: fix a trivial typo

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/dma/ste_dma40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 750d1b3..dd3e7ba 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -2907,7

[PATCH 5/9] staging: wilc1000: fix trivial typos

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/staging/wilc1000/linux_wlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index ccab89f..6dc5faf 100644 --- a/drivers/staging

[PATCH 9/9] usb: gadget: fix a trivial typo

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/usb/gadget/udc/pch_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index 3181fc9..7a04157 100644 --- a/drivers/usb/gadget/udc/pch_udc.c

[PATCH 6/9] clk: keystone: fix a trivial typo

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/clk/keystone/pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c index 3f553d0..a26ba21 100644 --- a/drivers/clk/keystone/pll.c +++ b/drivers/clk/keystone

[PATCH 3/9] net: fix trivial typos

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/net/ethernet/amd/amd8111e.h | 2 +- drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 +- drivers/net/ethernet/intel/igb/e1000_phy.c| 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH 7/9] input: keyboard: fix a trivial typo

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/input/keyboard/nomadik-ske-keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index c7d5b16..8567ee4 100644 --- a

[PATCH 8/9] parport: fix a trivial typo

2015-10-18 Thread Geliang Tang
s/regsiter/register/ Signed-off-by: Geliang Tang --- drivers/parport/share.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/parport/share.c b/drivers/parport/share.c index 5ce5ef2..8931696 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c @@ -148,7

[PATCH v3 0/3] pstore: add pstore unregister

2015-10-20 Thread Geliang Tang
nt when pstore is used. Changes in v2: - Add pstore filesystem unregister. - update commit log. --- Geliang Tang (3): pstore: add vmalloc error check pstore: add a helper function pstore_register_kmsg pstore: add pstore unregister fs/pstore/Kconfig | 2 +- fs/pstore/Makefile

[PATCH v3 1/3] pstore: add vmalloc error check

2015-10-20 Thread Geliang Tang
When vmalloc is failed, let write_pmsg return -ENOMEM. Signed-off-by: Geliang Tang Acked-by: Kees Cook --- fs/pstore/pmsg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index feb5dd2..5a2f05a 100644 --- a/fs/pstore/pmsg.c +++ b/fs/pstore/pmsg.c

[PATCH v3 2/3] pstore: add a helper function pstore_register_kmsg

2015-10-20 Thread Geliang Tang
Add a new wraper function pstore_register_kmsg to keep the consistency with other similar pstore_register_* functions. Signed-off-by: Geliang Tang --- fs/pstore/platform.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index

[PATCH v3 3/3] pstore: add pstore unregister

2015-10-20 Thread Geliang Tang
ystem. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig | 2 +- fs/pstore/Makefile | 6 +++--- fs/pstore/ftrace.c | 23 ++- fs/pstore/inode.c | 9 + fs/pstore/internal.h | 4 fs/pstore/platform.c | 35 +++ fs/p

[PATCH] zram: make is_partial_io/valid_io_request/page_zero_filled return boolean

2015-10-20 Thread Geliang Tang
This patch makes is_partial_io()/valid_io_request()/page_zero_filled() return boolean, since each function only uses either one or zero as its return value. Signed-off-by: Geliang Tang --- drivers/block/zram/zram_drv.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions

[PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister

2015-10-23 Thread Geliang Tang
When PSTORE_FLAGS_FRAGILE flag is set, only kmsg is registered in pstore_register. So, under these circumstances, only kmsg needs to be unregistered in pstore_unregister. Signed-off-by: Geliang Tang --- fs/pstore/platform.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff

[PATCH 2/2] efi-pstore: implement efivars_pstore_exit()

2015-10-23 Thread Geliang Tang
The original efivars_pstore_exit() is empty. I 1) add a bufsize check statement. 2) call pstore_unregister as it is defined now. 3) free the memory and set bufsize to 0. Signed-off-by: Geliang Tang --- drivers/firmware/efi/efi-pstore.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [PATCH 1/2] pstore: check PSTORE_FLAGS_FRAGILE in pstore_unregister

2015-10-24 Thread Geliang Tang
On Fri, Oct 23, 2015 at 09:54:31AM -0700, Kees Cook wrote: > On Fri, Oct 23, 2015 at 7:56 AM, Geliang Tang wrote: > > When PSTORE_FLAGS_FRAGILE flag is set, only kmsg is registered in > > pstore_register. So, under these circumstances, only kmsg needs to > > be unregistered

[PATCH] pstore: drop file opened reference count

2015-10-24 Thread Geliang Tang
We only need to increase the mounted reference count. When a file is opened, the filesystem can't be unmounted. Hence the pstore module can't be unloaded either. So I drop the opened reference count in this patch. [1] https://lkml.org/lkml/2015/10/20/84 Signed-off-by: Geliang Tang --- Here is

[PATCH] PM / devfreq: fix double kfree

2015-10-01 Thread Geliang Tang
When device_register() fails, kfree(devfreq) is called already in devfreq_dev_release(), hence there is no need to call kfree(devfreq) in err_dev again. Signed-off-by: Geliang Tang --- drivers/devfreq/devfreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH v2] hsi: fix double kfree

2015-10-01 Thread Geliang Tang
When device_register() fails, kfree() is called in hsi_client_release(), hence there is no need to call kfree in err3 again. Signed-off-by: Geliang Tang --- Changes in v2: - Just to make myself clearer that what I did in this patch. --- drivers/hsi/hsi.c | 1 - 1 file changed, 1 deletion

[PATCH] pcmcia: use kstrdup() in pcmcia_device_query()

2015-10-01 Thread Geliang Tang
Use kstrdup instead of kmalloc and strncpy. Signed-off-by: Geliang Tang --- drivers/pcmcia/ds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 0decee6..489ea10 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c

[PATCH] misc: mic: use kstrdup() in mic_sysfs

2015-10-01 Thread Geliang Tang
Use kstrdup instead of kmalloc and strncpy. Signed-off-by: Geliang Tang --- drivers/misc/mic/host/mic_sysfs.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/misc/mic/host/mic_sysfs.c b/drivers/misc/mic/host/mic_sysfs.c index 6dd864e

[PATCH] dm ioctl: use kvfree() in free_params()

2015-10-02 Thread Geliang Tang
There is no need to make a flag to tell that this memory is allocated by kmalloc or vmalloc. Just use kvfree to free the memory. Signed-off-by: Geliang Tang --- drivers/md/dm-ioctl.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/md/dm-ioctl.c b/drivers

[PATCH] KEYS: use kvfree() in add_key

2015-10-02 Thread Geliang Tang
There is no need to make a flag to tell that this memory is allocated by kmalloc or vmalloc. Just use kvfree to free the memory. Signed-off-by: Geliang Tang --- security/keys/keyctl.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/security/keys/keyctl.c b/security

[PATCH] IB/hfi1: use offset_in_page macro

2015-10-02 Thread Geliang Tang
Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang --- drivers/staging/rdma/hfi1/file_ops.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rdma/hfi1/file_ops.c b/drivers/staging/rdma/hfi1/file_ops.c index 9a7

[PATCH] IB/ipath: use offset_in_page macro

2015-10-02 Thread Geliang Tang
Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang --- drivers/staging/rdma/ipath/ipath_user_sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rdma/ipath/ipath_user_sdma.c b/drivers/staging/rdma/i

[PATCH] RDMA/amso1100: use offset_in_page macro

2015-10-02 Thread Geliang Tang
Use offset_in_page macro instead of (addr & ~PAGE_MASK). Signed-off-by: Geliang Tang --- drivers/staging/rdma/amso1100/c2_alloc.c| 2 +- drivers/staging/rdma/amso1100/c2_provider.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rdma/amso

[PATCH 2/3] sched/core: drop unlikely behind BUG_ON()

2015-10-03 Thread Geliang Tang
BUG_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index fe81929..a3518789 100644 --- a/kernel/sched/core.c +++ b/kernel

[PATCH 3/3] mm/nommu: drop unlikely behind BUG_ON()

2015-10-03 Thread Geliang Tang
BUG_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- mm/nommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/nommu.c b/mm/nommu.c index 1e0f168..92be862 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -578,16 +578,16

[PATCH 1/3] scsi: drop unlikely behind BUG_ON()

2015-10-03 Thread Geliang Tang
BUG_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- drivers/scsi/scsi_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f570b48..3b5faab 100644 --- a/drivers/scsi

[PATCH] lockdep: drop unlikely behind DEBUG_LOCKS_WARN_ON()

2015-10-04 Thread Geliang Tang
DEBUG_LOCKS_WARN_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index deae390..9d8cbb1 100644 --- a/kernel

[PATCH] cfg80211: drop unlikely behind WARN_ON()

2015-10-04 Thread Geliang Tang
WARN_ON() already contain an unlikely compiler flag. Drop it. Signed-off-by: Geliang Tang --- drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211

[PATCH] mwifiex: fix a comment typo

2015-10-04 Thread Geliang Tang
Just fix a typo in the code comment. Signed-off-by: Geliang Tang --- drivers/net/wireless/mwifiex/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 30cbafb..b7ac45f 100644 --- a

[PATCH] isci: fix two comment typos

2015-10-04 Thread Geliang Tang
Just fix two typos in the code comment. Signed-off-by: Geliang Tang --- drivers/scsi/isci/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index cfd0084..8fe106f 100644 --- a/drivers/scsi/isci/request.c

[PATCH] IB/iser: fix a comment typo

2015-10-04 Thread Geliang Tang
Just fix a typo in the code comment. Signed-off-by: Geliang Tang --- drivers/infiniband/ulp/iser/iscsi_iser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index f58ff96..8f2f105 100644

[PATCH] btrfs: fix a comment typo

2015-10-04 Thread Geliang Tang
Just fix a typo in the code comment. Signed-off-by: Geliang Tang --- fs/btrfs/free-space-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index abe3a66..7332995 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs

[PATCH v2] misc: mic: replace kfree with put_device

2015-10-04 Thread Geliang Tang
Handle a failed device_register(), replace kfree() with put_device(), which will call mbus_release_dev() or scif_release_dev(). Signed-off-by: Geliang Tang --- Changes in v2: - Just refresh this patch. --- drivers/misc/mic/bus/mic_bus.c | 2 +- drivers/misc/mic/bus/scif_bus.c | 2 +- 2 files

Re: [PATCH 3/3] mm/nommu: drop unlikely behind BUG_ON()

2015-10-04 Thread Geliang Tang
On Sun, Oct 04, 2015 at 06:50:55PM -0700, Davidlohr Bueso wrote: > On Sun, 04 Oct 2015, Geliang Tang wrote: > > >BUG_ON() already contain an unlikely compiler flag. Drop it. > > > >Signed-off-by: Geliang Tang > > Acked-by: Davidlohr Bueso > > ...

[PATCH] pstore: set PSTORE_ZSTD_COMPRESS to bool

2018-08-03 Thread Geliang Tang
Fix build error: fs/pstore/platform.o: In function `zbufsize_zstd': >> platform.c:(.text+0x172): undefined reference to `ZSTD_compressBound' Signed-off-by: Geliang Tang --- fs/pstore/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/Kco

[PATCH v3 1/2] squashfs: Add posix acl support

2018-08-07 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs documentation. This patch implements a squashfs_get_acl function to read the file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Documentation/filesystems/squashf

[PATCH v3 0/2] squashfs/squashfs-tools: Add posix acl support

2018-08-07 Thread Geliang Tang
/AgAGAOgDAAAEAAUA/xAABwD/IAAFAP8= --- Geliang Tang (1): squashfs: Add posix acl support Documentation/filesystems/squashfs.txt | 2 - fs/squashfs/Kconfig| 11 fs/squashfs/Makefile | 1 + fs/squashfs/acl.c | 69

[PATCH v3 2/2] squashfs-tools: Add posix acl support

2018-08-07 Thread Geliang Tang
This patch adds posix acl (Access Control Lists) support to squashfs-tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/squashfs-tools/read_xattrs.c b

[PATCH] pstore: add zstd compression support

2018-08-01 Thread Geliang Tang
This patch added the 6th compression algorithm support for pstore: zstd. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig| 17 ++--- fs/pstore/platform.c | 16 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig

[PATCH] mmc: block: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/mmc/core/block.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 8273b07..47ccb2a 100644

[PATCH] KEYS: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- security/keys/keyctl.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index dd0da25..ce1574a 100644 --- a

[PATCH] USB: iowarrior: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/usb/misc/iowarrior.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 7756953..816afad

[PATCH] usb: gadget: f_fs: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/usb/gadget/function/f_fs.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index

[PATCH] pstore: add zstd compression support

2018-03-21 Thread Geliang Tang
This patch added the 6th compression algorithm support for pstore: zstd. Signed-off-by: Geliang Tang --- Depend on 'crypto: Add zstd support' by Nick Terrell --- fs/pstore/Kconfig| 17 ++--- fs/pstore/platform.c | 16 2 files changed, 30 insert

[PATCH] pstore: rename two compression functions

2018-03-21 Thread Geliang Tang
ession pstore_choose_compression pstore_choose_compression pstore_compress pstore_compress pstore_decompress pstore_decompress Signed-off-by: Geliang Tang --- fs/pstore/platform.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH] pstore: set PSTORE_842_COMPRESS tristate

2018-03-21 Thread Geliang Tang
This patch sets PSTORE_842_COMPRESS 'tristate' like other pstore compression algorithms in Kconfig. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig index 09c19ef91526..a80c9bc0f

[PATCH] squashfs: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs' documentation. This patch implements the squashfs_get_acl function to read file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Documentation/filesystems/sq

[PATCH] squashfs-tools: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for mksquashfs and unsquashfs tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- squashfs-tools/unsquashfs_xattr.c | 4 +++- 3 files changed, 12 insertions(+), 6

[PATCH v2] squashfs: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs' documentation. This patch implements the squashfs_get_acl function to read file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Changes in v2: - fix build

[PATCH] pstore: use crypto compress API

2018-03-09 Thread Geliang Tang
the crypto subsystem has already initialized. 4) use 'unsigned int' type instead of 'size_t' in pstore_compress, pstore_decompress functions' length arguments. 5) rename 'zlib' to 'deflate' to follow the crypto API's name convention. Signed-off

Re: [PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Geliang Tang
On Mon, Jun 22, 2015 at 10:43:38AM +0100, Ian Abbott wrote: > Now it removes the call to compat_ptr(), so it won't work. Your first patch > was better, apart from exceeding the 80 character line limit. Thank you. I revised the patch again. Geliang Tang (1): staging: comedi: fix cast

[PATCH v3] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-22 Thread Geliang Tang
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- Changes in v3: - fix the 80 character line limit. Changes in v2: - compat_ptr() is substituted by 'unsigned

[PATCH] libceph: use kvfree() in ceph_put_page_vector()

2015-06-01 Thread Geliang Tang
Use kvfree() instead of open-coding it. Signed-off-by: Geliang Tang --- net/ceph/pagevec.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c index 096d914..d4f5f22 100644 --- a/net/ceph/pagevec.c +++ b/net/ceph/pagevec.c @@ -51,10

[PATCH] staging: comedi: fix sparse warning in ni_mio_common.c

2015-06-20 Thread Geliang Tang
This patch fixes the following sparse warning: drivers/staging/comedi/drivers/ni_mio_common.c:573:26: warning: shift too big (4294967295) for type int Signed-off-by: Geliang Tang --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] staging: comedi: fix sparse warning in comedi_compat32.c

2015-06-20 Thread Geliang Tang
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- drivers/staging/comedi/comedi_compat32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2] staging: comedi: fix cast warning in comedi_compat32.c

2015-06-20 Thread Geliang Tang
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang --- Changes in v2: - compat_ptr() is substituted by 'unsigned long'. --- drivers/staging/comedi/comedi_comp

Re: [PATCH] staging: comedi: fix sparse warning in comedi_compat32.c

2015-06-20 Thread Geliang Tang
ady exitsing typecast. :( > > and besides, this also introduces one new checkpatch warning of > line more than 80 char. > > regards > sudip Thank you for your review. I revised the patch as you suggested. Here it is. Geliang Tang (1): staging: comedi: fix cast warning in com

[PATCH] tcp: fix __tcp_transmit_skb's comment text

2019-02-26 Thread Geliang Tang
The function name tcp_do_sendmsg has been renamed. But it still appears in __tcp_transmit_skb's comment text. This patch changes it to tcp_sendmsg_locked. Signed-off-by: Geliang Tang --- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

Re: [PATCH] security: keys: add NULL checking for key->type->instantiate

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 10:26:53PM +, David Howells wrote: > Geliang Tang wrote: > > > key->type->instantiate can be NULL, add NULL checking to prevent > > NULL pointer dereference in __key_instantiate_and_link(). > > Do you have an oops report or test case for

Re: [PATCH] security: keys: add NULL checking for key->type->instantiate

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 10:26:53PM +, David Howells wrote: > Geliang Tang wrote: > > > key->type->instantiate can be NULL, add NULL checking to prevent > > NULL pointer dereference in __key_instantiate_and_link(). > > Do you have an oops report or test case for

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 04:37:36PM +0800, Coly Li wrote: > On 2019/1/30 5:29 下午, Geliang Tang wrote: > > This patch uses kmemdup_nul to create a NUL-terminated string from > > dc->sb.label. This is better than open coding it. > > > > With this, we can move env[2] i

[PATCH net-next] mptcp: use mptcp_for_each_subflow in mptcp_stream_accept

2020-08-03 Thread Geliang Tang
Use mptcp_for_each_subflow in mptcp_stream_accept instead of open-coding. Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index d3fe7296e1c9..400824eabf73 100644 --- a/net/mptcp

[PATCH] NFSv4.1: use BITS_PER_LONG macro in nfs4session.h

2020-12-07 Thread Geliang Tang
Use the existing BITS_PER_LONG macro instead of calculating the value. Signed-off-by: Geliang Tang --- fs/nfs/nfs4session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index b996ee23f1ba..3de425f59b3a 100644 --- a/fs/nfs

[PATCH net-next] nfc: netlink: use &w->w in nfc_genl_rcv_nl_event

2021-01-14 Thread Geliang Tang
Use the struct member w of the struct urelease_work directly instead of casting it. Signed-off-by: Geliang Tang --- net/nfc/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 573b38ad2f8e..640906359c22 100644 --- a/net

[MPTCP][PATCH net-next] mptcp: clear use_ack and use_map when dropping other suboptions

2020-12-15 Thread Geliang Tang
0003 [ 15.295492] Modules linked in: [ 15.295944] CR2: 0048 [ 15.296567] Kernel Offset: disabled [ 15.296941] ---[ end Kernel panic - not syncing: Fatal exception ]--- Reported-by: Christoph Paasch Fixes: 84dfe3677a6f (mptcp: send out dedicated ADD_ADDR packet) Signed-

[PATCH] staging: comedi: make "unsigned int __force *" shorter

2015-07-26 Thread Geliang Tang
Use macro "uip" instead of "unsigned int __force *", like "vuip" in arch/alpha/include/asm/core_cia.h. Signed-off-by: Geliang Tang --- drivers/staging/comedi/comedi_compat32.c | 3 +-- drivers/staging/comedi/comedi_compat32.h | 2 ++ drivers/staging/comedi/comed

Re: [PATCH v2] pstore: add lzo/lz4 compression support

2016-04-29 Thread Geliang Tang
On Thu, Feb 18, 2016 at 09:37:26AM -0800, Kees Cook wrote: > On Thu, Feb 18, 2016 at 6:04 AM, Geliang Tang wrote: > > Like zlib compression in pstore, this patch added lzo and lz4 > > compression support so that users can have more options and better > > compression ratio.

  1   2   3   4   5   6   7   8   >