Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-15 Thread bibo mao
On 2025/3/14 下午1:38, Markus Armbruster wrote: bibo mao writes: On 2025/3/13 下午6:32, Markus Armbruster wrote: [...] diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index a5840ff968..4674bd9163 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -859,30 +859,29 @@ static vo

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-14 Thread Markus Armbruster
bibo mao writes: On 2025/3/13 下午6:32, Markus Armbruster wrote: [...] >> diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c >> index a5840ff968..4674bd9163 100644 >> --- a/hw/loongarch/virt.c >> +++ b/hw/loongarch/virt.c >> @@ -859,30 +859,29 @@ static void virt_cpu_pre_plug(HotplugHandler

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-14 Thread bibo mao
On 2025/3/14 下午2:28, bibo mao wrote: On 2025/3/14 下午1:38, Markus Armbruster wrote: bibo mao writes: On 2025/3/13 下午6:32, Markus Armbruster wrote: [...] diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index a5840ff968..4674bd9163 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarc

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-14 Thread Markus Armbruster
bibo mao writes: > The question how to use error_propagate() comparing with error_setg() since > there is such API. :) error_propagate() should be mostly avoided in new code. It still exists because plenty of old code uses it. It can also be used to keep only first of several errors, but that

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-13 Thread bibo mao
On 2025/3/13 下午6:32, Markus Armbruster wrote: Bibo Mao writes: There is NULL pointer checking function error_propagate() already, it is not necessary to add checking for function parameter. Here remove NULL pointer checking with function parameter. Signed-off-by: Bibo Mao --- hw/loongar

[PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-13 Thread Bibo Mao
There is NULL pointer checking function error_propagate() already, it is not necessary to add checking for function parameter. Here remove NULL pointer checking with function parameter. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletion

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-13 Thread Markus Armbruster
Bibo Mao writes: > There is NULL pointer checking function error_propagate() already, > it is not necessary to add checking for function parameter. Here remove > NULL pointer checking with function parameter. > > Signed-off-by: Bibo Mao > --- > hw/loongarch/virt.c | 12 +++- > 1 file ch

Re: [PATCH 2/3] hw/loongarch/virt: Remove unnecessary NULL pointer checking

2025-03-13 Thread bibo mao
On 2025/3/13 下午6:32, Markus Armbruster wrote: Bibo Mao writes: There is NULL pointer checking function error_propagate() already, it is not necessary to add checking for function parameter. Here remove NULL pointer checking with function parameter. Signed-off-by: Bibo Mao --- hw/loongar