[PATCH 3/4] staging: greybus: bundle.c: Fix multiple checkpatch.pl errors

Kamal Heib kamalheib1 at gmail.com
Wed Dec 20 23:07:25 UTC 2017


CHECK: Comparison to NULL could be written "!bundle->state"
+	if (bundle->state == NULL)

CHECK: Alignment should match open parenthesis
+static struct gb_bundle *gb_bundle_find(struct gb_interface *intf,
+							u8 bundle_id)

Signed-off-by: Kamal Heib <kamalheib1 at gmail.com>
---
 drivers/staging/greybus/bundle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index 81c018da1248..3f702db9e098 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -32,7 +32,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
 {
 	struct gb_bundle *bundle = to_gb_bundle(dev);
 
-	if (bundle->state == NULL)
+	if (!bundle->state)
 		return sprintf(buf, "\n");
 
 	return sprintf(buf, "%s\n", bundle->state);
@@ -65,7 +65,7 @@ static struct attribute *bundle_attrs[] = {
 ATTRIBUTE_GROUPS(bundle);
 
 static struct gb_bundle *gb_bundle_find(struct gb_interface *intf,
-							u8 bundle_id)
+					u8 bundle_id)
 {
 	struct gb_bundle *bundle;
 
-- 
2.14.3



More information about the devel mailing list