[PATCH OLK-6.6] mm/mm_spe.c: remove redundant checks and debug prints in mm_spe probe

hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICC3QM CVE: NA -------------------------------- The pdev and dev pointers are already registered and validated in arm_spe_pmu, so additional checks in the mm_spe driver are redundant. Similarly, the kpti=off condition is implicitly handled because the mm_spe driver cannot be enabled if arm_spe_pmu registration fails. Remove these unnecessary checks to simplify the code. Fixes: b8a759002c48 ("mm_monitor/mm_spe: Introduce standalone SPE profiling framework") Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- drivers/arm/mm_monitor/mm_spe.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/arm/mm_monitor/mm_spe.c b/drivers/arm/mm_monitor/mm_spe.c index 3acfd47c545f..192f1f9c6adb 100644 --- a/drivers/arm/mm_monitor/mm_spe.c +++ b/drivers/arm/mm_monitor/mm_spe.c @@ -473,25 +473,7 @@ static int mm_spe_device_probe(struct platform_device *pdev) struct device *dev; - /* - * If kernelspace is unmapped when running at EL0, then the SPE - * buffer will fault and prematurely terminate the AUX session. - */ - if (arm64_kernel_unmapped_at_el0()) { - dev_warn_once(dev, "buffer inaccessible. Try passing \"kpti=off\" on the kernel command line\n"); - return -EPERM; - } - - if (!pdev) { - pr_err("pdev is NULL!\n"); - return -ENODEV; - } - dev = &pdev->dev; - if (!dev) { - pr_err("dev is NULL!\n"); - return -ENODEV; - } spe = devm_kzalloc(dev, sizeof(*spe), GFP_KERNEL); if (!spe) -- 2.25.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16670 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ZOO... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16670 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/ZOO...
participants (2)
-
patchwork bot
-
Ze Zuo