Re: [PATCH v7 3/3] mm/mempolicy: Support memory hotplug in weighted interleave

From: Honggyu Kim
Date: Wed Apr 16 2025 - 03:38:12 EST




On 4/16/2025 1:04 PM, Honggyu Kim wrote:
Hi Jonathan,

Thanks for reviewing our patches.

I have a few comments and the rest will be addressed by Rakie.

On 4/16/2025 1:00 AM, Jonathan Cameron wrote:
On Tue, 8 Apr 2025 16:32:42 +0900
Rakie Kim <rakie.kim@xxxxxx> wrote:
[...snip...]
@@ -3495,35 +3508,77 @@ static const struct kobj_type wi_ktype = {
  static int sysfs_wi_node_add(int nid)
  {
-    struct iw_node_attr *node_attr;
+    int ret = 0;

Trivial but isn't ret always set when it is used? So no need to initialize
here.

If we don't initialize it, then this kind of trivial fixup might be needed later
so I think there is no reason not to initialize it.
https://lore.kernel.org/mm-commits/20240705010631.46743C4AF07@xxxxxxxxxxxxxxx

Ah. This is a different case. Please ignore this.



      char *name;
+    struct iw_node_attr *new_attr = NULL;

This is also always set before use so I'm not seeing a
reason to initialize it to NULL.

Ditto.

Please ignore this too.

Thanks,
Honggyu