[PATCH RESEND] scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()

2021-03-19 Thread Yue Hu
From: Yue Hu Since vcc/vccq/vccq2 have already been null checked before using. Signed-off-by: Yue Hu --- drivers/scsi/ufs/ufshcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7b3267e..f941bc3 100644

[PATCH] scsi: ufs: Don't check UFSHCD_CAP_WB_EN capability in ufshcd_wb_toggle{_flush}

2021-03-19 Thread Yue Hu
From: Yue Hu There are several redundant calls to ufshcd_is_wb_allowed() as below: ufshcd_wb_config() |-> ufshcd_is_wb_allowed() |-> ufshcd_wb_toggle() -> ufshcd_is_wb_allowed() |-> ufshcd_wb_toggle_flush() -> ufshcd_is_wb_allowed() wb_on_store() |-> uf

[PATCH v3] scsi: ufs: Tidy up WB configuration code

2021-03-18 Thread Yue Hu
From: Yue Hu There are similar code implementations for WB configuration in ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. We can extract the part to create a new helper with a flag parameter to reduce code duplication. Meanwhile, rename ufshcd_wb_ctrl() to ufshcd_wb_toggle

[PATCH v2] scsi: ufs: Tidy up WB configuration code

2021-03-17 Thread Yue Hu
From: Yue Hu There are similar code implementations for WB configuration in ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. We can extract the part to create a new helper with a flag parameter to reduce code duplication. Meanwhile, rename ufshcd_wb_ctrl() to ufshcd_wb_toggle

Re: [PATCH] scsi: ufs: Tidy up WB configuration code

2021-03-17 Thread Yue Hu
On Wed, 17 Mar 2021 14:02:23 + Avri Altman wrote: > > > > From: Yue Hu > > > > There are similar code implemetentions for WB configurations in > > ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. We can > > extract the part to create a new helper

[PATCH] scsi: ufs: Tidy up WB configuration code

2021-03-17 Thread Yue Hu
From: Yue Hu There are similar code implemetentions for WB configurations in ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. We can extract the part to create a new helper with a flag parameter to reduce code duplication. Meanwhile, change ufshcd_wb_ctrl() -> ufshcd_wb_tog

Re: [PATCH v2] cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled

2021-03-10 Thread Yue Hu
Hi Rafael, Please also review the patch. I'm not sure if you have reviewed or not. Thank you! On Wed, 24 Feb 2021 12:17:27 +0530 Viresh Kumar wrote: > On 24-02-21, 14:39, Yue Hu wrote: > > From: Yue Hu > > > > Note that sugov_update_next_freq() may return false, that

[PATCH] scsi: ufs: Remove unnecessary ret in ufshcd_populate_vreg()

2021-03-10 Thread Yue Hu
From: Yue Hu The local variable _ret_ is always zero, so we can remove it and just return 0 directly in the end. Signed-off-by: Yue Hu --- drivers/scsi/ufs/ufshcd-pltfrm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi

[PATCH] scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()

2021-03-08 Thread Yue Hu
From: Yue Hu Since vcc/vccq/vccq2 have already been null checked before using. Signed-off-by: Yue Hu --- drivers/scsi/ufs/ufshcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7b3267e..f941bc3 100644

[PATCH] scsi: ufs: Don't spew log for enabling WB in ufshcd_wb_config()

2021-03-08 Thread Yue Hu
From: Yue Hu Since ufshcd_wb_ctrl() will spew error/debug log firstly, no need to spew similar error/info log again in the caller ufshcd_wb_config(). Also, several log words in ufshcd_wb_ctrl() are not consistent with other sites, let's improve them. And remove unhelpful ret from debug log due

[PATCH] scsi: ufs: Remove redundant WB enabling check in ufshcd_wb_toggle_flush()

