Re: Fix for 84676c1f (b5b6e8c8) missing in 4.14.y

2018-08-10 Thread Greg Kroah-Hartman
On Fri, Aug 10, 2018 at 05:10:52PM +, Felipe Franciosi wrote: > > > On 10 Aug 2018, at 03:15, Greg Kroah-Hartman > > wrote: > > > > On Fri, Aug 10, 2018 at 10:31:29AM +0800, Ming Lei wrote: > >> On Fri, Aug 10, 2018 at 02:09:01AM +, Felipe Franciosi wrote: > >>> Hi Ming (and all), >

[PATCH] blkcg: Make blkg_root_lookup() work for queues in bypass mode

2018-08-10 Thread Bart Van Assche
For legacy queues the only call of blkg_root_lookup() happens after bypass mode has been enabled. Since blkg_lookup() returns NULL for queues in bypass mode, modify the blkg_root_lookup() such that it no longer depends on bypass mode. Rename the function into blk_queue_root_blkg() as suggested by

Re: [PATCH v6 10/12] block: Change the runtime power management approach (1/2)

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 09:59 +0800, jianchao.wang wrote: > On 08/10/2018 03:41 AM, Bart Van Assche wrote: > > Instead of scheduling runtime resume of a request queue after a > > request has been queued, schedule asynchronous resume during request > > allocation. The new pm_request_resume() calls

Re: Fix for 84676c1f (b5b6e8c8) missing in 4.14.y

2018-08-10 Thread Felipe Franciosi
> On 10 Aug 2018, at 03:15, Greg Kroah-Hartman > wrote: > > On Fri, Aug 10, 2018 at 10:31:29AM +0800, Ming Lei wrote: >> On Fri, Aug 10, 2018 at 02:09:01AM +, Felipe Franciosi wrote: >>> Hi Ming (and all), >>> >>> Your series "scsi: virtio_scsi: fix IO hang caused by irq vector automatic

Re: [RFC PATCH 1/5] block: move call of scheduler's ->completed_request() hook

2018-08-10 Thread Omar Sandoval
On Fri, Aug 10, 2018 at 10:59:37AM +0800, jianchao.wang wrote: > Hi Omar > > On 08/10/2018 04:26 AM, Omar Sandoval wrote: > > @@ -524,6 +524,9 @@ inline void __blk_mq_end_request(struct request *rq, > > blk_status_t error) > > blk_stat_add(rq, now); > > } > > > > + if

Re: Fix for 84676c1f (b5b6e8c8) missing in 4.14.y

2018-08-10 Thread Felipe Franciosi
> On 10 Aug 2018, at 11:32, Greg Kroah-Hartman > wrote: > > On Fri, Aug 10, 2018 at 05:10:52PM +, Felipe Franciosi wrote: >> >>> On 10 Aug 2018, at 03:15, Greg Kroah-Hartman >>> wrote: >>> >>> On Fri, Aug 10, 2018 at 10:31:29AM +0800, Ming Lei wrote: On Fri, Aug 10, 2018 at

Re: [PATCH v6 02/12] scsi: Alter handling of RQF_DV requests

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 09:20 +0800, Ming Lei wrote: > On Thu, Aug 09, 2018 at 12:41:39PM -0700, Bart Van Assche wrote: > > Process all requests in state SDEV_CREATED instead of only RQF_DV > > requests. This does not change the behavior of the SCSI core because > > the SCSI device state is modified

