From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: devel@driverdev.osuosl.org, greybus-dev@lists.linaro.org,
elder@kernel.org, johan@kernel.org
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 4/9] staging: greybus: manifest: Fix up some alignment checkpatch issues
Date: Sun, 25 Aug 2019 07:54:24 +0200 [thread overview]
Message-ID: <20190825055429.18547-5-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20190825055429.18547-1-gregkh@linuxfoundation.org>
Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.
Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: devel@driverdev.osuosl.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/greybus/manifest.c | 39 +++++++++++++++---------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c
index 08db49264f2b..4ebbba52b07c 100644
--- a/drivers/staging/greybus/manifest.c
+++ b/drivers/staging/greybus/manifest.c
@@ -104,15 +104,15 @@ static int identify_descriptor(struct gb_interface *intf,
size_t expected_size;
if (size < sizeof(*desc_header)) {
- dev_err(&intf->dev, "manifest too small (%zu < %zu)\n",
- size, sizeof(*desc_header));
+ dev_err(&intf->dev, "manifest too small (%zu < %zu)\n", size,
+ sizeof(*desc_header));
return -EINVAL; /* Must at least have header */
}
desc_size = le16_to_cpu(desc_header->size);
if (desc_size > size) {
dev_err(&intf->dev, "descriptor too big (%zu > %zu)\n",
- desc_size, size);
+ desc_size, size);
return -EINVAL;
}
@@ -139,22 +139,22 @@ static int identify_descriptor(struct gb_interface *intf,
case GREYBUS_TYPE_INVALID:
default:
dev_err(&intf->dev, "invalid descriptor type (%u)\n",
- desc_header->type);
+ desc_header->type);
return -EINVAL;
}
if (desc_size < expected_size) {
dev_err(&intf->dev, "%s descriptor too small (%zu < %zu)\n",
- get_descriptor_type_string(desc_header->type),
- desc_size, expected_size);
+ get_descriptor_type_string(desc_header->type),
+ desc_size, expected_size);
return -EINVAL;
}
/* Descriptor bigger than what we expect */
if (desc_size > expected_size) {
dev_warn(&intf->dev, "%s descriptor size mismatch (want %zu got %zu)\n",
- get_descriptor_type_string(desc_header->type),
- expected_size, desc_size);
+ get_descriptor_type_string(desc_header->type),
+ expected_size, desc_size);
}
descriptor = kzalloc(sizeof(*descriptor), GFP_KERNEL);
@@ -208,7 +208,7 @@ static char *gb_string_get(struct gb_interface *intf, u8 string_id)
/* Allocate an extra byte so we can guarantee it's NUL-terminated */
string = kmemdup(&desc_string->string, desc_string->length + 1,
- GFP_KERNEL);
+ GFP_KERNEL);
if (!string)
return ERR_PTR(-ENOMEM);
string[desc_string->length] = '\0';
@@ -264,8 +264,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
desc_cport = tmp->data;
if (cport_id == le16_to_cpu(desc_cport->id)) {
dev_err(&bundle->dev,
- "duplicate CPort %u found\n",
- cport_id);
+ "duplicate CPort %u found\n", cport_id);
goto exit;
}
}
@@ -277,7 +276,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
return 0;
bundle->cport_desc = kcalloc(count, sizeof(*bundle->cport_desc),
- GFP_KERNEL);
+ GFP_KERNEL);
if (!bundle->cport_desc)
goto exit;
@@ -287,7 +286,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
list_for_each_entry_safe(desc, next, &list, links) {
desc_cport = desc->data;
memcpy(&bundle->cport_desc[i++], desc_cport,
- sizeof(*desc_cport));
+ sizeof(*desc_cport));
/* Release the cport descriptor */
release_manifest_descriptor(desc);
@@ -333,9 +332,9 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf)
/* Ignore any legacy control bundles */
if (bundle_id == GB_CONTROL_BUNDLE_ID) {
dev_dbg(&intf->dev, "%s - ignoring control bundle\n",
- __func__);
+ __func__);
release_cport_descriptors(&intf->manifest_descs,
- bundle_id);
+ bundle_id);
continue;
}
@@ -468,7 +467,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
/* we have to have at _least_ the manifest header */
if (size < sizeof(*header)) {
dev_err(&intf->dev, "short manifest (%zu < %zu)\n",
- size, sizeof(*header));
+ size, sizeof(*header));
return false;
}
@@ -478,15 +477,15 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
manifest_size = le16_to_cpu(header->size);
if (manifest_size != size) {
dev_err(&intf->dev, "manifest size mismatch (%zu != %u)\n",
- size, manifest_size);
+ size, manifest_size);
return false;
}
/* Validate major/minor number */
if (header->version_major > GREYBUS_VERSION_MAJOR) {
dev_err(&intf->dev, "manifest version too new (%u.%u > %u.%u)\n",
- header->version_major, header->version_minor,
- GREYBUS_VERSION_MAJOR, GREYBUS_VERSION_MINOR);
+ header->version_major, header->version_minor,
+ GREYBUS_VERSION_MAJOR, GREYBUS_VERSION_MINOR);
return false;
}
@@ -513,7 +512,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
}
if (found != 1) {
dev_err(&intf->dev, "manifest must have 1 interface descriptor (%u found)\n",
- found);
+ found);
result = false;
goto out;
}
--
2.23.0
next prev parent reply other threads:[~2019-08-25 5:55 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-25 5:54 [PATCH 0/9] staging: move greybus core out of staging Greg Kroah-Hartman
2019-08-25 5:54 ` [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files Greg Kroah-Hartman
2019-08-26 5:51 ` Viresh Kumar
2019-08-27 7:58 ` Greg Kroah-Hartman
2019-08-27 9:20 ` Gao Xiang
2019-08-27 15:43 ` Greg Kroah-Hartman
2019-08-27 16:01 ` Gao Xiang
2019-08-25 5:54 ` [PATCH 2/9] staging: greybus: remove license "boilerplate" Greg Kroah-Hartman
2019-08-26 5:52 ` Viresh Kumar
2019-08-27 15:37 ` Mark Greer
2019-08-25 5:54 ` [PATCH 3/9] staging: greybus: hd: Fix up some alignment checkpatch issues Greg Kroah-Hartman
2019-08-26 5:57 ` [greybus-dev] " Viresh Kumar
2019-08-25 5:54 ` Greg Kroah-Hartman [this message]
2019-08-26 6:11 ` [greybus-dev] [PATCH 4/9] staging: greybus: manifest: " Viresh Kumar
2019-08-25 5:54 ` [PATCH 5/9] staging: greybus: log: " Greg Kroah-Hartman
2019-08-26 6:12 ` [greybus-dev] " Viresh Kumar
2019-08-25 5:54 ` [PATCH 6/9] staging: greybus: loopback: " Greg Kroah-Hartman
2019-08-26 6:12 ` [greybus-dev] " Viresh Kumar
2019-08-25 5:54 ` [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/ Greg Kroah-Hartman
2019-08-26 5:55 ` Viresh Kumar
2019-08-27 15:38 ` Mark Greer
2019-08-25 5:54 ` [PATCH 8/9] staging: greybus: move the greybus core to drivers/greybus Greg Kroah-Hartman
2019-08-26 6:13 ` [greybus-dev] " Viresh Kumar
2019-08-25 5:54 ` [PATCH 9/9] staging: greybus: move es2 to drivers/greybus/ Greg Kroah-Hartman
2019-08-26 6:14 ` [greybus-dev] " Viresh Kumar
2019-08-27 10:43 ` [greybus-dev] [PATCH 0/9] staging: move greybus core out of staging Alex Elder
2019-08-27 13:36 ` Dan Carpenter
2019-08-27 13:45 ` Greg Kroah-Hartman
2019-08-27 14:30 ` Rui Miguel Silva
2019-08-27 15:43 ` Greg KH
2019-08-27 15:57 ` Rui Miguel Silva
2019-08-27 16:59 ` Greg KH
2019-08-27 14:37 ` Dan Carpenter
2019-09-01 17:23 ` Pavel Machek
2019-09-02 6:31 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190825055429.18547-5-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).