2021-03-05 Thread Yue Hu
From: Yue Hu Note that ufshcd_wb_toggle_flush() will be called only in ufshcd_wb_config() which have already checked if WB is allowed. Signed-off-by: Yue Hu --- drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-24 Thread Yue Hu
On Wed, 24 Feb 2021 13:46:11 +0100 "Rafael J. Wysocki" wrote: > On Wed, Feb 24, 2021 at 3:24 AM Yue Hu wrote: > > > > On Mon, 22 Feb 2021 15:30:34 +0100 > > "Rafael J. Wysocki" wrote: > > > > > On Mon, Feb 22, 2021 at 2:57 PM Yue H

[PATCH v2] cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled

2021-02-23 Thread Yue Hu
From: Yue Hu Note that sugov_update_next_freq() may return false, that means the caller sugov_fast_switch() will do nothing except fast switch check. Similarly, sugov_deferred_update() also has unnecessary operations of raw_spin_{lock,unlock} in sugov_update_single_freq() for that case. So

Re: [PATCH] cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled

2021-02-23 Thread Yue Hu
On Wed, 24 Feb 2021 11:32:36 +0530 Viresh Kumar wrote: > On 24-02-21, 13:42, Yue Hu wrote: > > From: Yue Hu > > > > Note that sugov_update_next_freq() may return false, that means the > > caller sugov_fast_switch() will do nothing except fast switc

[PATCH] cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled

2021-02-23 Thread Yue Hu
From: Yue Hu Note that sugov_update_next_freq() may return false, that means the caller sugov_fast_switch() will do nothing except fast switch check. Similarly, sugov_deferred_update() also has unnecessary operations of raw_spin_{lock,unlock} in sugov_update_single_freq() for that case. So

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-23 Thread Yue Hu
On Mon, 22 Feb 2021 15:30:34 +0100 "Rafael J. Wysocki" wrote: > On Mon, Feb 22, 2021 at 2:57 PM Yue Hu wrote: > > > > On Mon, 22 Feb 2021 11:00:14 +0530 > > Viresh Kumar wrote: > > > > > On 19-02-21, 19:45, Yue Hu wrote: > > > >

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-22 Thread Yue Hu
On Mon, 22 Feb 2021 11:00:14 +0530 Viresh Kumar wrote: > On 19-02-21, 19:45, Yue Hu wrote: > > We will set next_f to next_freq(previous freq) if next_f is > > reduced for busy CPU. Then the next sugov_update_next_freq() will check > > if next_freq matches next_f if need_f

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-19 Thread Yue Hu
On Fri, 19 Feb 2021 15:05:51 +0530 Viresh Kumar wrote: > On 19-02-21, 16:20, Yue Hu wrote: > > However, we will skip the update if need_freq_update is not set. > > Not really, we will update freq periodically nevertheless, around > every 10ms or something.. >

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-19 Thread Yue Hu
On Fri, 19 Feb 2021 13:12:49 +0530 Viresh Kumar wrote: > On 19-02-21, 14:41, Yue Hu wrote: > > On Fri, 19 Feb 2021 09:39:33 +0530 > > Viresh Kumar wrote: > > > > > On 19-02-21, 11:38, Yue Hu wrote: > > > > There's a possibility: we will use the

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-18 Thread Yue Hu
On Fri, 19 Feb 2021 09:39:33 +0530 Viresh Kumar wrote: > On 19-02-21, 11:38, Yue Hu wrote: > > There's a possibility: we will use the previous freq to update if > > next_f is reduced for busy CPU if need_freq_update is set in > > sugov_update_next_freq(). > > Rig

Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to busy CPU if need_freq_update is set