Re: [PATCH v6 11/12] block: Change the runtime power management approach (2/2)

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 09:51 +0800, jianchao.wang wrote: > On 08/10/2018 03:41 AM, Bart Van Assche wrote: > > + > > + blk_set_pm_only(q); > > + /* > > +* This function only gets called if the most recent > > +* pm_request_resume() call occurred at least autosuspend_delay_ms > > +*

[PATCH v3 17/17] bcache: add the missing comments for smp_mb()/smp_wmb()

2018-08-10 Thread Coly Li
Checkpatch.pl warns there are 2 locations of smp_mb() and smp_wmb() without code comment. This patch adds the missing code comments for these memory barrier calls. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.h | 4 +++- drivers/md/bcache/super.c | 2 +- 2

[PATCH v3 14/17] bcache: move open brace at end of function definitions to next line

2018-08-10 Thread Coly Li
This is not a preferred style to place open brace '{' at the end of function definition, checkpatch.pl reports error for such coding style. This patch moves them into the start of the next new line. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/super.c | 9 ++---

[PATCH v3 13/17] bcache: add static const prefix to char * array declarations

2018-08-10 Thread Coly Li
This patch declares char * array with const prefix in sysfs.c, which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/sysfs.c

[PATCH v3 15/17] bcache: add missing SPDX header

2018-08-10 Thread Coly Li
The SPDX header is missing fro closure.c, super.c and util.c, this patch adds SPDX header for GPL-2.0 into these files. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.c | 1 + drivers/md/bcache/super.c | 1 + drivers/md/bcache/util.c| 1 + 3 files

[PATCH v3 16/17] bcache: remove unnecessary space before ioctl function pointer arguments

2018-08-10 Thread Coly Li
This is warned by checkpatch.pl, this patch removes the extra space. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index

Re: [PATCH v6 05/12] block, scsi: Rename QUEUE_FLAG_PREEMPT_ONLY into DV_ONLY and introduce PM_ONLY

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 09:39 +0800, jianchao.wang wrote: > On 08/10/2018 03:41 AM, Bart Van Assche wrote: > > +/* > > + * Whether or not blk_queue_enter() should proceed. RQF_PM requests are > > always > > + * allowed. RQF_DV requests are allowed if the PM_ONLY queue flag has not > > been > > + *

Re: [PATCH v6 08/12] block, scsi: Introduce blk_pm_runtime_exit()

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 15:27 +, Bart Van Assche wrote: > On Fri, 2018-08-10 at 10:39 +0800, jianchao.wang wrote: > > On 08/10/2018 03:41 AM, Bart Van Assche wrote: > > > +void blk_pm_runtime_exit(struct request_queue *q) > > > +{ > > > + if (!q->dev) > > > + return; > > > + > > > +

[PATCH] bcache: fix 0day error of setting writeback_rate by sysfs interface

2018-08-10 Thread Coly Li
Commit ea8c5356d390 ("bcache: set max writeback rate when I/O request is idle") changes struct bch_ratelimit member rate from uint32_t to atomic_long_t and uses atomic_long_set() in drivers/md/bcache/sysfs.c to set new writeback rate, after the input is converted from memory buf to long int by

[PATCH v3 03/17] bcache: add identifier names to arguments of function definitions

2018-08-10 Thread Coly Li
There are many function definitions do not have identifier argument names, scripts/checkpatch.pl complains warnings like this, WARNING: function definition argument 'struct bcache_device *' should also have an identifier name #16735: FILE: writeback.h:120: +void

[PATCH v3 01/17] bcache: style fix to replace 'unsigned' by 'unsigned int'

2018-08-10 Thread Coly Li
This patch fixes warning reported by checkpatch.pl by replacing 'unsigned' with 'unsigned int'. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/alloc.c | 36 ++- drivers/md/bcache/bcache.h| 107 +++ drivers/md/bcache/bset.c

[PATCH v3 02/17] bcache: style fix to add a blank line after declarations

2018-08-10 Thread Coly Li
Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/alloc.c | 3 +++ drivers/md/bcache/bcache.h| 1 + drivers/md/bcache/bset.c | 5 - drivers/md/bcache/btree.c | 7 +++ drivers/md/bcache/closure.c | 1 + drivers/md/bcache/debug.c | 4 ++--

[PATCH v3 06/17] bcache: replace printk() by pr_*() routines

2018-08-10 Thread Coly Li
There are still many places in bcache use printk to display kernel message, which are suggested to be preplaced by pr_*() routines like pr_err(), pr_info(), or pr_notice(). This patch replaces all printk() with a proper pr_*() routine for bcache code. Signed-off-by: Coly Li Reviewed-by:

[PATCH v3 05/17] bcache: replace Symbolic permissions by octal permission numbers

2018-08-10 Thread Coly Li
Symbolic permission names are used in bcache, for now octal permission numbers are encouraged to use for readability. This patch replaces all symbolic permissions by octal permission numbers. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++--

[PATCH v3 04/17] bcache: style fixes for lines over 80 characters

2018-08-10 Thread Coly Li
This patch fixes the lines over 80 characters into more lines, to minimize warnings by checkpatch.pl. There are still some lines exceed 80 characters, but it is better to be a single line and I don't change them. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h

[PATCH v3 12/17] bcache: fix code comments style

2018-08-10 Thread Coly Li
This patch fixes 3 style issues warned by checkpatch.pl, - Comment lines are not aligned - Comments use "/*" on subsequent lines - Comment lines use a trailing "*/" Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bset.c | 9 ++--- drivers/md/bcache/super.c

