Skip to contentSkip to conversation

NULL required to terminate attr array

PATCH In review Steven Roberts 2 participants 4 messages May 9, 2017 – May 10, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NULL required to terminate attr array

This patch fixes a kernel panic when loading the hfi driver as a dynamic module.Addressing this patch will make performance tweaking the driver as a loadable mdule possible.

drivers/infiniband/hw/hfi1/sysfs.c +2 -1
index 50d140d..2f3bbca 100644
@@ -196,7 +196,8 @@ static ssize_t cc_attr_store(struct kobject *kobj, struct at
 };
 
 static struct attribute *port_cc_default_attributes[] = {
-       &cc_prescan_attr.attr
+       &cc_prescan_attr.attr,
+       NULL
 };
 
 static struct kobj_type port_cc_ktype = {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 10 lines · Steven Roberts

This patch fixes a kernel panic when loading the hfi driver as a dynamic module.Addressing this patch will make performance tweaking the driver as a loadable mdule possible.

drivers/infiniband/hw/hfi1/sysfs.c +0 -0
index 50d140d..2f3bbca 100644

drivers/infiniband/hw/hfi1/sysfs.c static ssize_t cc_attr_store(struct kobject *kobj, struct at · line 203

Quoted 9 lines
drivers/infiniband/hw/hfi1/sysfs.c +2 -1
@@ -196,7 +196,8 @@ static ssize_t cc_attr_store(struct kobject *kobj, struct at
 };
 
 static struct attribute *port_cc_default_attributes[] = {
-       &cc_prescan_attr.attr
+       &cc_prescan_attr.attr,
+       NULL
 };
 
 static struct kobj_type port_cc_ktype = {

How did you prepare the patch? Please use git format-patch, add "IB/hfi1: " right after "[PATCH]" to limit the scope, add diffstat to the patch and, run checkpathch.pl on it.

Thanks

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Re: [PATCH] IB/hfi1: NULL required to terminate attr array

In reply to a message not in the archive

This patch fixes a kernel panic when loading the hfi driver as a dynamic module.Addressing this patch will make performance tweaking the driver as a loadable module possible.

git diff | scripts/checkpatch.pl
total: 0 errors, 0 warnings, 9 lines checked

Your patch has no obvious style problems and is ready for submission.

 drivers/infiniband/hw/hfi1/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/sysfs.c +2 -1
index 50d140d..2f3bbca 100644
@@ -196,7 +196,8 @@ static ssize_t cc_attr_store(struct kobject *kobj, struct at
 };
 
 static struct attribute *port_cc_default_attributes[] = {
-       &cc_prescan_attr.attr
+       &cc_prescan_attr.attr,
+       NULL
 };
 
 static struct kobj_type port_cc_ktype = {

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

Re: [PATCH] IB/hfi1: NULL required to terminate attr array

In reply to a message not in the archive
Quoted 6 lines · Steven Roberts

This patch fixes a kernel panic when loading the hfi driver as a dynamic module.Addressing this patch will make performance tweaking the driver as a loadable module possible.

git diff | scripts/checkpatch.pl
total: 0 errors, 0 warnings, 9 lines checked

Quoted 6 lines

Your patch has no obvious style problems and is ready for submission.

 drivers/infiniband/hw/hfi1/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Did you use git format-patch to create this patch? There is no --- after your Singed-off-by and it says me that the answer will be no.

Please use git send-email to send patches and not as a reply, and please limit your commit message to 80 symbols per-line.

You also should check the patch with checkpatch.pl and not the output of git diff.

I recommend you to read SubmittingPatches doc.

Thanks

Quoted 16 lines
drivers/infiniband/hw/hfi1/sysfs.c +2 -1
index 50d140d..2f3bbca 100644
@@ -196,7 +196,8 @@ static ssize_t cc_attr_store(struct kobject *kobj, struct at
 };
 
 static struct attribute *port_cc_default_attributes[] = {
-       &cc_prescan_attr.attr
+       &cc_prescan_attr.attr,
+       NULL
 };
 
 static struct kobj_type port_cc_ktype = {