2021-02-18 Thread Yue Hu
On Thu, 18 Feb 2021 15:50:29 +0530 Viresh Kumar wrote: > On 18-02-21, 16:25, Yue Hu wrote: > > From: Yue Hu > > > > For busy CPU case, we do not need to avoid freq reduction if limits > > change since commit 600f5badb78c ("cpufreq: schedutil: Don't skip &g

Re: [PATCH] cpufreq: schedutil: Don't use the limits_changed flag any more

2021-02-14 Thread Yue Hu
On Mon, 15 Feb 2021 12:00:08 +0530 Viresh Kumar wrote: > On 14-02-21, 11:44, Yue Hu wrote: > > On Fri, 12 Feb 2021 17:14:03 +0100 > > "Rafael J. Wysocki" wrote: > > > This may be running in parallel with sugov_update_next_freq() on a > >

[PATCH] mmc: core: Reduce code duplication to mmc_spi_send_{csd|cid}

2021-02-14 Thread Yue Hu
From: Yue Hu mmc_spi_send_{csd|cid} have similar function body. Let's remove the duplicated part to simplify the code, just add opcode to distinguish them in changed mmc_spi_send_cxd(). Signed-off-by: Yue Hu --- drivers/mmc/core/mmc_ops.c | 39 +-- 1 file

Re: [PATCH] cpufreq: schedutil: Don't use the limits_changed flag any more

2021-02-13 Thread Yue Hu
On Fri, 12 Feb 2021 17:14:03 +0100 "Rafael J. Wysocki" wrote: > On Mon, Feb 8, 2021 at 4:08 AM Yue Hu wrote: > > > > From: Yue Hu > > > > The limits_changed flag was introduced by commit 600f5badb78c > > ("cpufreq: schedutil: Don't skip

[PATCH] cpufreq: schedutil: Don't use the limits_changed flag any more

2021-02-07 Thread Yue Hu
From: Yue Hu The limits_changed flag was introduced by commit 600f5badb78c ("cpufreq: schedutil: Don't skip freq update when limits change") due to race condition where need_freq_update is cleared in get_next_freq() which causes reducing the CPU frequency is ineffective while busy

Re: [PATCH] sched/topology: Switch to sched_debug() for conditional sched domain printk

2021-02-03 Thread Yue Hu
On Wed, 3 Feb 2021 15:22:56 +0530 Srikar Dronamraju wrote: > * Yue Hu [2021-02-03 12:20:10]: > > > From: Yue Hu > > > > Currently, the macro sched_debug_enabled has same function as > > sched_debug() with return false for !SCHED_DEBUG. And sched_debug

[PATCH] sched: Use SCHED_WARN_ON() instead of WARN_ON_ONCE() with CONFIG_SCHED_DEBUG

2021-02-03 Thread Yue Hu
From: Yue Hu Since SCHED_WARN_ON() is provided as a wrapper for WARN_ON_ONCE(). Signed-off-by: Yue Hu --- kernel/sched/core.c | 2 +- kernel/sched/rt.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 8c54810..8f1f345

[PATCH] sched/topology: Switch to sched_debug() for conditional sched domain printk

2021-02-02 Thread Yue Hu
From: Yue Hu Currently, the macro sched_debug_enabled has same function as sched_debug() with return false for !SCHED_DEBUG. And sched_debug() is a wapper of variable sched_debug_enabled for SCHED_DEBUG. We can use the sched_debug() for all cases. So, let's remove the unnecessary marco, also use

[PATCH] mmc: core: Use host instead of card argument to mmc_spi_send_csd()

2021-01-31 Thread Yue Hu
From: Yue Hu Since mmc_send_cxd_data() does not care card if opcode is MMC_SEND_CSD. Signed-off-by: Yue Hu --- drivers/mmc/core/mmc_ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index baa6314..265d95e

[PATCH] init/Kconfig: correct thermal pressure retrieve API

2021-01-26 Thread Yue Hu
From: Yue Hu We're using arch_scale_thermal_pressure() to retrieve per CPU thermal pressure. Signed-off-by: Yue Hu --- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/Kconfig b/init/Kconfig index c4e0a7e..5b35e15 100644 --- a/init/Kconfig +++ b/init

[PATCH] mmc: test: clean up mmc_test_cleanup()

2021-01-18 Thread Yue Hu
From: Yue Hu mmc_test_cleanup() has same body as __mmc_test_prepare() with write except the character to memset(). Signed-off-by: Yue Hu --- drivers/mmc/core/mmc_test.c | 24 +--- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/mmc/core/mmc_test.c b

[PATCH] mmc: test: remove the shutdown function

2021-01-18 Thread Yue Hu
From: Yue Hu Since it's doing nothing for shutdown behavior. And the callback will be checked firstly in mmc_bus_shutdown(). Signed-off-by: Yue Hu --- drivers/mmc/core/mmc_test.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/mmc/core/mmc_test.c b/drivers/mmc/core/mmc_test.c

[PATCH v2] mmc: core: remove unused host parameter of mmc_sd_get_csd()

2021-01-18 Thread Yue Hu
From: Yue Hu The host parameter is not used in the body of mmc_sd_get_csd(), so let's remove it. Update related code at the same time. Signed-off-by: Yue Hu --- v2: fix minor commit message. drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/core/sd.h | 2 +- drivers/mmc/core/sdio.c | 2 +- 3

[PATCH] mmc: core: remove unused host parameter of mmc_sd_get_csd()

2021-01-18 Thread Yue Hu
From: Yue Hu The host parameter host is not used in the body of mmc_sd_get_csd(), so let's remove it. Also update related code. Signed-off-by: Yue Hu --- drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/core/sd.h | 2 +- drivers/mmc/core/sdio.c | 2 +- 3 files changed, 4 insertions(+), 4

[PATCH] mmc: core: remove needless err = 0 in mmc_init_card()

2021-01-13 Thread Yue Hu
From: Yue Hu Since they will always being in successful path to return 0 directly, no need to set err = 0. Signed-off-by: Yue Hu --- drivers/mmc/core/mmc.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index ff3063c..54ab1c7 100644

Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-27 Thread Yue Hu
On Thu, 27 Aug 2020 11:56:46 +0530 Viresh Kumar wrote: > On 27-08-20, 14:20, Yue Hu wrote: > > Currenly, drivers/video/backlight does not call > > thermal_of_cooling_device_register() > > to register thermal cooling device. The issue happened in msm-4.19 kernel >

Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-27 Thread Yue Hu
On Thu, 27 Aug 2020 10:44:01 +0530 Viresh Kumar wrote: > On 27-08-20, 12:03, Yue Hu wrote: > > Hi Daniel, > > > > Now, i'm just focus on removing the kernel warning based on current code > > logic. > > Commit 8ea229511e06 (thermal: Add cooling device'

Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-26 Thread Yue Hu
On Wed, 26 Aug 2020 11:19:02 +0200 Daniel Lezcano wrote: > Hi Yue, > > On 26/08/2020 04:13, Yue Hu wrote: > > On Mon, 24 Aug 2020 12:40:35 +0200 > > Daniel Lezcano wrote: > > > >> On 18/08/2020 08:30, Yue Hu wrote: > >>> From: Yue Hu >

Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-25 Thread Yue Hu
On Mon, 24 Aug 2020 12:40:35 +0200 Daniel Lezcano wrote: > On 18/08/2020 08:30, Yue Hu wrote: > > From: Yue Hu > > > > We observed warning about kzalloc() when register thermal cooling device > > in backlight_device_register(). backlight display can be a coolin

Re: [PATCH] thermal: sysfs: Fall back to vmalloc() for cooling device's statistics

2020-08-21 Thread Yue Hu
On Fri, 21 Aug 2020 08:39:45 + David Laight wrote: > From: Yue Hu > > Sent: 21 August 2020 03:44 > > > > From: Yue Hu > > > > We observed warning about kzalloc() when register thermal cooling device > > in backlight_device_register(). backlight di

[PATCH] thermal: sysfs: Fall back to vmalloc() for cooling device's statistics

2020-08-20 Thread Yue Hu
From: Yue Hu We observed warning about kzalloc() when register thermal cooling device in backlight_device_register(). backlight display can be a cooling device since reducing screen brightness will can help reduce temperature. However, ->get_max_state of backlight will assign max brightn

Re: [PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-19 Thread Yue Hu
On Wed, 19 Aug 2020 16:47:01 +0530 Amit Kucheria wrote: > On Tue, Aug 18, 2020 at 12:00 PM Yue Hu wrote: > > > > From: Yue Hu > > > > We observed warning about kzalloc() when register thermal cooling device > > in backlight_device_register(). backlight display

[PATCH] thermal: sysfs: fall back to vzalloc for cooling device's statistics

2020-08-18 Thread Yue Hu
From: Yue Hu We observed warning about kzalloc() when register thermal cooling device in backlight_device_register(). backlight display can be a cooling device since reducing screen brightness will can help reduce temperature. However, ->get_max_state of backlight will assign max brightn

[PATCH] arm64: traps: Add str of description to panic() in die()

2020-08-04 Thread Yue Hu
From: Yue Hu Currently, there are different description strings in die() such as die("Oops",,), die("Oops - BUG",,). And panic() called by die() will always show "Fatal exception" or "Fatal exception in interrupt". Note that panic() will run a

Re: [PATCH] arm64: mm: add message to die() in die_kernel_fault()

2020-07-30 Thread Yue Hu
On Thu, 30 Jul 2020 13:27:23 +0100 Catalin Marinas wrote: > On Thu, Jul 30, 2020 at 07:47:57PM +0800, Yue Hu wrote: > > From: Yue Hu > > > > Just to identify the kernel fault more clearly. > > > > Signed-off-by: Yue Hu > > --- > > arch/a

[PATCH] arm64: mm: add message to die() in die_kernel_fault()

2020-07-30 Thread Yue Hu
From: Yue Hu Just to identify the kernel fault more clearly. Signed-off-by: Yue Hu --- arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 8afb238..3a753c7 100644 --- a/arch/arm64/mm/fault.c +++ b/arch

[PATCH] of: reserved-memory: remove duplicated call to of_get_flat_dt_prop() for no-map node

2020-07-30 Thread Yue Hu
From: Yue Hu Just use nomap instead of the second call to of_get_flat_dt_prop(). And change nomap as a bool type due to != NULL operator. Also, correct comment about node of 'align' -> 'alignment'. Signed-off-by: Yue Hu --- drivers/of/of_reserved_mem.c | 12 ++-- 1 file changed

[PATCH] panic: make print_oops_end_marker() static

2020-07-23 Thread Yue Hu
From: Yue Hu Since print_oops_end_marker() is not used externally, also remove it in kernel.h at the same time. Signed-off-by: Yue Hu --- include/linux/kernel.h | 1 - kernel/panic.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/linux/kernel.h b/include

Re: [PATCH] sysrq: use only one slot for loglevels in key table

2020-07-22 Thread Yue Hu
On Wed, 22 Jul 2020 12:49:52 +0200 Greg KH wrote: > On Wed, Jul 22, 2020 at 05:26:09PM +0800, Yue Hu wrote: > > From: Yue Hu > > > > Currently, sysrq_key_table[] has 10 slots for same interface to change > > console loglevel. No specific purpose to do that. Let's us

[PATCH] sysrq: use only one slot for loglevels in key table

2020-07-22 Thread Yue Hu
From: Yue Hu Currently, sysrq_key_table[] has 10 slots for same interface to change console loglevel. No specific purpose to do that. Let's use only one slot to save memory space. Also, update the key2index calculation. And remove needless code in help message print path to make the logic

[PATCH] drivers/block/zram/zram_drv.c: remove ret check for invalid io request

2020-05-30 Thread Yue Hu
From: Yue Hu There is no need to goto out to check ret if it's an invalid io request since we know ret = -EINVAL. Let's return the error directly in that case. Signed-off-by: Yue Hu --- drivers/block/zram/zram_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH RESEND v2] squashfs: avoid to allocate page actor when to read into the page cache

2019-07-18 Thread Yue Hu
From: Yue Hu Currently, we will allocate page actor in squashfs_readpage_block() via kmalloc() if enable SQUASHFS_FILE_DIRECT option. However, the actor size is small and it will be freed finally in this function. So, use stack memory will be better for that case to avoid out of memory. Signed

[PATCH v2] squashfs: avoid to allocate page actor when to read into the page cache

2019-07-17 Thread Yue Hu
From: Yue Hu Currently, we will allocate page actor in squashfs_readpage_block() via kmalloc() if enable SQUASHFS_FILE_DIRECT option. However, the actor size is small and it will be freed finally in this function. So, use stack memory will be better for that case to avoid out of memory. Signed

[PATCH] squashfs: avoid to allocate page actor when to read into the page cache

2019-07-17 Thread Yue Hu
From: Yue Hu Currently, we will allocate page actor in squashfs_readpage_block() via kmalloc() if enable SQUASHFS_FILE_DIRECT option. However, the actor size is small and it will be freed finally in this function. So just use stack memory to avoid out of memory. Also save this space for system

Re: [PATCH v2] pstore: Add boot loader log messages support

2019-05-19 Thread Yue Hu
On Wed, 15 May 2019 15:04:09 -0700 Kees Cook wrote: > Hi! > > Thanks for the reminder to review this code. :) Sorry for the delay! > > On Thu, Feb 14, 2019 at 11:49 PM Yue Hu wrote: > > > > From: Yue Hu > > > > Sometimes we hope to check boot loader

Re: [PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-21 Thread Yue Hu
On Thu, 21 Feb 2019 09:23:09 +0100 Michal Hocko wrote: > On Thu 21-02-19 12:01:30, Yue Hu wrote: > > From: Yue Hu > > > > If debugfs_create_dir() failed, the following debugfs_create_file() > > will be meanless since it depends on non-NULL tmp dentry and it will

[PATCH] mm/cma_debug: Avoid to use global cma_debugfs_root

2019-02-20 Thread Yue Hu
From: Yue Hu Currently cma_debugfs_root is at global space. That is unnecessary since it will be only used by next cma_debugfs_add_one(). We can just pass it to following calling, it will save global space. Also remove useless idx parameter. Signed-off-by: Yue Hu --- mm/cma_debug.c | 9

[PATCH] mm/cma_debug: Check for null tmp in cma_debugfs_add_one()

2019-02-20 Thread Yue Hu
From: Yue Hu If debugfs_create_dir() failed, the following debugfs_create_file() will be meanless since it depends on non-NULL tmp dentry and it will only waste CPU resource. Signed-off-by: Yue Hu --- mm/cma_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/cma_debug.c b/mm

Re: [PATCH] pstore: Add boot loader log messages support

2019-02-18 Thread Yue Hu
On Fri, 15 Feb 2019 12:01:30 +0800 Yue Hu wrote: > On Tue, 12 Feb 2019 12:43:36 -0800 > Kees Cook wrote: > > > On Fri, Feb 1, 2019 at 12:30 AM Yue Hu wrote: > > > > > > From bac8bbcd6081b967422dc82074a41098a0cf5180 Mon Sep 17 00:00:00 2001 > > > Fro

[PATCH v2] pstore: Add boot loader log messages support

2019-02-14 Thread Yue Hu
From: Yue Hu Sometimes we hope to check boot loader log messages (e.g. Android Verified Boot status) when kernel is coming up. Generally it does depend on serial device, but it will be removed for the hardware shipping to market by most of manufacturers. In that case better solder and proper

[PATCH] pstore/ram: Avoid possible failure of dummy device unregister

2019-02-14 Thread Yue Hu
From 08ac260f36b4c11eb33fa58466462a5e1027bdb3 Mon Sep 17 00:00:00 2001 From: Yue Hu Date: Thu, 14 Feb 2019 19:34:16 +0800 Subject: [PATCH] pstore/ram: Avoid possible failure of dummy device unregister If create dummy platform device failed, dummy variable should not been set as NULL. Because