[PATCH v3 11/17] bcache: do not check NULL pointer before calling kmem_cache_destroy

2018-08-10 Thread Coly Li
kmem_cache_destroy() is safe for NULL pointer as input, the NULL pointer checking is unncessary. This patch just removes the NULL pointer checking to make code simpler. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/request.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v3 07/17] bcache: fix indent by replacing blank by tabs

2018-08-10 Thread Coly Li
bch_btree_insert_check_key() has unaligned indent, or indent by blank characters. This patch makes the indent aligned and replace blank by tabs. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 08/17] bcache: replace '%pF' by '%pS' in seq_printf()

2018-08-10 Thread Coly Li
'%pF' and '%pf' are deprecated vsprintf pointer extensions, this patch replace them by '%pS', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 09/17] bcache: fix typo 'succesfully' to 'successfully'

2018-08-10 Thread Coly Li
This patch fixes typo 'succesfully' to correct 'successfully', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/io.c | 2 +- drivers/md/bcache/request.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 10/17] bcache: prefer 'help' in Kconfig

2018-08-10 Thread Coly Li
Current bcache Kconfig uses '---help---' as header of help information, for now 'help' is prefered. This patch fixes this style by replacing '---help---' by 'help' in bcache Kconfig file. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/Kconfig | 6 +++--- 1 file

Re: [PATCH v6 08/12] block, scsi: Introduce blk_pm_runtime_exit()

2018-08-10 Thread Bart Van Assche
On Fri, 2018-08-10 at 10:39 +0800, jianchao.wang wrote: > On 08/10/2018 03:41 AM, Bart Van Assche wrote: > > +void blk_pm_runtime_exit(struct request_queue *q) > > +{ > > + if (!q->dev) > > + return; > > + > > + pm_runtime_get_sync(q->dev); > > + q->dev = NULL; > > +} > >

[PATCH v3 00/17] fixes reported by checkpatch.pl

2018-08-10 Thread Coly Li
This series contains several minor fixes and code cleanup reported by scripts/checkpatch.pl. After this series, there are still a few warning from checkpatch.pl, but I think they are necessary to be the way they are and don't change them. For example, error message exceeds 80 chars line limit.

Re: [PATCH] bcache: fix 0day error of setting writeback_rate by sysfs interface

2018-08-10 Thread Jens Axboe
On 8/10/18 9:45 AM, Coly Li wrote: > Commit ea8c5356d390 ("bcache: set max writeback rate when I/O request > is idle") changes struct bch_ratelimit member rate from uint32_t to > atomic_long_t and uses atomic_long_set() in drivers/md/bcache/sysfs.c > to set new writeback rate, after the input is

Re: [PATCH] bcache: fix 0day error of setting writeback_rate by sysfs interface

2018-08-10 Thread Stefan Priebe - Profihost AG
Thanks for cc. How is this exploitable? I mean only root can write to sysfs? Or do you mean by allowing a user via sudo to write to that entry? Stefan Am 10.08.2018 um 17:45 schrieb Coly Li: > Commit ea8c5356d390 ("bcache: set max writeback rate when I/O request > is idle") changes struct

[PATCH v3 02/17] bcache: style fix to add a blank line after declarations

2018-08-10 Thread Coly Li
Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/alloc.c | 3 +++ drivers/md/bcache/bcache.h| 1 + drivers/md/bcache/bset.c | 5 - drivers/md/bcache/btree.c | 7 +++ drivers/md/bcache/closure.c | 1 + drivers/md/bcache/debug.c | 4 ++--

[PATCH v3 00/17] bcache for 4.19, 3rd wave

2018-08-10 Thread Coly Li
Hi Jens, This series contains several minor fixes and code cleanup reported by scripts/checkpatch.pl. After this series, there are still a few warning from checkpatch.pl, but I think they are necessary to be the way they are and don't change them. For example, error message exceeds 80 chars line

[PATCH v3 06/17] bcache: replace printk() by pr_*() routines

