Re: [PATCH] mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL

2021-02-04 Thread Baolin Wang
-off-by: Magnum Shan > Signed-off-by: Chunyan Zhang LGTM. Reviewed-by: Baolin Wang > --- > drivers/mailbox/sprd-mailbox.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mailbox/sprd-mailbox.c b/drivers/mailbox/sprd-mailbox.c > index f6fab24

Re: [PATCH 2/3] mailbox: sprd: Add supplementary inbox support

2021-02-08 Thread Baolin Wang
if (!supp) { > + dev_err(dev, "no supplementary outbox specified\n"); > + return -ENODEV; > + } > + priv->supp_base = priv->outbox_base + (SPRD_OUTBOX_BASE_SPAN > * supp); > + } > + > /* Get the default outbox FIFO depth */ > priv->outbox_fifo_depth = > readl(priv->outbox_base + SPRD_MBOX_FIFO_DEPTH) + 1; > @@ -354,7 +410,8 @@ static int sprd_mbox_probe(struct platform_device *pdev) > } > > static const struct of_device_id sprd_mbox_of_match[] = { > - { .compatible = "sprd,sc9860-mailbox", }, > + { .compatible = "sprd,sc9860-mailbox", > + .data = (void *)SPRD_SUPP_INBOX_ID_SC9860 }, > { }, > }; > MODULE_DEVICE_TABLE(of, sprd_mbox_of_match); > -- > 2.7.4 > -- Baolin Wang

[PATCH] mm: backing-dev: Remove duplicated macro definition

2021-02-09 Thread Baolin Wang
Move the K() macro a little forward to remove the same macro definition. Signed-off-by: Baolin Wang --- mm/backing-dev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 71a2bf4..576220a 100644 --- a/mm/backing-dev.c +++ b/mm

Re: [PATCH 1/3] mailbox: sprd: Introduce refcnt when clients requests/free channels

2021-02-09 Thread Baolin Wang
On Tue, Feb 9, 2021 at 11:28 AM Orson Zhai wrote: > > On Mon, Feb 08, 2021 at 10:06:47PM +0800, Baolin Wang wrote: > > Hi Orson, > > > > On Mon, Feb 8, 2021 at 7:52 PM Orson Zhai wrote: > > > > > > From: Orson Zhai > > > > > > Uni

Re: [PATCH 2/3] mailbox: sprd: Add supplementary inbox support

2021-02-09 Thread Baolin Wang
On Tue, Feb 9, 2021 at 12:09 PM Orson Zhai wrote: > > On Mon, Feb 08, 2021 at 10:27:47PM +0800, Baolin Wang wrote: > > On Mon, Feb 8, 2021 at 7:52 PM Orson Zhai wrote: > > > > > > From: Orson Zhai > > > > > > Some sensors connected to Unisoc ma

[PATCH] hwspinlock: sprd: Remove redundant header files

2020-05-31 Thread Baolin Wang
Remove redundant header files. Signed-off-by: Baolin Wang --- drivers/hwspinlock/sprd_hwspinlock.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index 36dc803..b157495 100644 --- a/drivers/hwspinlock

[PATCH] iommu: Optimize the error handling when allocating an iommu group

2020-06-01 Thread Baolin Wang
Optimize the error handling to free the resources correctly when failed to allocate an iommu group. Signed-off-by: Baolin Wang --- drivers/iommu/iommu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 03d6a26

Re: [PATCH] iommu: Improve exception handling in iommu_group_alloc()

2020-06-01 Thread Baolin Wang
On Mon, Jun 01, 2020 at 02:38:05PM +0200, Markus Elfring wrote: > > Optimize the error handling to free the resources correctly when > > failed to allocate an iommu group. > > * I would not categorise the desired completion of exception handling > as a software optimisation. > > * Would you lik

[PATCH v2] iommu: Improve exception handling in iommu_group_alloc()

2020-06-01 Thread Baolin Wang
Improve the exception handling to free the resources correctly when failed to allocate an iommu group. Fixes: bc7d12b91bd3 ("iommu: Implement reserved_regions iommu-group sysfs file") Signed-off-by: Baolin Wang --- Changes from v1: - Improve the commmit message. - Add Fixes tag. --

Re: [PATCH v3] mfd: syscon: Add Spreadtrum physical regmap bus support

2020-05-19 Thread Baolin Wang
On Tue, May 19, 2020 at 6:35 PM Lee Jones wrote: > > On Mon, 04 May 2020, Baolin Wang wrote: > > > Hi Arnd > > > > On Tue, Apr 28, 2020 at 4:41 PM Baolin Wang wrote: > > > > > > On Tue, Apr 28, 2020 at 4:19 PM Lee Jones wrote: > >

Re: [PATCH 1/2] clk: sprd: mark the local clock symbols static

2020-05-19 Thread Baolin Wang
;clk: sprd: add clocks support for SC9863A") > Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang > --- > drivers/clk/sprd/sc9863a-clk.c | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/drivers/clk/sp

