Thread (21 messages) flat view 21 messages, 3 authors, 2021-05-17

Re: [PATCH v2 04/14] PCI/MSI: Use sysfs_emit() and sysfs_emit_at() in "show" functions

From: Krzysztof Wilczyński <hidden>
Date: 2021-05-15 06:01:41
Also in: linux-pci

Hi Joe,

[...]
quoted
 	if (entry)
-		return sprintf(buf, "%s\n",
-				entry->msi_attrib.is_msix ? "msix" : "msi");
+		return sysfs_emit(buf, "%s\n",
+				  entry->msi_attrib.is_msix ? "msix" : "msi");
 

 	return -ENODEV;
 }
trivia: reversing the test would be more common style

	if (!entry)
		return -ENODEV;

	return sysfs_emit(...);
}
Excellent point.  I will send v3 later that includes this style change.

Thank you!

Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help