2018-08-10 Thread Coly Li
There are still many places in bcache use printk to display kernel message, which are suggested to be preplaced by pr_*() routines like pr_err(), pr_info(), or pr_notice(). This patch replaces all printk() with a proper pr_*() routine for bcache code. Signed-off-by: Coly Li Reviewed-by:

[PATCH v3 03/17] bcache: add identifier names to arguments of function definitions

2018-08-10 Thread Coly Li
There are many function definitions do not have identifier argument names, scripts/checkpatch.pl complains warnings like this, WARNING: function definition argument 'struct bcache_device *' should also have an identifier name #16735: FILE: writeback.h:120: +void

[PATCH v3 01/17] bcache: style fix to replace 'unsigned' by 'unsigned int'

2018-08-10 Thread Coly Li
This patch fixes warning reported by checkpatch.pl by replacing 'unsigned' with 'unsigned int'. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/alloc.c | 36 ++- drivers/md/bcache/bcache.h| 107 +++ drivers/md/bcache/bset.c

[PATCH v3 05/17] bcache: replace Symbolic permissions by octal permission numbers

2018-08-10 Thread Coly Li
Symbolic permission names are used in bcache, for now octal permission numbers are encouraged to use for readability. This patch replaces all symbolic permissions by octal permission numbers. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++--

[PATCH v3 04/17] bcache: style fixes for lines over 80 characters

2018-08-10 Thread Coly Li
This patch fixes the lines over 80 characters into more lines, to minimize warnings by checkpatch.pl. There are still some lines exceed 80 characters, but it is better to be a single line and I don't change them. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h

[PATCH v3 17/17] bcache: add the missing comments for smp_mb()/smp_wmb()

2018-08-10 Thread Coly Li
Checkpatch.pl warns there are 2 locations of smp_mb() and smp_wmb() without code comment. This patch adds the missing code comments for these memory barrier calls. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.h | 4 +++- drivers/md/bcache/super.c | 2 +- 2

[PATCH v3 13/17] bcache: add static const prefix to char * array declarations

2018-08-10 Thread Coly Li
This patch declares char * array with const prefix in sysfs.c, which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/sysfs.c

[PATCH v3 08/17] bcache: replace '%pF' by '%pS' in seq_printf()

2018-08-10 Thread Coly Li
'%pF' and '%pf' are deprecated vsprintf pointer extensions, this patch replace them by '%pS', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 09/17] bcache: fix typo 'succesfully' to 'successfully'

2018-08-10 Thread Coly Li
This patch fixes typo 'succesfully' to correct 'successfully', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/io.c | 2 +- drivers/md/bcache/request.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 12/17] bcache: fix code comments style

2018-08-10 Thread Coly Li
This patch fixes 3 style issues warned by checkpatch.pl, - Comment lines are not aligned - Comments use "/*" on subsequent lines - Comment lines use a trailing "*/" Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bset.c | 9 ++--- drivers/md/bcache/super.c

[PATCH v3 10/17] bcache: prefer 'help' in Kconfig

2018-08-10 Thread Coly Li
Current bcache Kconfig uses '---help---' as header of help information, for now 'help' is prefered. This patch fixes this style by replacing '---help---' by 'help' in bcache Kconfig file. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/Kconfig | 6 +++--- 1 file

[PATCH v3 16/17] bcache: remove unnecessary space before ioctl function pointer arguments

2018-08-10 Thread Coly Li
This is warned by checkpatch.pl, this patch removes the extra space. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index

[PATCH v3 14/17] bcache: move open brace at end of function definitions to next line

2018-08-10 Thread Coly Li
This is not a preferred style to place open brace '{' at the end of function definition, checkpatch.pl reports error for such coding style. This patch moves them into the start of the next new line. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/super.c | 9 ++---

[PATCH v3 07/17] bcache: fix indent by replacing blank by tabs

2018-08-10 Thread Coly Li
bch_btree_insert_check_key() has unaligned indent, or indent by blank characters. This patch makes the indent aligned and replace blank by tabs. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v3 15/17] bcache: add missing SPDX header

2018-08-10 Thread Coly Li
The SPDX header is missing fro closure.c, super.c and util.c, this patch adds SPDX header for GPL-2.0 into these files. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/closure.c | 1 + drivers/md/bcache/super.c | 1 + drivers/md/bcache/util.c| 1 + 3 files