Re: [PATCH 2/2] clk: sprd: return correct type of value for _sprd_pll_recalc_rate

2020-05-19 Thread Baolin Wang
ce if the callback > .recalc_rate() is not set, the framework returns the parent_rate as > well. > > Fixes: 3e37b005580b ("clk: sprd: add adjustable pll support") > Signed-off-by: Chunyan Zhang Looks good to me. Reviewed-by: Baolin Wang -- Baolin Wang

Re: [PATCH v4 2/2] mailbox: sprd: Add Spreadtrum mailbox driver

2020-05-21 Thread Baolin Wang
Hi Jassi, On Wed, May 13, 2020 at 2:32 PM Baolin Wang wrote: > > On Wed, May 13, 2020 at 2:05 PM Jassi Brar wrote: > > > > On Tue, May 12, 2020 at 11:14 PM Baolin Wang wrote: > > > > > > Hi Jassi, > > > > > > On Thu, May 7, 2020 at 11:23

Re: [PATCH 0/5] Some clean-ups for bio merge

2020-08-11 Thread Baolin Wang
Hi, On Wed, Jul 29, 2020 at 11:28:32AM +0800, Baolin Wang wrote: > Hi, > > There are some duplicated code when trying to merge bio from pluged list > and software queue, thus this patch set did some clean-ups when merging > a bio. Any comments are welcome. Thanks. Any comments

Re: [PATCH] gpio: sprd: Clear interrupt when setting the type as edge

2020-07-31 Thread Baolin Wang
gt; break; > case IRQ_TYPE_EDGE_BOTH: > sprd_gpio_update(chip, offset, SPRD_GPIO_IS, 0); > sprd_gpio_update(chip, offset, SPRD_GPIO_IBE, 1); > + sprd_gpio_update(chip, offset, SPRD_GPIO_IC, 1); > irq_set_hand

Re: [PATCH RESEND 5/5] block: Remove __blk_mq_sched_bio_merge() helper

2020-08-17 Thread Baolin Wang
On Mon, Aug 17, 2020 at 02:26:08PM +0200, Christoph Hellwig wrote: > On Mon, Aug 17, 2020 at 08:14:08PM +0800, Baolin Wang wrote: > > On Mon, Aug 17, 2020 at 08:32:41AM +0200, Christoph Hellwig wrote: > > > On Mon, Aug 17, 2020 at 12:09:19PM +0800, Baolin Wang

Re: [PATCH RESEND 3/5] block: Add a new helper to attempt to merge a bio

2020-08-17 Thread Baolin Wang
On Mon, Aug 17, 2020 at 02:24:40PM +0200, Christoph Hellwig wrote: > On Mon, Aug 17, 2020 at 08:10:02PM +0800, Baolin Wang wrote: > > On Mon, Aug 17, 2020 at 08:26:34AM +0200, Christoph Hellwig wrote: > > > On Mon, Aug 17, 2020 at 12:09:17PM +0800, Baolin Wang wrote: > &g

[PATCH v2 2/3] block: Add a new helper to attempt to merge a bio

2020-08-17 Thread Baolin Wang
as a generic name. Signed-off-by: Baolin Wang --- block/blk-merge.c | 101 +++-- block/blk-mq-sched.c | 52 ++--- block/blk.h| 23 --- block/kyber-iosched.c | 2 +- include/linux/blk-mq.h | 2 - 5

[PATCH v2 3/3] block: Remove blk_mq_attempt_merge() function

2020-08-17 Thread Baolin Wang
The small blk_mq_attempt_merge() function is only called by __blk_mq_sched_bio_merge(), just open code it. Signed-off-by: Baolin Wang --- block/blk-mq-sched.c | 44 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/block/blk-mq-sched.c

[PATCH v2 0/3] Some clean-ups for bio merge

2020-08-17 Thread Baolin Wang
. - Move blk_mq_bio_list_merge() into blk-merge.c and rename it. - Some coding style improvements. Baolin Wang (3): block: Move bio merge related functions into blk-merge.c block: Add a new helper to attempt to merge a bio block: Remove blk_mq_attempt_merge() function block/blk-core.c

[PATCH v2 1/3] block: Move bio merge related functions into blk-merge.c

2020-08-17 Thread Baolin Wang
It's better to move bio merge related functions into blk-merge.c, which contains all merge related functions. Signed-off-by: Baolin Wang Reviewed-by: Christoph Hellwig --- block/blk-core.c | 156 - block/blk-merge.c

Re: [PATCH 2/2] blk-iocost: Use alloc_percpu_gfp() to simplify the code

2020-12-10 Thread Baolin Wang
Hi Tejun, Hello, On Thu, Dec 10, 2020 at 06:56:45PM +0800, Baolin Wang wrote: Use alloc_percpu_gfp() with __GFP_ZERO flag, which can remove some explicit initialization code. __GFP_ZERO is implicit for percpu allocations and local[64]_t's initial states aren't guaranteed to be al

Re: [PATCH] pinctrl: sprd: style: Simplify bool comparison

2021-01-12 Thread Baolin Wang
: Simplify xxx", otherwise Reviewed-by: Baolin Wang > --- > drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pinctrl/sprd/pinctrl-sprd.c > b/drivers/pinctrl/sprd/pinctrl-sprd.c > index 08dc193..dca7a5

[PATCH] mm/filemap: Remove unused parameter and change to void type for replace_page_cache_page()

2021-01-07 Thread Baolin Wang
Since commit 74d609585d8b ("page cache: Add and replace pages using the XArray") was merged, the replace_page_cache_page() can not fail and always return 0, we can remove the redundant return value and void it. Moreover remove the unused gfp_mask. Signed-off-by: Baolin Wang --- fs/

Re: [PATCH v2] pinctrl: sprd: Simplify bool comparison

2021-01-13 Thread Baolin Wang
by or acked-by tag for the following version if no other big changes. So again Reviewed-by: Baolin Wang > --- > Changes in v2: > - make "pinctrl: sprd:" as subject prefix > > drivers/pinctrl/sprd/pinctrl-sprd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

[PATCH] fuse: Fix possible deadlock when writing back dirty pages

2021-03-26 Thread Baolin Wang
Suggested-by: Peng Tao Signed-off-by: Baolin Wang --- fs/fuse/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8cccecb..af082b6 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1166,6 +1166,8 @@ static ssize_t fuse_fill_write_pages(struct

Re: [PATCH] fuse: Fix possible deadlock when writing back dirty pages

2021-03-26 Thread Baolin Wang
/0x14 Suggested-by: Peng Tao Signed-off-by: Baolin Wang --- fs/fuse/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8cccecb..af082b6 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -1166,6 +1166,8 @@ static ssize_t fuse_fill_write_pages

[PATCH v2 2/2] fuse: Remove unused parameter

2021-03-26 Thread Baolin Wang
Since we move the fuse_wait_on_page_writeback() to fuse_fill_write_pages(), thus remove the unused 'inode' parameter of fuse_send_write_pages(). Signed-off-by: Baolin Wang --- Changes from v1: - New patch. --- fs/fuse/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletion

[PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-03-26 Thread Baolin Wang
+0x10/0x14 Suggested-by: Peng Tao Signed-off-by: Baolin Wang --- Changes from v1: - Use fuse_wait_on_page_writeback() instead to wait for page stable. --- fs/fuse/file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 8cccecb

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-12 Thread Baolin Wang
Hi Miklos, 在 2021/3/27 14:36, Baolin Wang 写道: We can meet below deadlock scenario when writing back dirty pages, and writing files at the same time. The deadlock scenario can be reproduced by: - A writeback worker thread A is trying to write a bunch of dirty pages by fuse_writepages(), and the

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
Hi, 在 2021/4/13 16:57, Miklos Szeredi 写道: On Mon, Apr 12, 2021 at 3:23 PM Baolin Wang wrote: Hi Miklos, 在 2021/3/27 14:36, Baolin Wang 写道: We can meet below deadlock scenario when writing back dirty pages, and writing files at the same time. The deadlock scenario can be reproduced by: - A

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
在 2021/4/14 17:02, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: Sorry I missed this patch before, and I've tested this patch, it seems can solve the deadlock issue I met before. Great, thanks for testing. But look at this patch in detail, I think this

Re: [PATCH v2 1/2] fuse: Fix possible deadlock when writing back dirty pages

2021-04-14 Thread Baolin Wang
在 2021/4/14 17:47, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 11:22 AM Baolin Wang wrote: 在 2021/4/14 17:02, Miklos Szeredi 写道: On Wed, Apr 14, 2021 at 10:42 AM Baolin Wang wrote: Sorry I missed this patch before, and I've tested this patch, it seems can solve the deadlock is

[PATCH 2/2] blk-iocost: Use alloc_percpu_gfp() to simplify the code

2020-12-10 Thread Baolin Wang
Use alloc_percpu_gfp() with __GFP_ZERO flag, which can remove some explicit initialization code. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index ac6078a..52ce2e3

[PATCH 1/2] blk-iocost: Add iocg idle state tracepoint

2020-12-10 Thread Baolin Wang
It will be helpful to trace the iocg's whole state, including active and idle state. And we can easily expand the original iocost_iocg_activate trace event to support a state trace class, including active and idle state tracing. Signed-off-by: Baolin Wang --- block/blk-iocost.c

[PATCH 1/7] blk-iocost: Fix some typos in comments

2020-11-23 Thread Baolin Wang
Fix some typos in comments. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index bbe86d1..4ffde36 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -39,7 +39,7

[PATCH 3/7] blk-iocost: Just open code the q_name()

2020-11-23 Thread Baolin Wang
The simple q_name() function is only called from ioc_name(), just open code it to make code more readable. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 103ccbd

[PATCH 6/7] blk-iocost: Factor out the active iocgs' state check into a separate function

2020-11-23 Thread Baolin Wang
Factor out the iocgs' state check into a separate function to simplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 91 ++ 1 file changed, 51 insertions(+), 40 deletions(-) diff --git a/

[PATCH 4/7] blk-iocost: Add a flag to indicate if need update hwi

2020-11-23 Thread Baolin Wang
We can get the hwa and hwi at one time if no debt need to pay off, thus add a flag to indicate if the hw_inuse has been changed and need to update, which can avoid calling current_hweight() twice for no debt iocgs. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 7 +-- 1 file changed, 5

[PATCH 0/7] Some cleanups and improvements for blk-iocost

2020-11-23 Thread Baolin Wang
Hi, This patch set did some cleanups and improvements for blk-iocost, and no big functional changes. Please help to review. Thanks. Baolin Wang (7): blk-iocost: Fix some typos in comments blk-iocost: Remove unnecessary advance declaration blk-iocost: Just open code the q_name() blk

[PATCH 5/7] blk-iocost: Move the usage ratio calculation to the correct place

2020-11-23 Thread Baolin Wang
We only use the hweight based usage ratio to calculate the new hweight_inuse of the iocg to decide if this iocg can donate some surplus vtime. Thus move the usage ratio calculation to the correct place to avoid unnecessary calculation for some vtime shortage iocgs. Signed-off-by: Baolin Wang

[PATCH 2/7] blk-iocost: Remove unnecessary advance declaration

2020-11-23 Thread Baolin Wang
Remove unnecessary advance declaration of struct ioc_gq. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 4ffde36..103ccbd 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -370,8

[PATCH 7/7] blk-iocost: Factor out the base vrate change into a separate function

2020-11-23 Thread Baolin Wang
Factor out the base vrate change code into a separate function to fimplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 78 -- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a

Re: [RFC PATCH] blk-iocost: Optimize the ioc_refreash_vrate() function

2020-12-03 Thread Baolin Wang
在 2020/12/3 4:32, Tejun Heo 写道: On Sun, Nov 29, 2020 at 10:37:18AM +0800, Baolin Wang wrote: The ioc_refreash_vrate() will only be called in ioc_timer_fn() after starting a new period or stopping the period. So when starting a new period, the variable 'pleft' in ioc_refreash_

Re: [PATCH v2 0/5] Some cleanups and improvements for blk-iocost

2020-12-06 Thread Baolin Wang
with the code in patch 3. - Move the commit_weights() into ioc_check_iocgs(). - Move more related logics of adjusting base vrate into the ioc_adjust_base_vrate(). - Rename the new functions. Could you take this patch set if no objection from your side? Thanks. Baolin Wang (5): blk

Re: [PATCH 5/7] blk-iocost: Move the usage ratio calculation to the correct place

2020-11-25 Thread Baolin Wang
在 2020/11/25 20:19, Tejun Heo 写道: Hello, @@ -2225,6 +2207,25 @@ static void ioc_timer_fn(struct timer_list *timer) time_before64(vtime, now.vnow - ioc->margins.low))) { u32 hwa, old_hwi, hwm, new_hwi; + if (vdone != vtime) { +

Re: [PATCH 3/7] blk-iocost: Just open code the q_name()

2020-11-25 Thread Baolin Wang
On Tue, Nov 24, 2020 at 11:33:32AM +0800, Baolin Wang wrote: The simple q_name() function is only called from ioc_name(), just open code it to make code more readable. Signed-off-by: Baolin Wang I'm not sure this is an improvement. Either way seems fine to me. So, why change? Yes,

Re: [PATCH 6/7] blk-iocost: Factor out the active iocgs' state check into a separate function

2020-11-25 Thread Baolin Wang
Hello, On Tue, Nov 24, 2020 at 11:33:35AM +0800, Baolin Wang wrote: -static void ioc_timer_fn(struct timer_list *timer) +/* + * Waiters determine the sleep durations based on the vrate they + * saw at the time of sleep. If vrate has increased, some waiters + * could be sleeping for too long

Re: [PATCH 7/7] blk-iocost: Factor out the base vrate change into a separate function

2020-11-25 Thread Baolin Wang
Hello, On Tue, Nov 24, 2020 at 11:33:36AM +0800, Baolin Wang wrote: @@ -2320,45 +2358,11 @@ static void ioc_timer_fn(struct timer_list *timer) ioc->busy_level = clamp(ioc->busy_level, -1000, 1000); if (ioc->busy_level > 0 || (ioc->busy_level <

Re: [PATCH 4/7] blk-iocost: Add a flag to indicate if need update hwi

2020-11-25 Thread Baolin Wang
Hello, On Tue, Nov 24, 2020 at 11:33:33AM +0800, Baolin Wang wrote: @@ -1445,7 +1447,8 @@ static void iocg_kick_waitq(struct ioc_gq *iocg, bool pay_debt, * after the above debt payment. */ ctx.vbudget = vbudget; - current_hweight(iocg, NULL, &ctx.hw_i

[PATCH v2 1/5] blk-iocost: Fix some typos in comments

2020-11-26 Thread Baolin Wang
Fix some typos in comments. Signed-off-by: Baolin Wang Acked-by: Tejun Heo --- block/blk-iocost.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index bbe86d1..4ffde36 100644 --- a/block/blk-iocost.c +++ b/block/blk

[PATCH v2 4/5] blk-iocost: Factor out the active iocgs' state check into a separate function

2020-11-26 Thread Baolin Wang
Factor out the iocgs' state check into a separate function to simplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 94 +++--- 1 file changed, 54 insertions(+), 40 deletions(-) diff --git a/

[PATCH v2 3/5] blk-iocost: Move the usage ratio calculation to the correct place

2020-11-26 Thread Baolin Wang
We only use the hweight based usage ratio to calculate the new hweight_inuse of the iocg to decide if this iocg can donate some surplus vtime. Thus move the usage ratio calculation to the correct place to avoid unnecessary calculation for some vtime shortage iocgs. Signed-off-by: Baolin Wang

[PATCH v2 0/5] Some cleanups and improvements for blk-iocost

2020-11-26 Thread Baolin Wang
in patch 3. - Move the commit_weights() into ioc_check_iocgs(). - Move more related logics of adjusting base vrate into the ioc_adjust_base_vrate(). - Rename the new functions. Baolin Wang (5): blk-iocost: Fix some typos in comments blk-iocost: Remove unnecessary advance declaration blk

[PATCH v2 5/5] blk-iocost: Factor out the base vrate change into a separate function

2020-11-26 Thread Baolin Wang
Factor out the base vrate change code into a separate function to fimplify the ioc_timer_fn(). No functional change. Signed-off-by: Baolin Wang --- block/blk-iocost.c | 99 +- 1 file changed, 54 insertions(+), 45 deletions(-) diff --git a

[PATCH v2 2/5] blk-iocost: Remove unnecessary advance declaration

2020-11-26 Thread Baolin Wang
Remove unnecessary advance declaration of struct ioc_gq. Signed-off-by: Baolin Wang Acked-by: Tejun Heo --- block/blk-iocost.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 4ffde36..103ccbd 100644 --- a/block/blk-iocost.c +++ b/block/blk

[PATCH] mm/vmalloc: Remove unnecessary return statement

2020-12-01 Thread Baolin Wang
Remove unnecessary return statement for void function. Signed-off-by: Baolin Wang --- mm/vmalloc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 6ae491a..c290fc9 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2275,7 +2275,6 @@ static void __vunmap(const

Re: [PATCH] i2c: sprd:: depend on COMMON_CLK to fix compile tests

2021-01-19 Thread Baolin Wang
t; `sprd_i2c_probe': > i2c-sprd.c:(.text.sprd_i2c_probe+0x254): undefined reference to > `clk_set_parent' > > Fixes: 4a2d5f663dab ("i2c: Enable compile testing for more drivers") > Reported-by: kernel test robot > Signed-off-by: Krzysztof Kozlowski LGTM.

Re: [PATCH v2 1/3] mailbox: sprd: Introduce refcnt when clients requests/free channels

2021-03-07 Thread Baolin Wang
n requested by client yet. > > Fixes: ca27fc26cd22 ("mailbox: sprd: Add Spreadtrum mailbox driver") > Signed-off-by: Orson Zhai Sorry for the late reply. LGTM. Reviewed-by: Baolin Wang > --- > drivers/mailbox/sprd-mailbox.c | 43 +++--- >

Re: [PATCH v2 3/3] mailbox: sprd: Add supplementary inbox support

2021-03-07 Thread Baolin Wang
; but not emergency messages from the remote cores, such as step counting > sensor, with an independent FIFO and interrupt which is as same as channel > 0. Meanwihle, inbox part of this channel is still kept for original remote > core to use. > > Signed-off-by: Orson Zhai Reviewed-by:

[PATCH] mm: cma: Use pr_err_ratelimited for CMA warning

2021-03-09 Thread Baolin Wang
If we did not reserve extra CMA memory, the log buffer can be easily filled up by CMA failure warning when the devices calling dmam_alloc_coherent() to alloc DMA memory. Thus we can use pr_err_ratelimited() instead to reduce the duplicate CMA warning. Signed-off-by: Baolin Wang --- mm/cma.c | 4

Re: [PATCH 1/3] mailbox: sprd: Introduce refcnt when clients requests/free channels

2021-02-08 Thread Baolin Wang
Q_MSK); > + writel(SPRD_OUTBOX_FIFO_IRQ_MASK, priv->outbox_base + > SPRD_MBOX_IRQ_MSK); > + } > + mutex_unlock(&priv->lock); > } > > static const struct mbox_chan_ops sprd_mbox_ops = { > @@ -266,6 +276,8 @@ static int sprd_mbox_probe(struct platform_device *pdev) > return -ENOMEM; > > priv->dev = dev; > + priv->refcnt = 0; No need to do this, the priv structure is already cleared to 0. > + mutex_init(&priv->lock); > > /* > * The Spreadtrum mailbox uses an inbox to send messages to the target > -- > 2.7.4 > -- Baolin Wang

Re: [PATCH] mm/filemap: Remove redundant variable's assignment

2021-01-26 Thread Baolin Wang
在 2021/1/26 7:22, Andrew Morton 写道: On Mon, 25 Jan 2021 11:20:02 +0800 Baolin Wang wrote: We've already set the variable 'i' 's initial value before using it, thus remove redundant previous assignment of variable 'i'. ... --- a/mm/filemap.c +++ b/m

[PATCH] blk-cgroup: Use cond_resched() when destroy blkgs

2021-01-26 Thread Baolin Wang
_work+0x1bc/0x3f0 [ 4757.010704]  worker_thread+0x164/0x468 [ 4757.010705]  kthread+0x108/0x138 Signed-off-by: Baolin Wang --- block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3465d6e..af7c0ce 100644 --- a/bloc

[PATCH] mm/filemap: Remove redundant variable's assignment

2021-01-24 Thread Baolin Wang
We've already set the variable 'i' 's initial value before using it, thus remove redundant previous assignment of variable 'i'. Signed-off-by: Baolin Wang --- mm/filemap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index e4

Re: [PATCH] blk-cgroup: Use cond_resched() when destroy blkgs

2021-01-27 Thread Baolin Wang
Hi Tejun, Hello, Baolin. On Tue, Jan 26, 2021 at 09:33:25PM +0800, Baolin Wang wrote: On !PREEMPT kernel, we can get below softlockup when doing stress testing with creating and destroying block cgroup repeatly. The reason is it may take a long time to acquire the queue's lock in the lo

[PATCH v2] blk-cgroup: Use cond_resched() when destroy blkgs

2021-01-27 Thread Baolin Wang
10700]  blkcg_destroy_blkgs+0x68/0x150 [ 4757.010701]  cgwb_release_workfn+0x104/0x158 [ 4757.010702]  process_one_work+0x1bc/0x3f0 [ 4757.010704]  worker_thread+0x164/0x468 [ 4757.010705]  kthread+0x108/0x138 Suggested-by: Tejun Heo Signed-off-by: Baolin Wang --- Changes from v1: - Add might_

Re: [PATCH v2] blk-cgroup: Use cond_resched() when destroy blkgs

2021-01-27 Thread Baolin Wang
在 2021/1/28 11:41, Jens Axboe 写道: On 1/27/21 8:22 PM, Baolin Wang wrote: On !PREEMPT kernel, we can get below softlockup when doing stress testing with creating and destroying block cgroup repeatly. The reason is it may take a long time to acquire the queue's lock in the lo

[PATCH v3] blk-cgroup: Use cond_resched() when destroy blkgs

2021-01-27 Thread Baolin Wang
10700]  blkcg_destroy_blkgs+0x68/0x150 [ 4757.010701]  cgwb_release_workfn+0x104/0x158 [ 4757.010702]  process_one_work+0x1bc/0x3f0 [ 4757.010704]  worker_thread+0x164/0x468 [ 4757.010705]  kthread+0x108/0x138 Suggested-by: Tejun Heo Signed-off-by: Baolin Wang --- Changes from v2: - Simplify l

[PATCH] blk-cgroup: Remove obsolete macro

2021-01-27 Thread Baolin Wang
Remove the obsolete 'MAX_KEY_LEN' macro. Signed-off-by: Baolin Wang --- block/blk-cgroup.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4b4fcb5..a317c03 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -32,8 +32,6 @@

Re: [PATCH 2/2] blk-iocost: Use alloc_percpu_gfp() to simplify the code

2020-12-16 Thread Baolin Wang
Hi Tejun, Hello, On Fri, Dec 11, 2020 at 03:13:29PM +0800, Baolin Wang wrote: Thanks for teaching me this, at least I did not get this from the local_ops Documentation before. Just out of curiosity, these local[64]_t variables are also allocated from budy allocator ultimately, why they can

Re: [PATCH 1/2] blk-iocost: Add iocg idle state tracepoint

2020-12-16 Thread Baolin Wang
Hi Jens, It will be helpful to trace the iocg's whole state, including active and idle state. And we can easily expand the original iocost_iocg_activate trace event to support a state trace class, including active and idle state tracing. Signed-off-by: Baolin Wang Could you pick up pa

[RFC PATCH] blk-iocost: Optimize the ioc_refreash_vrate() function

2020-11-28 Thread Baolin Wang
period's time, the vcomp is 0, and we do not need compensate the vtime_rate in this case, just set it as the base vrate and return. When stopping the period, the ioc->vtime_err will be cleared to 0, and we also do not need to compensate the vtime_rate, just set it as the base vrate and retu

[PATCH 0/2] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-06 Thread Baolin Wang
behave as they should. Providing a standard framework for doing this in the kernel. Baolin Wang (2): gadget: Introduce the usb charger framework gadget: Support for the usb charger framework drivers/usb/gadget/charger.c | 547 + drivers/usb/gadget

[PATCH 1/2] gadget: Introduce the usb charger framework

2015-08-06 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang --- drivers/usb/gadget/charger.c| 547

[PATCH 2/2] gadget: Support for the usb charger framework

2015-08-06 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 41 + include/linux/usb/gadget.h| 20 ++ 2 files changed, 61 insertions(+) di

[PATCH v2 1/5] time: Introduce struct itimerspec64

2015-07-29 Thread Baolin Wang
The struct itimerspec is not year 2038 safe on 32bit systems due to the limitation of the struct timespec members. Introduce itimerspec64 which uses struct timespec64 instead and provide conversion functions. Signed-off-by: Baolin Wang --- include/linux/time64.h | 35

[PATCH v2 2/5] timekeeping: Introduce current_kernel_time64()

2015-07-29 Thread Baolin Wang
The current_kernel_time() is not year 2038 safe on 32bit systems since it returns a timespec value. Introduce current_kernel_time64() which returns a timespec64 value. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h |9 - kernel/time/timekeeping.c |6 +++--- 2 files

[PATCH v2 3/5] security: Introduce security_settime64()

2015-07-29 Thread Baolin Wang
function for removing that inline helper when following up patches are fixed the call sites. None of the existing hooks is using the timespec argument and therefor the patch is not doing any functional changes. Signed-off-by: Baolin Wang --- include/linux/lsm_hooks.h |5 +++-- include/linux

[PATCH v2 4/5] time: Introduce do_sys_settimeofday64()

2015-07-29 Thread Baolin Wang
The do_sys_settimeofday() function uses a timespec, which is not year 2038 safe on 32bit systems. Thus this patch introduces do_sys_settimeofday64(), which allows us to transition users of do_sys_settimeofday() to using 64bit time types. Signed-off-by: Baolin Wang --- include/linux

[PATCH v2 5/5] time: Introduce timespec64_to_jiffies()/jiffies_to_timespec64()

2015-07-29 Thread Baolin Wang
The conversion between struct timespec and jiffies is not year 2038 safe on 32bit systems. Introduce timespec64_to_jiffies() and jiffies_to_timespec64() functions which use struct timespec64 to make it ready for 2038 issue. Signed-off-by: Baolin Wang --- include/linux/jiffies.h | 22

[PATCH v2 0/5] Introduce 64bit accessors and structures required to address y2038 issues in the posix_clock subsystem

2015-07-29 Thread Baolin Wang
e one patch without y2038 safe. Baolin Wang (5): time: Introduce struct itimerspec64 timekeeping: Introduce current_kernel_time64() security: Introduce security_settime64() time: Introduce do_sys_settimeofday64() time: Introduce timespec64_to_jiffies()/jiffies_to_timespec64() include/

Re: [PATCH 1/2] gadget: Introduce the usb charger framework

2015-08-06 Thread Baolin Wang
On 7 August 2015 at 00:39, Greg KH wrote: > On Thu, Aug 06, 2015 at 03:03:48PM +0800, Baolin Wang wrote: >> This patch introduces the usb charger driver based on usb gadget that >> makes an enhancement to a power driver. It works well in practice but >> that requires a

Re: [PATCH 0/2] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:34, Peter Chen wrote: > On Thu, Aug 06, 2015 at 03:03:47PM +0800, Baolin Wang wrote: >> Currently the Linux kernel does not provide any standard integration of this >> feature that integrates the USB subsystem with the system power regulation >> prov

Re: [PATCH 1/2] gadget: Introduce the usb charger framework

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:41, Peter Chen wrote: > On Thu, Aug 06, 2015 at 03:03:48PM +0800, Baolin Wang wrote: >> This patch introduces the usb charger driver based on usb gadget that >> makes an enhancement to a power driver. It works well in practice but >> that requires a

Re: [PATCH 2/2] gadget: Support for the usb charger framework

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 13:45, Peter Chen wrote: > On Thu, Aug 06, 2015 at 03:03:49PM +0800, Baolin Wang wrote: >> The usb charger framework is based on usb gadget, and each usb gadget >> can be one usb charger to set the current limitation. >> >> This patch adds a notifie

Re: [PATCH 0/2] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 16:31, Peter Chen wrote: > >> >> Peter, Thanks for your reviewing and comments. Now I just introduce the >> framework to review for more feedbacks and do not have a useful user to use >> it. I just can show you some example code to show how to use it. Thanks. >> > > Felipe may

Re: [PATCH 2/2] gadget: Support for the usb charger framework

2015-08-07 Thread Baolin Wang
On 7 August 2015 at 17:07, Peter Chen wrote: > >> >> /** >> >> * struct usb_udc - describes one usb device controller @@ -127,12 >> >> +128,45 @@ void usb_gadget_giveback_request(struct usb_ep *ep, } >> >> EXPORT_SYMBOL_GPL(usb_gadget_giveback_request); >> >> >> >> +int usb_gadget_register_not

Re: [PATCH 0/2] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-07 Thread Baolin Wang
On 8 August 2015 at 01:52, Greg KH wrote: > On Fri, Aug 07, 2015 at 04:19:40PM +0800, Baolin Wang wrote: >> On 7 August 2015 at 13:34, Peter Chen wrote: >> > On Thu, Aug 06, 2015 at 03:03:47PM +0800, Baolin Wang wrote: >> >> Currently the Linux kernel does not provi

Re: [PATCH 2/2] gadget: Support for the usb charger framework

2015-08-07 Thread Baolin Wang
On 8 August 2015 at 01:53, Greg KH wrote: > On Fri, Aug 07, 2015 at 05:22:47PM +0800, Baolin Wang wrote: >> On 7 August 2015 at 17:07, Peter Chen wrote: >> > >> >> >> /** >> >> >> * struct usb_udc - describes one usb

Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-17 Thread Baolin Wang
On 17 August 2015 at 16:20, Li Jun wrote: > On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: >> On 17 August 2015 at 09:15, Li Jun wrote: >> > On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: >> >> On 14 August 2015 at 16:55, Li

Re: [Device-mainlining] [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-17 Thread Baolin Wang
On 17 August 2015 at 23:25, Tim Bird wrote: > > > On 08/16/2015 08:03 PM, Baolin Wang via device-mainlining wrote: >> On 14 August 2015 at 23:27, Greg KH wrote: >>> On Fri, Aug 14, 2015 at 05:47:45PM +0800, Baolin Wang wrote: >>>> + * >>>> + * Thi

Re: [PATCH v2 2/3] gadget: Introduce the usb charger framework

2015-08-17 Thread Baolin Wang
On 18 August 2015 at 01:24, Mark Brown wrote: > On Mon, Aug 17, 2015 at 11:03:26AM +0800, Baolin Wang wrote: >> On 14 August 2015 at 23:27, Greg KH wrote: >> > On Fri, Aug 14, 2015 at 05:47:45PM +0800, Baolin Wang wrote: > >> >> + * This program is free softwar

[PATCH v3 0/3] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-18 Thread Baolin Wang
DEVICE_ATTR_RW()/ATTRIBUTE_GROUPS() and change the method to register the attruibutes. - Remove the 'name' and 'entry' member of struct 'usb_charger'. - Replace devm_kzalloc() with kzalloc() to follow the the lifetime rules. - Other modifications. Baolin Wang (3): gadge

[PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
x27; which will implemented by user for usb gadget operations to get the usb charger type. Signed-off-by: Baolin Wang --- drivers/usb/gadget/udc/udc-core.c | 41 - include/linux/usb/gadget.h| 20 ++ 2 files changed, 60 insertions(+),

[PATCH v3 3/3] power: wm831x_power: Support USB charger current limit management

2015-08-18 Thread Baolin Wang
-by: Mark Brown Signed-off-by: Baolin Wang --- drivers/power/wm831x_power.c | 69 ++ include/linux/mfd/wm831x/pdata.h |3 ++ 2 files changed, 72 insertions(+) diff --git a/drivers/power/wm831x_power.c b/drivers/power/wm831x_power.c index db11ae6

[PATCH v3 2/3] gadget: Introduce the usb charger framework

2015-08-18 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang --- drivers/usb/gadget/Kconfig |7

Re: [PATCH v3 1/3] gadget: Support for the usb charger framework

2015-08-18 Thread Baolin Wang
On 19 August 2015 at 00:04, Greg KH wrote: > On Tue, Aug 18, 2015 at 07:14:19PM +0800, Baolin Wang wrote: >> The usb charger framework is based on usb gadget, and each usb gadget >> can be one usb charger to set the current limitation. >> >> This patch adds a notifier m

[PATCH v4 0/5] Introduce usb charger framework to deal with the usb gadget power negotation

2015-08-19 Thread Baolin Wang
and split the patch to avoid breaking build. - Other modifications. Baolin Wang (5): gadget: Introduce the notifier functions gadget: Introduce the usb charger framework gadget: Support for the usb charger framework gadget: Integrate with the usb gadget supporting for usb charger power

[PATCH v4 2/5] gadget: Introduce the usb charger framework

2015-08-19 Thread Baolin Wang
charger to get notified by status changes from the usb charger. It will report to power user to set the current limitation when detecting the usb charger is added or removed from extcon device state or usb gadget state. Signed-off-by: Baolin Wang --- drivers/usb/gadget/Kconfig |7

<    2   3   4   5   6   7   8   9   10   11   >