[PATCH v3 11/17] bcache: do not check NULL pointer before calling kmem_cache_destroy

2018-08-10 Thread Coly Li
kmem_cache_destroy() is safe for NULL pointer as input, the NULL pointer checking is unncessary. This patch just removes the NULL pointer checking to make code simpler. Signed-off-by: Coly Li Reviewed-by: Shenghui Wang --- drivers/md/bcache/request.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v3 00/17] bcache for 4.19, 3rd wave

2018-08-10 Thread Coly Li
On 2018/8/11 1:19 PM, Coly Li wrote: > Hi Jens, > > This series contains several minor fixes and code cleanup reported by > scripts/checkpatch.pl. After this series, there are still a few warning > from checkpatch.pl, but I think they are necessary to be the way they > are and don't change them.

Re: [PATCH] bcache: fix 0day error of setting writeback_rate by sysfs interface

2018-08-10 Thread Coly Li
On 2018/8/11 2:19 AM, Jens Axboe wrote: > On 8/10/18 9:45 AM, Coly Li wrote: >> Commit ea8c5356d390 ("bcache: set max writeback rate when I/O request >> is idle") changes struct bch_ratelimit member rate from uint32_t to >> atomic_long_t and uses atomic_long_set() in drivers/md/bcache/sysfs.c >>

Re: [PATCH] bcache: fix 0day error of setting writeback_rate by sysfs interface

2018-08-10 Thread Coly Li
On 2018/8/11 2:13 AM, Stefan Priebe - Profihost AG wrote: > Thanks for cc. How is this exploitable? I mean only root can write to > sysfs? Or do you mean by allowing a user via sudo to write to that entry? Hi Stefan, This is not a security 0day bug, this is an error reported by Linux kernel 0day

Re: [PATCH v2 03/17] bcache: add identifier names to arguments of function definitions

2018-08-10 Thread Coly Li
On 2018/8/10 4:26 PM, shenghui wrote: > > > On 08/10/2018 03:23 PM, Coly Li wrote: >> There are many function definitions do not have identifier argument names, >> scripts/checkpatch.pl complains warnings like this, >> >> WARNING: function definition argument 'struct bcache_device *' should >>

Re: [PATCH] block: Remove two superfluous #include directives

2018-08-10 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG

[PATCH v2 07/17] bcache: fix indent by replacing blank by tabs

2018-08-10 Thread Coly Li
bch_btree_insert_check_key() has unaligned indent, or indent by blank characters. This patch makes the indent aligned and replace blank by tabs. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/btree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 06/17] bcache: replace printk() by pr_*() routines

2018-08-10 Thread Coly Li
There are still many places in bcache use printk to display kernel message, which are suggested to be preplaced by pr_*() routines like pr_err(), pr_info(), or pr_notice(). This patch replaces all printk() with a proper pr_*() routine for bcache code. Signed-off-by: Coly Li Cc: Shenghui Wang

[PATCH v2 11/17] bcache: do not check NULL pointer before calling kmem_cache_destroy

2018-08-10 Thread Coly Li
kmem_cache_destroy() is safe for NULL pointer as input, the NULL pointer checking is unncessary. This patch just removes the NULL pointer checking to make code simpler. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/request.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 10/17] bcache: prefer 'help' in Kconfig

2018-08-10 Thread Coly Li
Current bcache Kconfig uses '---help---' as header of help information, for now 'help' is prefered. This patch fixes this style by replacing '---help---' by 'help' in bcache Kconfig file. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/Kconfig | 6 +++--- 1 file changed, 3

[PATCH v2 08/17] bcache: replace '%pF' by '%pS' in seq_printf()

2018-08-10 Thread Coly Li
'%pF' and '%pf' are deprecated vsprintf pointer extensions, this patch replace them by '%pS', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/closure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 05/17] bcache: replace Symbolic permissions by octal permission numbers

2018-08-10 Thread Coly Li
Symbolic permission names are used in bcache, for now octal permission numbers are encouraged to use for readability. This patch replaces all symbolic permissions by octal permission numbers. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++--

[PATCH v2 09/17] bcache: fix typo 'succesfully' to 'successfully'

2018-08-10 Thread Coly Li
This patch fixes typo 'succesfully' to correct 'successfully', which is suggested by checkpatch.pl. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/io.c | 2 +- drivers/md/bcache/request.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 13/17] bcache: add static const prefix to char * array declarations

2018-08-10 Thread Coly Li
This patch declares char * array with const prefix in sysfs.c, which is suggested by checkpatch.pl. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c

[PATCH v2 12/17] bcache: fix code comments style

2018-08-10 Thread Coly Li
This patch fixes 3 style issues warned by checkpatch.pl, - Comment lines are not aligned - Comments use "/*" on subsequent lines - Comment lines use a trailing "*/" Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/bset.c | 9 ++--- drivers/md/bcache/super.c | 22

[PATCH v2 16/17] bcache: remove unnecessary space before ioctl function pointer arguments

2018-08-10 Thread Coly Li
This is warned by checkpatch.pl, this patch removes the extra space. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/bcache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index

[PATCH v2 14/17] bcache: move open brace at end of function definitions to next line

2018-08-10 Thread Coly Li
This is not a preferred style to place open brace '{' at the end of function definition, checkpatch.pl reports error for such coding style. This patch moves them into the start of the next new line. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/super.c | 9 ++--- 1 file

[PATCH v2 15/17] bcache: add missing SPDX header

2018-08-10 Thread Coly Li
The SPDX header is missing fro closure.c, super.c and util.c, this patch adds SPDX header for GPL-2.0 into these files. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/closure.c | 1 + drivers/md/bcache/super.c | 1 + drivers/md/bcache/util.c| 1 + 3 files changed, 3

[PATCH v2 17/17] bcache: add the missing comments for smp_mb()/smp_wmb()

2018-08-10 Thread Coly Li
Checkpatch.pl warns there are 2 locations of smp_mb() and smp_wmb() without code comment. This patch adds the missing code comments for these memory barrier calls. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/closure.h | 4 +++- drivers/md/bcache/super.c | 2 +- 2 files

[PATCH v2 02/17] bcache: style fix to add a blank line after declarations

2018-08-10 Thread Coly Li
Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/alloc.c | 3 +++ drivers/md/bcache/bcache.h| 1 + drivers/md/bcache/bset.c | 5 - drivers/md/bcache/btree.c | 7 +++ drivers/md/bcache/closure.c | 1 + drivers/md/bcache/debug.c | 4 ++--

[PATCH v2 01/17] bcache: style fix to replace 'unsigned' by 'unsigned int'

2018-08-10 Thread Coly Li
This patch fixes warning reported by checkpatch.pl by replacing 'unsigned' with 'unsigned int'. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/alloc.c | 36 ++- drivers/md/bcache/bcache.h| 107 +++ drivers/md/bcache/bset.c | 114

[PATCH v2 00/17] fixes reported by checkpatch.pl

2018-08-10 Thread Coly Li
This series contains several minor fixes and code cleanup reported by scripts/checkpatch.pl. After this series, there are still a few warning from checkpatch.pl, but I think they are necessary to be the way they are and don't change them. For example, error message exceeds 80 chars line limit.

[PATCH v2 03/17] bcache: add identifier names to arguments of function definitions

2018-08-10 Thread Coly Li
There are many function definitions do not have identifier argument names, scripts/checkpatch.pl complains warnings like this, WARNING: function definition argument 'struct bcache_device *' should also have an identifier name #16735: FILE: writeback.h:120: +void

[PATCH v2 04/17] bcache: style fixes for lines over 80 characters

2018-08-10 Thread Coly Li
This patch fixes the lines over 80 characters into more lines, to minimize warnings by checkpatch.pl. There are still some lines exceed 80 characters, but it is better to be a single line and I don't change them. Signed-off-by: Coly Li Cc: Shenghui Wang --- drivers/md/bcache/bcache.h| 4

Re: Fix for 84676c1f (b5b6e8c8) missing in 4.14.y

2018-08-10 Thread Greg Kroah-Hartman
On Fri, Aug 10, 2018 at 10:31:29AM +0800, Ming Lei wrote: > On Fri, Aug 10, 2018 at 02:09:01AM +, Felipe Franciosi wrote: > > Hi Ming (and all), > > > > Your series "scsi: virtio_scsi: fix IO hang caused by irq vector automatic > > affinity" which forces virtio-scsi to use blk-mq fixes an