2019-08-25 05:55:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 0/9] staging: move greybus core out of staging

The Greybus code has long been "stable" but was living in the
drivers/staging/ directory to see if there really was going to be
devices using this protocol over the long-term. With the success of
millions of phones with this hardware and code in it, and the recent
Google Summer of Code project, and a number of of new devices in the
works from various companies, it is time to finally move this code out
of staging into the "real" portion of the kernel so that people know
they can rely on it.

This series first does a little bit of checkpatch cleanups for some
basic remaining issues in the greybus files, and then moves the include
directory, the greybus core code, and the es2 greybus host controller
driver into drivers/greybus.

To come after this is the movement of the Documentation entries and a
number of the module drivers that are stable.

Greg Kroah-Hartman (9):
staging: greybus: fix up SPDX comment in .h files
staging: greybus: remove license "boilerplate"
staging: greybus: hd: Fix up some alignment checkpatch issues
staging: greybus: manifest: Fix up some alignment checkpatch issues
staging: greybus: log: Fix up some alignment checkpatch issues
staging: greybus: loopback: Fix up some alignment checkpatch issues
staging: greybus: move core include files to include/linux/greybus/
staging: greybus: move the greybus core to drivers/greybus
staging: greybus: move es2 to drivers/greybus/

MAINTAINERS | 3 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/greybus/Kconfig | 32 +++++
drivers/greybus/Makefile | 26 +++++
drivers/greybus/arpc.h | 63 ++++++++++
drivers/{staging => }/greybus/bundle.c | 2 +-
drivers/{staging => }/greybus/connection.c | 2 +-
drivers/{staging => }/greybus/control.c | 2 +-
drivers/{staging => }/greybus/core.c | 2 +-
drivers/{staging => }/greybus/debugfs.c | 3 +-
drivers/{staging => }/greybus/es2.c | 3 +-
drivers/{staging => }/greybus/greybus_trace.h | 2 +-
drivers/{staging => }/greybus/hd.c | 12 +-
drivers/{staging => }/greybus/interface.c | 2 +-
drivers/{staging => }/greybus/manifest.c | 41 ++++---
drivers/{staging => }/greybus/module.c | 2 +-
drivers/{staging => }/greybus/operation.c | 2 +-
drivers/{staging => }/greybus/svc.c | 3 +-
drivers/{staging => }/greybus/svc_watchdog.c | 2 +-
.../Documentation/firmware/authenticate.c | 46 --------
.../greybus/Documentation/firmware/firmware.c | 46 --------
drivers/staging/greybus/Kconfig | 27 -----
drivers/staging/greybus/Makefile | 22 ----
drivers/staging/greybus/arche-platform.c | 2 +-
drivers/staging/greybus/arpc.h | 109 ------------------
drivers/staging/greybus/audio_apbridgea.c | 3 +-
drivers/staging/greybus/audio_apbridgea.h | 26 +----
drivers/staging/greybus/audio_codec.h | 4 +-
drivers/staging/greybus/audio_gb.c | 4 +-
drivers/staging/greybus/authentication.c | 3 +-
drivers/staging/greybus/bootrom.c | 2 +-
drivers/staging/greybus/camera.c | 2 +-
drivers/staging/greybus/firmware.h | 4 +-
drivers/staging/greybus/fw-core.c | 2 +-
drivers/staging/greybus/fw-download.c | 2 +-
drivers/staging/greybus/fw-management.c | 2 +-
drivers/staging/greybus/gb-camera.h | 2 +-
drivers/staging/greybus/gbphy.c | 2 +-
drivers/staging/greybus/gbphy.h | 2 +-
drivers/staging/greybus/gpio.c | 2 +-
.../staging/greybus/greybus_authentication.h | 48 +-------
drivers/staging/greybus/greybus_firmware.h | 48 +-------
drivers/staging/greybus/hid.c | 3 +-
drivers/staging/greybus/i2c.c | 2 +-
drivers/staging/greybus/light.c | 4 +-
drivers/staging/greybus/log.c | 9 +-
drivers/staging/greybus/loopback.c | 9 +-
drivers/staging/greybus/power_supply.c | 3 +-
drivers/staging/greybus/pwm.c | 2 +-
drivers/staging/greybus/raw.c | 3 +-
drivers/staging/greybus/sdio.c | 2 +-
drivers/staging/greybus/spi.c | 2 +-
drivers/staging/greybus/spilib.c | 2 +-
drivers/staging/greybus/spilib.h | 2 +-
drivers/staging/greybus/tools/loopback_test.c | 2 -
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/greybus/usb.c | 2 +-
drivers/staging/greybus/vibrator.c | 3 +-
.../greybus => include/linux}/greybus.h | 26 ++---
.../linux}/greybus/bundle.h | 0
.../linux}/greybus/connection.h | 0
.../linux}/greybus/control.h | 0
.../linux}/greybus/greybus_id.h | 0
.../linux}/greybus/greybus_manifest.h | 2 +-
.../linux}/greybus/greybus_protocols.h | 48 +-------
.../staging => include/linux}/greybus/hd.h | 2 +-
.../linux}/greybus/interface.h | 2 +-
.../linux}/greybus/manifest.h | 2 +-
.../linux}/greybus/module.h | 2 +-
.../linux}/greybus/operation.h | 2 +-
.../staging => include/linux}/greybus/svc.h | 2 +-
72 files changed, 225 insertions(+), 532 deletions(-)
create mode 100644 drivers/greybus/Kconfig
create mode 100644 drivers/greybus/Makefile
create mode 100644 drivers/greybus/arpc.h
rename drivers/{staging => }/greybus/bundle.c (99%)
rename drivers/{staging => }/greybus/connection.c (99%)
rename drivers/{staging => }/greybus/control.c (99%)
rename drivers/{staging => }/greybus/core.c (99%)
rename drivers/{staging => }/greybus/debugfs.c (94%)
rename drivers/{staging => }/greybus/es2.c (99%)
rename drivers/{staging => }/greybus/greybus_trace.h (99%)
rename drivers/{staging => }/greybus/hd.c (96%)
rename drivers/{staging => }/greybus/interface.c (99%)
rename drivers/{staging => }/greybus/manifest.c (95%)
rename drivers/{staging => }/greybus/module.c (99%)
rename drivers/{staging => }/greybus/operation.c (99%)
rename drivers/{staging => }/greybus/svc.c (99%)
rename drivers/{staging => }/greybus/svc_watchdog.c (99%)
delete mode 100644 drivers/staging/greybus/arpc.h
rename {drivers/staging/greybus => include/linux}/greybus.h (88%)
rename {drivers/staging => include/linux}/greybus/bundle.h (100%)
rename {drivers/staging => include/linux}/greybus/connection.h (100%)
rename {drivers/staging => include/linux}/greybus/control.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (99%)
rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (96%)
rename {drivers/staging => include/linux}/greybus/hd.h (98%)
rename {drivers/staging => include/linux}/greybus/interface.h (98%)
rename {drivers/staging => include/linux}/greybus/manifest.h (87%)
rename {drivers/staging => include/linux}/greybus/module.h (94%)
rename {drivers/staging => include/linux}/greybus/operation.h (99%)
rename {drivers/staging => include/linux}/greybus/svc.h (98%)

--
2.23.0


2019-08-25 05:56:03

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

When these files originally got an SPDX tag, I used // instead of /* */
for the .h files. Fix this up to use // properly.

Cc: Viresh Kumar <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/greybus/firmware.h | 2 +-
drivers/staging/greybus/gb-camera.h | 2 +-
drivers/staging/greybus/gbphy.h | 2 +-
drivers/staging/greybus/greybus.h | 2 +-
drivers/staging/greybus/greybus_authentication.h | 2 +-
drivers/staging/greybus/greybus_firmware.h | 2 +-
drivers/staging/greybus/greybus_manifest.h | 2 +-
drivers/staging/greybus/greybus_protocols.h | 2 +-
drivers/staging/greybus/greybus_trace.h | 2 +-
drivers/staging/greybus/hd.h | 2 +-
drivers/staging/greybus/interface.h | 2 +-
drivers/staging/greybus/manifest.h | 2 +-
drivers/staging/greybus/module.h | 2 +-
drivers/staging/greybus/operation.h | 2 +-
drivers/staging/greybus/spilib.h | 2 +-
drivers/staging/greybus/svc.h | 2 +-
16 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/greybus/firmware.h b/drivers/staging/greybus/firmware.h
index 946221307ef6..72dfabfa4704 100644
--- a/drivers/staging/greybus/firmware.h
+++ b/drivers/staging/greybus/firmware.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Firmware Management Header
*
diff --git a/drivers/staging/greybus/gb-camera.h b/drivers/staging/greybus/gb-camera.h
index ee293e461fc3..5fc469101fc1 100644
--- a/drivers/staging/greybus/gb-camera.h
+++ b/drivers/staging/greybus/gb-camera.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Camera protocol driver.
*
diff --git a/drivers/staging/greybus/gbphy.h b/drivers/staging/greybus/gbphy.h
index 99463489d7d6..087928a586fb 100644
--- a/drivers/staging/greybus/gbphy.h
+++ b/drivers/staging/greybus/gbphy.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Bridged-Phy Bus driver
*
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index d03ddb7c9df0..f0488ffff93e 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus driver and device API
*
diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
index 03ea9615b217..d654760cf175 100644
--- a/drivers/staging/greybus/greybus_authentication.h
+++ b/drivers/staging/greybus/greybus_authentication.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
* Greybus Component Authentication User Header
*
diff --git a/drivers/staging/greybus/greybus_firmware.h b/drivers/staging/greybus/greybus_firmware.h
index b58281a63ba4..13ef3aa5279e 100644
--- a/drivers/staging/greybus/greybus_firmware.h
+++ b/drivers/staging/greybus/greybus_firmware.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
* Greybus Firmware Management User Header
*
diff --git a/drivers/staging/greybus/greybus_manifest.h b/drivers/staging/greybus/greybus_manifest.h
index 2cec5cf7a846..db68f7e7d5a7 100644
--- a/drivers/staging/greybus/greybus_manifest.h
+++ b/drivers/staging/greybus/greybus_manifest.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus manifest definition
*
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index ddc73f10eb22..7d649a7fc4c9 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
+/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/staging/greybus/greybus_trace.h
index 7b5e2c6b1f6b..1bc9f1275c65 100644
--- a/drivers/staging/greybus/greybus_trace.h
+++ b/drivers/staging/greybus/greybus_trace.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus driver and device API
*
diff --git a/drivers/staging/greybus/hd.h b/drivers/staging/greybus/hd.h
index 6cf024a20a58..348b76fabc9a 100644
--- a/drivers/staging/greybus/hd.h
+++ b/drivers/staging/greybus/hd.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Host Device
*
diff --git a/drivers/staging/greybus/interface.h b/drivers/staging/greybus/interface.h
index 1c00c5bb3ec9..8fb1eacda302 100644
--- a/drivers/staging/greybus/interface.h
+++ b/drivers/staging/greybus/interface.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Interface Block code
*
diff --git a/drivers/staging/greybus/manifest.h b/drivers/staging/greybus/manifest.h
index f3c95a255631..88aa7e44cad5 100644
--- a/drivers/staging/greybus/manifest.h
+++ b/drivers/staging/greybus/manifest.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus manifest parsing
*
diff --git a/drivers/staging/greybus/module.h b/drivers/staging/greybus/module.h
index b1ebcc6636db..2a27e520ee94 100644
--- a/drivers/staging/greybus/module.h
+++ b/drivers/staging/greybus/module.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus Module code
*
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index 40b7b02fff88..17ba3daf111b 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus operations
*
diff --git a/drivers/staging/greybus/spilib.h b/drivers/staging/greybus/spilib.h
index 043d4d32c3ee..9d416839e3be 100644
--- a/drivers/staging/greybus/spilib.h
+++ b/drivers/staging/greybus/spilib.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus SPI library header
*
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h
index ad01783bac9c..e7452057cfe4 100644
--- a/drivers/staging/greybus/svc.h
+++ b/drivers/staging/greybus/svc.h
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* Greybus SVC code
*
--
2.23.0

2019-08-25 05:56:05

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 3/9] staging: greybus: hd: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/greybus/hd.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c
index 969f86697673..e2b9ab5f6ec2 100644
--- a/drivers/staging/greybus/hd.c
+++ b/drivers/staging/greybus/hd.c
@@ -31,7 +31,7 @@ int gb_hd_output(struct gb_host_device *hd, void *req, u16 size, u8 cmd,
EXPORT_SYMBOL_GPL(gb_hd_output);

static ssize_t bus_id_show(struct device *dev,
- struct device_attribute *attr, char *buf)
+ struct device_attribute *attr, char *buf)
{
struct gb_host_device *hd = to_gb_host_device(dev);

@@ -70,7 +70,7 @@ EXPORT_SYMBOL_GPL(gb_hd_cport_release_reserved);

/* Locking: Caller guarantees serialisation */
int gb_hd_cport_allocate(struct gb_host_device *hd, int cport_id,
- unsigned long flags)
+ unsigned long flags)
{
struct ida *id_map = &hd->cport_id_map;
int ida_start, ida_end;
@@ -122,9 +122,9 @@ struct device_type greybus_hd_type = {
};

struct gb_host_device *gb_hd_create(struct gb_hd_driver *driver,
- struct device *parent,
- size_t buffer_size_max,
- size_t num_cports)
+ struct device *parent,
+ size_t buffer_size_max,
+ size_t num_cports)
{
struct gb_host_device *hd;
int ret;
--
2.23.0

2019-08-25 05:56:18

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4/9] staging: greybus: manifest: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
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

2019-08-25 05:56:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5/9] staging: greybus: log: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: David Lin <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/greybus/log.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/greybus/log.c b/drivers/staging/greybus/log.c
index 15a88574dbb0..4f1f161ff11c 100644
--- a/drivers/staging/greybus/log.c
+++ b/drivers/staging/greybus/log.c
@@ -31,14 +31,14 @@ static int gb_log_request_handler(struct gb_operation *op)
/* Verify size of payload */
if (op->request->payload_size < sizeof(*receive)) {
dev_err(dev, "log request too small (%zu < %zu)\n",
- op->request->payload_size, sizeof(*receive));
+ op->request->payload_size, sizeof(*receive));
return -EINVAL;
}
receive = op->request->payload;
len = le16_to_cpu(receive->len);
if (len != (op->request->payload_size - sizeof(*receive))) {
dev_err(dev, "log request wrong size %d vs %zu\n", len,
- (op->request->payload_size - sizeof(*receive)));
+ (op->request->payload_size - sizeof(*receive)));
return -EINVAL;
}
if (len == 0) {
@@ -83,7 +83,7 @@ static int gb_log_probe(struct gb_bundle *bundle,
return -ENOMEM;

connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id),
- gb_log_request_handler);
+ gb_log_request_handler);
if (IS_ERR(connection)) {
retval = PTR_ERR(connection);
goto error_free;
--
2.23.0

2019-08-25 05:56:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 6/9] staging: greybus: loopback: Fix up some alignment checkpatch issues

Some function prototypes do not match the expected alignment formatting
so fix that up so that checkpatch is happy.

Cc: "Bryan O'Donoghue" <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/greybus/loopback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 48d85ebe404a..b0ab0eed5c18 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -882,7 +882,7 @@ static int gb_loopback_fn(void *data)
gb->type = 0;
gb->send_count = 0;
sysfs_notify(&gb->dev->kobj, NULL,
- "iteration_count");
+ "iteration_count");
dev_dbg(&bundle->dev, "load test complete\n");
} else {
dev_dbg(&bundle->dev,
@@ -1054,7 +1054,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,

/* Allocate kfifo */
if (kfifo_alloc(&gb->kfifo_lat, kfifo_depth * sizeof(u32),
- GFP_KERNEL)) {
+ GFP_KERNEL)) {
retval = -ENOMEM;
goto out_conn;
}
--
2.23.0

2019-08-25 05:57:11

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 8/9] staging: greybus: move the greybus core to drivers/greybus

The Greybus core code has been stable for a long time, and has been
shipping for many years in millions of phones. With the advent of a
recent Google Summer of Code project, and a number of new devices in the
works from various companies, it is time to get the core greybus code
out of staging as it really is going to be with us for a while.

Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
MAINTAINERS | 3 +++
drivers/Kconfig | 2 ++
drivers/Makefile | 1 +
drivers/greybus/Kconfig | 16 ++++++++++++++++
drivers/greybus/Makefile | 19 +++++++++++++++++++
drivers/{staging => }/greybus/bundle.c | 0
drivers/{staging => }/greybus/connection.c | 0
drivers/{staging => }/greybus/control.c | 0
drivers/{staging => }/greybus/core.c | 0
drivers/{staging => }/greybus/debugfs.c | 0
drivers/{staging => }/greybus/greybus_trace.h | 0
drivers/{staging => }/greybus/hd.c | 0
drivers/{staging => }/greybus/interface.c | 0
drivers/{staging => }/greybus/manifest.c | 0
drivers/{staging => }/greybus/module.c | 0
drivers/{staging => }/greybus/operation.c | 0
drivers/{staging => }/greybus/svc.c | 0
drivers/{staging => }/greybus/svc_watchdog.c | 0
drivers/staging/greybus/Kconfig | 16 ----------------
drivers/staging/greybus/Makefile | 17 -----------------
drivers/staging/greybus/es2.c | 2 +-
21 files changed, 42 insertions(+), 34 deletions(-)
create mode 100644 drivers/greybus/Kconfig
create mode 100644 drivers/greybus/Makefile
rename drivers/{staging => }/greybus/bundle.c (100%)
rename drivers/{staging => }/greybus/connection.c (100%)
rename drivers/{staging => }/greybus/control.c (100%)
rename drivers/{staging => }/greybus/core.c (100%)
rename drivers/{staging => }/greybus/debugfs.c (100%)
rename drivers/{staging => }/greybus/greybus_trace.h (100%)
rename drivers/{staging => }/greybus/hd.c (100%)
rename drivers/{staging => }/greybus/interface.c (100%)
rename drivers/{staging => }/greybus/manifest.c (100%)
rename drivers/{staging => }/greybus/module.c (100%)
rename drivers/{staging => }/greybus/operation.c (100%)
rename drivers/{staging => }/greybus/svc.c (100%)
rename drivers/{staging => }/greybus/svc_watchdog.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0f38cba2c581..e3242687cd19 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7003,6 +7003,9 @@ M: Alex Elder <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
S: Maintained
F: drivers/staging/greybus/
+F: drivers/greybus/
+F: include/linux/greybus.h
+F: include/linux/greybus/
L: [email protected] (moderated for non-subscribers)

GREYBUS UART PROTOCOLS DRIVERS
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 61cf4ea2c229..7dce76ae7369 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -146,6 +146,8 @@ source "drivers/hv/Kconfig"

source "drivers/xen/Kconfig"

+source "drivers/greybus/Kconfig"
+
source "drivers/staging/Kconfig"

source "drivers/platform/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index 6d37564e783c..73df8e5a2fce 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -148,6 +148,7 @@ obj-$(CONFIG_BCMA) += bcma/
obj-$(CONFIG_VHOST_RING) += vhost/
obj-$(CONFIG_VHOST) += vhost/
obj-$(CONFIG_VLYNQ) += vlynq/
+obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_STAGING) += staging/
obj-y += platform/

diff --git a/drivers/greybus/Kconfig b/drivers/greybus/Kconfig
new file mode 100644
index 000000000000..158d8893114c
--- /dev/null
+++ b/drivers/greybus/Kconfig
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0
+menuconfig GREYBUS
+ tristate "Greybus support"
+ depends on SYSFS
+ ---help---
+ This option enables the Greybus driver core. Greybus is an
+ hardware protocol that was designed to provide Unipro with a
+ sane application layer. It was originally designed for the
+ ARA project, a module phone system, but has shown up in other
+ phones, and can be tunneled over other busses in order to
+ control hardware devices.
+
+ Say Y here to enable support for these types of drivers.
+
+ To compile this code as a module, chose M here: the module
+ will be called greybus.ko
diff --git a/drivers/greybus/Makefile b/drivers/greybus/Makefile
new file mode 100644
index 000000000000..03b22616ec7d
--- /dev/null
+++ b/drivers/greybus/Makefile
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0
+# Greybus core
+greybus-y := core.o \
+ debugfs.o \
+ hd.o \
+ manifest.o \
+ module.o \
+ interface.o \
+ bundle.o \
+ connection.o \
+ control.o \
+ svc.o \
+ svc_watchdog.o \
+ operation.o
+
+obj-$(CONFIG_GREYBUS) += greybus.o
+
+# needed for trace events
+ccflags-y += -I$(src)
diff --git a/drivers/staging/greybus/bundle.c b/drivers/greybus/bundle.c
similarity index 100%
rename from drivers/staging/greybus/bundle.c
rename to drivers/greybus/bundle.c
diff --git a/drivers/staging/greybus/connection.c b/drivers/greybus/connection.c
similarity index 100%
rename from drivers/staging/greybus/connection.c
rename to drivers/greybus/connection.c
diff --git a/drivers/staging/greybus/control.c b/drivers/greybus/control.c
similarity index 100%
rename from drivers/staging/greybus/control.c
rename to drivers/greybus/control.c
diff --git a/drivers/staging/greybus/core.c b/drivers/greybus/core.c
similarity index 100%
rename from drivers/staging/greybus/core.c
rename to drivers/greybus/core.c
diff --git a/drivers/staging/greybus/debugfs.c b/drivers/greybus/debugfs.c
similarity index 100%
rename from drivers/staging/greybus/debugfs.c
rename to drivers/greybus/debugfs.c
diff --git a/drivers/staging/greybus/greybus_trace.h b/drivers/greybus/greybus_trace.h
similarity index 100%
rename from drivers/staging/greybus/greybus_trace.h
rename to drivers/greybus/greybus_trace.h
diff --git a/drivers/staging/greybus/hd.c b/drivers/greybus/hd.c
similarity index 100%
rename from drivers/staging/greybus/hd.c
rename to drivers/greybus/hd.c
diff --git a/drivers/staging/greybus/interface.c b/drivers/greybus/interface.c
similarity index 100%
rename from drivers/staging/greybus/interface.c
rename to drivers/greybus/interface.c
diff --git a/drivers/staging/greybus/manifest.c b/drivers/greybus/manifest.c
similarity index 100%
rename from drivers/staging/greybus/manifest.c
rename to drivers/greybus/manifest.c
diff --git a/drivers/staging/greybus/module.c b/drivers/greybus/module.c
similarity index 100%
rename from drivers/staging/greybus/module.c
rename to drivers/greybus/module.c
diff --git a/drivers/staging/greybus/operation.c b/drivers/greybus/operation.c
similarity index 100%
rename from drivers/staging/greybus/operation.c
rename to drivers/greybus/operation.c
diff --git a/drivers/staging/greybus/svc.c b/drivers/greybus/svc.c
similarity index 100%
rename from drivers/staging/greybus/svc.c
rename to drivers/greybus/svc.c
diff --git a/drivers/staging/greybus/svc_watchdog.c b/drivers/greybus/svc_watchdog.c
similarity index 100%
rename from drivers/staging/greybus/svc_watchdog.c
rename to drivers/greybus/svc_watchdog.c
diff --git a/drivers/staging/greybus/Kconfig b/drivers/staging/greybus/Kconfig
index 4894c3514955..d03c37e1e6e8 100644
--- a/drivers/staging/greybus/Kconfig
+++ b/drivers/staging/greybus/Kconfig
@@ -1,20 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-menuconfig GREYBUS
- tristate "Greybus support"
- depends on SYSFS
- ---help---
- This option enables the Greybus driver core. Greybus is an
- hardware protocol that was designed to provide Unipro with a
- sane application layer. It was originally designed for the
- ARA project, a module phone system, but has shown up in other
- phones, and can be tunneled over other busses in order to
- control hardware devices.
-
- Say Y here to enable support for these types of drivers.
-
- To compile this code as a module, chose M here: the module
- will be called greybus.ko
-
if GREYBUS

config GREYBUS_ES2
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 2551ed16b742..d16853399c9a 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -1,24 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
-# Greybus core
-greybus-y := core.o \
- debugfs.o \
- hd.o \
- manifest.o \
- module.o \
- interface.o \
- bundle.o \
- connection.o \
- control.o \
- svc.o \
- svc_watchdog.o \
- operation.o
-
-obj-$(CONFIG_GREYBUS) += greybus.o
-
# needed for trace events
ccflags-y += -I$(src)

-
# Greybus Host controller drivers
gb-es2-y := es2.o

diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index 366716f11b1a..5b755e76d8a4 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -15,7 +15,7 @@
#include <asm/unaligned.h>

#include "arpc.h"
-#include "greybus_trace.h"
+#include "../../greybus/greybus_trace.h"


/* Default timeout for USB vendor requests. */
--
2.23.0

2019-08-25 05:57:11

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/

With the goal of moving the core of the greybus code out of staging, the
include files need to be moved to include/linux/greybus.h and
include/linux/greybus/

Cc: Vaibhav Hiremath <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: Vaibhav Agarwal <[email protected]>
Cc: Mark Greer <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Rui Miguel Silva <[email protected]>
Cc: David Lin <[email protected]>
Cc: "Bryan O'Donoghue" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/greybus/arche-platform.c | 2 +-
drivers/staging/greybus/audio_apbridgea.c | 3 +--
drivers/staging/greybus/audio_codec.h | 4 +---
drivers/staging/greybus/audio_gb.c | 4 +---
drivers/staging/greybus/authentication.c | 3 +--
drivers/staging/greybus/bootrom.c | 2 +-
drivers/staging/greybus/bundle.c | 2 +-
drivers/staging/greybus/camera.c | 2 +-
drivers/staging/greybus/connection.c | 2 +-
drivers/staging/greybus/control.c | 2 +-
drivers/staging/greybus/core.c | 2 +-
drivers/staging/greybus/debugfs.c | 3 +--
drivers/staging/greybus/es2.c | 3 +--
drivers/staging/greybus/firmware.h | 2 +-
drivers/staging/greybus/fw-core.c | 2 +-
drivers/staging/greybus/fw-download.c | 2 +-
drivers/staging/greybus/fw-management.c | 2 +-
drivers/staging/greybus/gbphy.c | 2 +-
drivers/staging/greybus/gpio.c | 2 +-
drivers/staging/greybus/hd.c | 2 +-
drivers/staging/greybus/hid.c | 3 +--
drivers/staging/greybus/i2c.c | 2 +-
drivers/staging/greybus/interface.c | 2 +-
drivers/staging/greybus/light.c | 4 +---
drivers/staging/greybus/log.c | 3 +--
drivers/staging/greybus/loopback.c | 5 +---
drivers/staging/greybus/manifest.c | 2 +-
drivers/staging/greybus/module.c | 2 +-
drivers/staging/greybus/operation.c | 2 +-
drivers/staging/greybus/power_supply.c | 3 +--
drivers/staging/greybus/pwm.c | 2 +-
drivers/staging/greybus/raw.c | 3 +--
drivers/staging/greybus/sdio.c | 2 +-
drivers/staging/greybus/spi.c | 2 +-
drivers/staging/greybus/spilib.c | 2 +-
drivers/staging/greybus/svc.c | 3 +--
drivers/staging/greybus/svc_watchdog.c | 2 +-
drivers/staging/greybus/uart.c | 2 +-
drivers/staging/greybus/usb.c | 2 +-
drivers/staging/greybus/vibrator.c | 3 +--
.../greybus => include/linux}/greybus.h | 24 +++++++++----------
.../linux}/greybus/bundle.h | 0
.../linux}/greybus/connection.h | 0
.../linux}/greybus/control.h | 0
.../linux}/greybus/greybus_id.h | 0
.../linux}/greybus/greybus_manifest.h | 0
.../linux}/greybus/greybus_protocols.h | 0
.../staging => include/linux}/greybus/hd.h | 0
.../linux}/greybus/interface.h | 0
.../linux}/greybus/manifest.h | 0
.../linux}/greybus/module.h | 0
.../linux}/greybus/operation.h | 0
.../staging => include/linux}/greybus/svc.h | 0
53 files changed, 52 insertions(+), 71 deletions(-)
rename {drivers/staging/greybus => include/linux}/greybus.h (89%)
rename {drivers/staging => include/linux}/greybus/bundle.h (100%)
rename {drivers/staging => include/linux}/greybus/connection.h (100%)
rename {drivers/staging => include/linux}/greybus/control.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (100%)
rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (100%)
rename {drivers/staging => include/linux}/greybus/hd.h (100%)
rename {drivers/staging => include/linux}/greybus/interface.h (100%)
rename {drivers/staging => include/linux}/greybus/manifest.h (100%)
rename {drivers/staging => include/linux}/greybus/module.h (100%)
rename {drivers/staging => include/linux}/greybus/operation.h (100%)
rename {drivers/staging => include/linux}/greybus/svc.h (100%)

diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 6eb842040c22..eebf0deb39f5 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -19,8 +19,8 @@
#include <linux/irq.h>
#include <linux/suspend.h>
#include <linux/time.h>
+#include <linux/greybus.h>
#include "arche_platform.h"
-#include "greybus.h"

#if IS_ENABLED(CONFIG_USB_HSIC_USB3613)
#include <linux/usb/usb3613.h>
diff --git a/drivers/staging/greybus/audio_apbridgea.c b/drivers/staging/greybus/audio_apbridgea.c
index 7ebb1bde5cb7..26117e390deb 100644
--- a/drivers/staging/greybus/audio_apbridgea.c
+++ b/drivers/staging/greybus/audio_apbridgea.c
@@ -5,8 +5,7 @@
* Copyright 2015-2016 Google Inc.
*/

-#include "greybus.h"
-#include "greybus_protocols.h"
+#include <linux/greybus.h>
#include "audio_apbridgea.h"
#include "audio_codec.h"

diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index 9ba09ea9c2fc..cb5d271da1a5 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -8,12 +8,10 @@
#ifndef __LINUX_GBAUDIO_CODEC_H
#define __LINUX_GBAUDIO_CODEC_H

+#include <linux/greybus.h>
#include <sound/soc.h>
#include <sound/jack.h>

-#include "greybus.h"
-#include "greybus_protocols.h"
-
#define NAME_SIZE 32
#define MAX_DAIS 2 /* APB1, APB2 */

diff --git a/drivers/staging/greybus/audio_gb.c b/drivers/staging/greybus/audio_gb.c
index 8894f1c87d48..9d8994fdb41a 100644
--- a/drivers/staging/greybus/audio_gb.c
+++ b/drivers/staging/greybus/audio_gb.c
@@ -5,9 +5,7 @@
* Copyright 2015-2016 Google Inc.
*/

-#include "greybus.h"
-#include "greybus_protocols.h"
-#include "operation.h"
+#include <linux/greybus.h>
#include "audio_codec.h"

/* TODO: Split into separate calls */
diff --git a/drivers/staging/greybus/authentication.c b/drivers/staging/greybus/authentication.c
index a5d7c53df987..297e69f011c7 100644
--- a/drivers/staging/greybus/authentication.c
+++ b/drivers/staging/greybus/authentication.c
@@ -6,8 +6,7 @@
* Copyright 2016 Linaro Ltd.
*/

-#include "greybus.h"
-
+#include <linux/greybus.h>
#include <linux/cdev.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
diff --git a/drivers/staging/greybus/bootrom.c b/drivers/staging/greybus/bootrom.c
index 402e6360834f..a8efb86de140 100644
--- a/drivers/staging/greybus/bootrom.c
+++ b/drivers/staging/greybus/bootrom.c
@@ -10,8 +10,8 @@
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "firmware.h"

/* Timeout, in jiffies, within which the next request must be received */
diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c
index 3f702db9e098..84660729538b 100644
--- a/drivers/staging/greybus/bundle.c
+++ b/drivers/staging/greybus/bundle.c
@@ -6,7 +6,7 @@
* Copyright 2014-2015 Linaro Ltd.
*/

-#include "greybus.h"
+#include <linux/greybus.h>
#include "greybus_trace.h"

static ssize_t bundle_class_show(struct device *dev,
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c
index 615c8e7fd51e..b570e13394ac 100644
--- a/drivers/staging/greybus/camera.c
+++ b/drivers/staging/greybus/camera.c
@@ -14,9 +14,9 @@
#include <linux/string.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
+#include <linux/greybus.h>

#include "gb-camera.h"
-#include "greybus.h"
#include "greybus_protocols.h"

enum gb_camera_debugs_buffer_id {
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index eda964208cce..fc8f57f97ce6 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -7,8 +7,8 @@
*/

#include <linux/workqueue.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "greybus_trace.h"

#define GB_CONNECTION_CPORT_QUIESCE_TIMEOUT 1000
diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c
index a9e8b6036cac..359a25841973 100644
--- a/drivers/staging/greybus/control.c
+++ b/drivers/staging/greybus/control.c
@@ -9,7 +9,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include "greybus.h"
+#include <linux/greybus.h>

/* Highest control-protocol version supported */
#define GB_CONTROL_VERSION_MAJOR 0
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index d6b0d49130c0..e546c6431877 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -9,7 +9,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#define CREATE_TRACE_POINTS
-#include "greybus.h"
+#include <linux/greybus.h>
#include "greybus_trace.h"

#define GB_BUNDLE_AUTOSUSPEND_MS 3000
diff --git a/drivers/staging/greybus/debugfs.c b/drivers/staging/greybus/debugfs.c
index 56e20c30feb5..e102d7badb9d 100644
--- a/drivers/staging/greybus/debugfs.c
+++ b/drivers/staging/greybus/debugfs.c
@@ -7,8 +7,7 @@
*/

#include <linux/debugfs.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

static struct dentry *gb_debug_root;

diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c
index be6af18cec31..366716f11b1a 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/staging/greybus/es2.c
@@ -11,12 +11,11 @@
#include <linux/kfifo.h>
#include <linux/debugfs.h>
#include <linux/list.h>
+#include <linux/greybus.h>
#include <asm/unaligned.h>

#include "arpc.h"
-#include "greybus.h"
#include "greybus_trace.h"
-#include "connection.h"


/* Default timeout for USB vendor requests. */
diff --git a/drivers/staging/greybus/firmware.h b/drivers/staging/greybus/firmware.h
index 72dfabfa4704..5d2564462ffc 100644
--- a/drivers/staging/greybus/firmware.h
+++ b/drivers/staging/greybus/firmware.h
@@ -9,7 +9,7 @@
#ifndef __FIRMWARE_H
#define __FIRMWARE_H

-#include "greybus.h"
+#include <linux/greybus.h>

#define FW_NAME_PREFIX "gmp_"

diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c
index 388866d92f5b..57bebf24636b 100644
--- a/drivers/staging/greybus/fw-core.c
+++ b/drivers/staging/greybus/fw-core.c
@@ -8,8 +8,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/firmware.h>
+#include <linux/greybus.h>
#include "firmware.h"
-#include "greybus.h"
#include "spilib.h"

struct gb_fw_core {
diff --git a/drivers/staging/greybus/fw-download.c b/drivers/staging/greybus/fw-download.c
index d3b7cccbc10d..543692c567f9 100644
--- a/drivers/staging/greybus/fw-download.c
+++ b/drivers/staging/greybus/fw-download.c
@@ -10,8 +10,8 @@
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
+#include <linux/greybus.h>
#include "firmware.h"
-#include "greybus.h"

/* Estimated minimum buffer size, actual size can be smaller than this */
#define MIN_FETCH_SIZE 512
diff --git a/drivers/staging/greybus/fw-management.c b/drivers/staging/greybus/fw-management.c
index 71aec14f8181..687c6405c65b 100644
--- a/drivers/staging/greybus/fw-management.c
+++ b/drivers/staging/greybus/fw-management.c
@@ -13,10 +13,10 @@
#include <linux/idr.h>
#include <linux/ioctl.h>
#include <linux/uaccess.h>
+#include <linux/greybus.h>

#include "firmware.h"
#include "greybus_firmware.h"
-#include "greybus.h"

#define FW_MGMT_TIMEOUT_MS 1000

diff --git a/drivers/staging/greybus/gbphy.c b/drivers/staging/greybus/gbphy.c
index 6cb85c3d3572..9fc5c47be9bd 100644
--- a/drivers/staging/greybus/gbphy.c
+++ b/drivers/staging/greybus/gbphy.c
@@ -13,8 +13,8 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/device.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

#define GB_GBPHY_AUTOSUSPEND_MS 3000
diff --git a/drivers/staging/greybus/gpio.c b/drivers/staging/greybus/gpio.c
index 3151004d26fb..1ff34abd5692 100644
--- a/drivers/staging/greybus/gpio.c
+++ b/drivers/staging/greybus/gpio.c
@@ -13,8 +13,8 @@
#include <linux/irqdomain.h>
#include <linux/gpio/driver.h>
#include <linux/mutex.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

struct gb_gpio_line {
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c
index e2b9ab5f6ec2..72b21bf2d7d3 100644
--- a/drivers/staging/greybus/hd.c
+++ b/drivers/staging/greybus/hd.c
@@ -8,8 +8,8 @@

#include <linux/kernel.h>
#include <linux/slab.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "greybus_trace.h"

EXPORT_TRACEPOINT_SYMBOL_GPL(gb_hd_create);
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
index 8ab810bf5716..04bfd9110502 100644
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -12,8 +12,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

/* Greybus HID device's structure */
struct gb_hid {
diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index b2522043a1a4..ab06fc3b9e7e 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -10,8 +10,8 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

struct gb_i2c_device {
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index d7b5b89a2f40..67dbe6fda9a1 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -7,8 +7,8 @@
*/

#include <linux/delay.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "greybus_trace.h"

#define GB_INTERFACE_MODE_SWITCH_TIMEOUT 2000
diff --git a/drivers/staging/greybus/light.c b/drivers/staging/greybus/light.c
index 010ae1e9c7fb..b3b1b253d112 100644
--- a/drivers/staging/greybus/light.c
+++ b/drivers/staging/greybus/light.c
@@ -11,11 +11,9 @@
#include <linux/led-class-flash.h>
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/greybus.h>
#include <media/v4l2-flash-led-class.h>

-#include "greybus.h"
-#include "greybus_protocols.h"
-
#define NAMES_MAX 32

struct gb_channel {
diff --git a/drivers/staging/greybus/log.c b/drivers/staging/greybus/log.c
index 4f1f161ff11c..971f36dccac6 100644
--- a/drivers/staging/greybus/log.c
+++ b/drivers/staging/greybus/log.c
@@ -9,8 +9,7 @@
#include <linux/slab.h>
#include <linux/sizes.h>
#include <linux/uaccess.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

struct gb_log {
struct gb_connection *connection;
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index b0ab0eed5c18..583d9708a191 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -25,12 +25,9 @@
#include <linux/workqueue.h>
#include <linux/atomic.h>
#include <linux/pm_runtime.h>
-
+#include <linux/greybus.h>
#include <asm/div64.h>

-#include "greybus.h"
-#include "connection.h"
-
#define NSEC_PER_DAY 86400000000000ULL

struct gb_loopback_stats {
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c
index 4ebbba52b07c..dd7040697bde 100644
--- a/drivers/staging/greybus/manifest.c
+++ b/drivers/staging/greybus/manifest.c
@@ -6,7 +6,7 @@
* Copyright 2014-2015 Linaro Ltd.
*/

-#include "greybus.h"
+#include <linux/greybus.h>

static const char *get_descriptor_type_string(u8 type)
{
diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c
index b251a53d0e8e..36f77f9e1d74 100644
--- a/drivers/staging/greybus/module.c
+++ b/drivers/staging/greybus/module.c
@@ -6,7 +6,7 @@
* Copyright 2016 Linaro Ltd.
*/

-#include "greybus.h"
+#include <linux/greybus.h>
#include "greybus_trace.h"

static ssize_t eject_store(struct device *dev,
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index fe268f7b63ed..8459e9bc0749 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -12,8 +12,8 @@
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "greybus_trace.h"

static struct kmem_cache *gb_operation_cache;
diff --git a/drivers/staging/greybus/power_supply.c b/drivers/staging/greybus/power_supply.c
index 34b40a409ea3..ec96f28887f9 100644
--- a/drivers/staging/greybus/power_supply.c
+++ b/drivers/staging/greybus/power_supply.c
@@ -10,8 +10,7 @@
#include <linux/module.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

#define PROP_MAX 32

diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c
index 4a6d394b6c44..891a6a672378 100644
--- a/drivers/staging/greybus/pwm.c
+++ b/drivers/staging/greybus/pwm.c
@@ -10,8 +10,8 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/pwm.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

struct gb_pwm_chip {
diff --git a/drivers/staging/greybus/raw.c b/drivers/staging/greybus/raw.c
index 838acbe84ca0..64a17dfe3b6e 100644
--- a/drivers/staging/greybus/raw.c
+++ b/drivers/staging/greybus/raw.c
@@ -13,8 +13,7 @@
#include <linux/fs.h>
#include <linux/idr.h>
#include <linux/uaccess.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

struct gb_raw {
struct gb_connection *connection;
diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index a097a8916b3b..68c5718be827 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -12,8 +12,8 @@
#include <linux/mmc/mmc.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

struct gb_sdio_host {
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index 47d896992b35..68e8d272db6d 100644
--- a/drivers/staging/greybus/spi.c
+++ b/drivers/staging/greybus/spi.c
@@ -7,8 +7,8 @@
*/

#include <linux/module.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"
#include "spilib.h"

diff --git a/drivers/staging/greybus/spilib.c b/drivers/staging/greybus/spilib.c
index 2e07c6b41334..fc27c52de74a 100644
--- a/drivers/staging/greybus/spilib.c
+++ b/drivers/staging/greybus/spilib.c
@@ -10,9 +10,9 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/greybus.h>
#include <linux/spi/spi.h>

-#include "greybus.h"
#include "spilib.h"

struct gb_spilib {
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index 05bc45287b87..ce7740ef449b 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -8,8 +8,7 @@

#include <linux/debugfs.h>
#include <linux/workqueue.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

#define SVC_INTF_EJECT_TIMEOUT 9000
#define SVC_INTF_ACTIVATE_TIMEOUT 6000
diff --git a/drivers/staging/greybus/svc_watchdog.c b/drivers/staging/greybus/svc_watchdog.c
index 7868ad8211c5..b6b1682c19c4 100644
--- a/drivers/staging/greybus/svc_watchdog.c
+++ b/drivers/staging/greybus/svc_watchdog.c
@@ -8,7 +8,7 @@
#include <linux/delay.h>
#include <linux/suspend.h>
#include <linux/workqueue.h>
-#include "greybus.h"
+#include <linux/greybus.h>

#define SVC_WATCHDOG_PERIOD (2 * HZ)

diff --git a/drivers/staging/greybus/uart.c b/drivers/staging/greybus/uart.c
index b3bffe91ae99..55c51143bb09 100644
--- a/drivers/staging/greybus/uart.c
+++ b/drivers/staging/greybus/uart.c
@@ -28,8 +28,8 @@
#include <linux/kfifo.h>
#include <linux/workqueue.h>
#include <linux/completion.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

#define GB_NUM_MINORS 16 /* 16 is more than enough */
diff --git a/drivers/staging/greybus/usb.c b/drivers/staging/greybus/usb.c
index 1c246c73a085..8e9d9d59a357 100644
--- a/drivers/staging/greybus/usb.c
+++ b/drivers/staging/greybus/usb.c
@@ -10,8 +10,8 @@
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
+#include <linux/greybus.h>

-#include "greybus.h"
#include "gbphy.h"

/* Greybus USB request types */
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 3e5dedeacd5c..0e2b188e5ca3 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -13,8 +13,7 @@
#include <linux/kdev_t.h>
#include <linux/idr.h>
#include <linux/pm_runtime.h>
-
-#include "greybus.h"
+#include <linux/greybus.h>

struct gb_vibrator_device {
struct gb_connection *connection;
diff --git a/drivers/staging/greybus/greybus.h b/include/linux/greybus.h
similarity index 89%
rename from drivers/staging/greybus/greybus.h
rename to include/linux/greybus.h
index f0488ffff93e..18c0fb958b74 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/include/linux/greybus.h
@@ -20,18 +20,18 @@
#include <linux/pm_runtime.h>
#include <linux/idr.h>

-#include "greybus_id.h"
-#include "greybus_manifest.h"
-#include "greybus_protocols.h"
-#include "manifest.h"
-#include "hd.h"
-#include "svc.h"
-#include "control.h"
-#include "module.h"
-#include "interface.h"
-#include "bundle.h"
-#include "connection.h"
-#include "operation.h"
+#include <linux/greybus/greybus_id.h>
+#include <linux/greybus/greybus_manifest.h>
+#include <linux/greybus/greybus_protocols.h>
+#include <linux/greybus/manifest.h>
+#include <linux/greybus/hd.h>
+#include <linux/greybus/svc.h>
+#include <linux/greybus/control.h>
+#include <linux/greybus/module.h>
+#include <linux/greybus/interface.h>
+#include <linux/greybus/bundle.h>
+#include <linux/greybus/connection.h>
+#include <linux/greybus/operation.h>

/* Matches up with the Greybus Protocol specification document */
#define GREYBUS_VERSION_MAJOR 0x00
diff --git a/drivers/staging/greybus/bundle.h b/include/linux/greybus/bundle.h
similarity index 100%
rename from drivers/staging/greybus/bundle.h
rename to include/linux/greybus/bundle.h
diff --git a/drivers/staging/greybus/connection.h b/include/linux/greybus/connection.h
similarity index 100%
rename from drivers/staging/greybus/connection.h
rename to include/linux/greybus/connection.h
diff --git a/drivers/staging/greybus/control.h b/include/linux/greybus/control.h
similarity index 100%
rename from drivers/staging/greybus/control.h
rename to include/linux/greybus/control.h
diff --git a/drivers/staging/greybus/greybus_id.h b/include/linux/greybus/greybus_id.h
similarity index 100%
rename from drivers/staging/greybus/greybus_id.h
rename to include/linux/greybus/greybus_id.h
diff --git a/drivers/staging/greybus/greybus_manifest.h b/include/linux/greybus/greybus_manifest.h
similarity index 100%
rename from drivers/staging/greybus/greybus_manifest.h
rename to include/linux/greybus/greybus_manifest.h
diff --git a/drivers/staging/greybus/greybus_protocols.h b/include/linux/greybus/greybus_protocols.h
similarity index 100%
rename from drivers/staging/greybus/greybus_protocols.h
rename to include/linux/greybus/greybus_protocols.h
diff --git a/drivers/staging/greybus/hd.h b/include/linux/greybus/hd.h
similarity index 100%
rename from drivers/staging/greybus/hd.h
rename to include/linux/greybus/hd.h
diff --git a/drivers/staging/greybus/interface.h b/include/linux/greybus/interface.h
similarity index 100%
rename from drivers/staging/greybus/interface.h
rename to include/linux/greybus/interface.h
diff --git a/drivers/staging/greybus/manifest.h b/include/linux/greybus/manifest.h
similarity index 100%
rename from drivers/staging/greybus/manifest.h
rename to include/linux/greybus/manifest.h
diff --git a/drivers/staging/greybus/module.h b/include/linux/greybus/module.h
similarity index 100%
rename from drivers/staging/greybus/module.h
rename to include/linux/greybus/module.h
diff --git a/drivers/staging/greybus/operation.h b/include/linux/greybus/operation.h
similarity index 100%
rename from drivers/staging/greybus/operation.h
rename to include/linux/greybus/operation.h
diff --git a/drivers/staging/greybus/svc.h b/include/linux/greybus/svc.h
similarity index 100%
rename from drivers/staging/greybus/svc.h
rename to include/linux/greybus/svc.h
--
2.23.0

2019-08-25 05:58:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 9/9] staging: greybus: move es2 to drivers/greybus/

The es2 Greybus host controller has long been stable, so move it out of
drivers/staging/ to drivers/greybus/

Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/greybus/Kconfig | 16 ++++++++++++++++
drivers/greybus/Makefile | 7 +++++++
drivers/{staging => }/greybus/arpc.h | 0
drivers/{staging => }/greybus/es2.c | 2 +-
drivers/staging/greybus/Kconfig | 11 -----------
drivers/staging/greybus/Makefile | 5 -----
6 files changed, 24 insertions(+), 17 deletions(-)
rename drivers/{staging => }/greybus/arpc.h (100%)
rename drivers/{staging => }/greybus/es2.c (99%)

diff --git a/drivers/greybus/Kconfig b/drivers/greybus/Kconfig
index 158d8893114c..b84fcaf8b105 100644
--- a/drivers/greybus/Kconfig
+++ b/drivers/greybus/Kconfig
@@ -14,3 +14,19 @@ menuconfig GREYBUS

To compile this code as a module, chose M here: the module
will be called greybus.ko
+
+if GREYBUS
+
+config GREYBUS_ES2
+ tristate "Greybus ES3 USB host controller"
+ depends on USB
+ ---help---
+ Select this option if you have a Toshiba ES3 USB device that
+ acts as a Greybus "host controller". This device is a bridge
+ from a USB device to a Unipro network.
+
+ To compile this code as a module, chose M here: the module
+ will be called gb-es2.ko
+
+endif # GREYBUS
+
diff --git a/drivers/greybus/Makefile b/drivers/greybus/Makefile
index 03b22616ec7d..9bccdd229aa2 100644
--- a/drivers/greybus/Makefile
+++ b/drivers/greybus/Makefile
@@ -17,3 +17,10 @@ obj-$(CONFIG_GREYBUS) += greybus.o

# needed for trace events
ccflags-y += -I$(src)
+
+# Greybus Host controller drivers
+gb-es2-y := es2.o
+
+obj-$(CONFIG_GREYBUS_ES2) += gb-es2.o
+
+
diff --git a/drivers/staging/greybus/arpc.h b/drivers/greybus/arpc.h
similarity index 100%
rename from drivers/staging/greybus/arpc.h
rename to drivers/greybus/arpc.h
diff --git a/drivers/staging/greybus/es2.c b/drivers/greybus/es2.c
similarity index 99%
rename from drivers/staging/greybus/es2.c
rename to drivers/greybus/es2.c
index 5b755e76d8a4..366716f11b1a 100644
--- a/drivers/staging/greybus/es2.c
+++ b/drivers/greybus/es2.c
@@ -15,7 +15,7 @@
#include <asm/unaligned.h>

#include "arpc.h"
-#include "../../greybus/greybus_trace.h"
+#include "greybus_trace.h"


/* Default timeout for USB vendor requests. */
diff --git a/drivers/staging/greybus/Kconfig b/drivers/staging/greybus/Kconfig
index d03c37e1e6e8..d4777f5a8b90 100644
--- a/drivers/staging/greybus/Kconfig
+++ b/drivers/staging/greybus/Kconfig
@@ -1,17 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
if GREYBUS

-config GREYBUS_ES2
- tristate "Greybus ES3 USB host controller"
- depends on USB
- ---help---
- Select this option if you have a Toshiba ES3 USB device that
- acts as a Greybus "host controller". This device is a bridge
- from a USB device to a Unipro network.
-
- To compile this code as a module, chose M here: the module
- will be called gb-es2.ko
-
config GREYBUS_AUDIO
tristate "Greybus Audio Class driver"
depends on SOUND
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index d16853399c9a..627e44f2a983 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -2,11 +2,6 @@
# needed for trace events
ccflags-y += -I$(src)

-# Greybus Host controller drivers
-gb-es2-y := es2.o
-
-obj-$(CONFIG_GREYBUS_ES2) += gb-es2.o
-
# Greybus class drivers
gb-bootrom-y := bootrom.o
gb-camera-y := camera.o
--
2.23.0

2019-08-25 05:58:24

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 2/9] staging: greybus: remove license "boilerplate"

When the greybus drivers were converted to SPDX identifiers for the
license text, some license boilerplate was not removed. Clean this up
by removing this unneeded text now.

Cc: Johan Hovold <[email protected]>
Cc: Alex Elder <[email protected]>
Cc: Vaibhav Agarwal <[email protected]>
Cc: Mark Greer <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: "Bryan O'Donoghue" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
.../Documentation/firmware/authenticate.c | 46 -------------------
.../greybus/Documentation/firmware/firmware.c | 46 -------------------
drivers/staging/greybus/arpc.h | 46 -------------------
drivers/staging/greybus/audio_apbridgea.h | 26 +----------
.../staging/greybus/greybus_authentication.h | 46 -------------------
drivers/staging/greybus/greybus_firmware.h | 46 -------------------
drivers/staging/greybus/greybus_protocols.h | 46 -------------------
drivers/staging/greybus/tools/loopback_test.c | 2 -
8 files changed, 1 insertion(+), 303 deletions(-)

diff --git a/drivers/staging/greybus/Documentation/firmware/authenticate.c b/drivers/staging/greybus/Documentation/firmware/authenticate.c
index 806e75b7f405..3d2c6f88a138 100644
--- a/drivers/staging/greybus/Documentation/firmware/authenticate.c
+++ b/drivers/staging/greybus/Documentation/firmware/authenticate.c
@@ -2,54 +2,8 @@
/*
* Sample code to test CAP protocol
*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2016 Google Inc. All rights reserved.
* Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2016 Google Inc. All rights reserved.
- * Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <stdio.h>
diff --git a/drivers/staging/greybus/Documentation/firmware/firmware.c b/drivers/staging/greybus/Documentation/firmware/firmware.c
index 31d9c23e2eeb..765d69faa9cc 100644
--- a/drivers/staging/greybus/Documentation/firmware/firmware.c
+++ b/drivers/staging/greybus/Documentation/firmware/firmware.c
@@ -2,54 +2,8 @@
/*
* Sample code to test firmware-management protocol
*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2016 Google Inc. All rights reserved.
* Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2016 Google Inc. All rights reserved.
- * Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <stdio.h>
diff --git a/drivers/staging/greybus/arpc.h b/drivers/staging/greybus/arpc.h
index 3dab6375909c..c8b83c5cfa79 100644
--- a/drivers/staging/greybus/arpc.h
+++ b/drivers/staging/greybus/arpc.h
@@ -1,53 +1,7 @@
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2016 Google Inc. All rights reserved.
* Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2016 Google Inc. All rights reserved.
- * Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __ARPC_H
diff --git a/drivers/staging/greybus/audio_apbridgea.h b/drivers/staging/greybus/audio_apbridgea.h
index 330fc7a397eb..3f1f4dd2c61a 100644
--- a/drivers/staging/greybus/audio_apbridgea.h
+++ b/drivers/staging/greybus/audio_apbridgea.h
@@ -1,30 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause */
-/**
+/*
* Copyright (c) 2015-2016 Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This is a special protocol for configuring communication over the
diff --git a/drivers/staging/greybus/greybus_authentication.h b/drivers/staging/greybus/greybus_authentication.h
index d654760cf175..7edc7295b7ab 100644
--- a/drivers/staging/greybus/greybus_authentication.h
+++ b/drivers/staging/greybus/greybus_authentication.h
@@ -2,54 +2,8 @@
/*
* Greybus Component Authentication User Header
*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2016 Google Inc. All rights reserved.
* Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2016 Google Inc. All rights reserved.
- * Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __GREYBUS_AUTHENTICATION_USER_H
diff --git a/drivers/staging/greybus/greybus_firmware.h b/drivers/staging/greybus/greybus_firmware.h
index 13ef3aa5279e..f68fd5e25321 100644
--- a/drivers/staging/greybus/greybus_firmware.h
+++ b/drivers/staging/greybus/greybus_firmware.h
@@ -2,54 +2,8 @@
/*
* Greybus Firmware Management User Header
*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2016 Google Inc. All rights reserved.
* Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2016 Google Inc. All rights reserved.
- * Copyright(c) 2016 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __GREYBUS_FIRMWARE_USER_H
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 7d649a7fc4c9..5f34d1effb59 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -1,53 +1,7 @@
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
- * This file is provided under a dual BSD/GPLv2 license. When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
* Copyright(c) 2014 - 2015 Google Inc. All rights reserved.
* Copyright(c) 2014 - 2015 Linaro Ltd. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License version 2 for more details.
- *
- * BSD LICENSE
- *
- * Copyright(c) 2014 - 2015 Google Inc. All rights reserved.
- * Copyright(c) 2014 - 2015 Linaro Ltd. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
- * its contributors may be used to endorse or promote products
- * derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
- * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef __GREYBUS_PROTOCOLS_H
diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index cebc1d90a180..ba6f905f26fa 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -4,8 +4,6 @@
*
* Copyright 2015 Google Inc.
* Copyright 2015 Linaro Ltd.
- *
- * Provided under the three clause BSD license found in the LICENSE file.
*/
#include <errno.h>
#include <fcntl.h>
--
2.23.0

2019-08-26 05:52:28

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> When these files originally got an SPDX tag, I used // instead of /* */
> for the .h files. Fix this up to use // properly.
>
> Cc: Viresh Kumar <[email protected]>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/staging/greybus/firmware.h | 2 +-
> drivers/staging/greybus/gb-camera.h | 2 +-
> drivers/staging/greybus/gbphy.h | 2 +-
> drivers/staging/greybus/greybus.h | 2 +-
> drivers/staging/greybus/greybus_authentication.h | 2 +-
> drivers/staging/greybus/greybus_firmware.h | 2 +-
> drivers/staging/greybus/greybus_manifest.h | 2 +-
> drivers/staging/greybus/greybus_protocols.h | 2 +-
> drivers/staging/greybus/greybus_trace.h | 2 +-
> drivers/staging/greybus/hd.h | 2 +-
> drivers/staging/greybus/interface.h | 2 +-
> drivers/staging/greybus/manifest.h | 2 +-
> drivers/staging/greybus/module.h | 2 +-
> drivers/staging/greybus/operation.h | 2 +-
> drivers/staging/greybus/spilib.h | 2 +-
> drivers/staging/greybus/svc.h | 2 +-
> 16 files changed, 16 insertions(+), 16 deletions(-)

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 05:55:06

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 2/9] staging: greybus: remove license "boilerplate"

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> When the greybus drivers were converted to SPDX identifiers for the
> license text, some license boilerplate was not removed. Clean this up
> by removing this unneeded text now.
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: Vaibhav Agarwal <[email protected]>
> Cc: Mark Greer <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: "Bryan O'Donoghue" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> .../Documentation/firmware/authenticate.c | 46 -------------------
> .../greybus/Documentation/firmware/firmware.c | 46 -------------------
> drivers/staging/greybus/arpc.h | 46 -------------------
> drivers/staging/greybus/audio_apbridgea.h | 26 +----------
> .../staging/greybus/greybus_authentication.h | 46 -------------------
> drivers/staging/greybus/greybus_firmware.h | 46 -------------------
> drivers/staging/greybus/greybus_protocols.h | 46 -------------------
> drivers/staging/greybus/tools/loopback_test.c | 2 -
> 8 files changed, 1 insertion(+), 303 deletions(-)

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 05:57:35

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> With the goal of moving the core of the greybus code out of staging, the
> include files need to be moved to include/linux/greybus.h and
> include/linux/greybus/
>
> Cc: Vaibhav Hiremath <[email protected]>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: Vaibhav Agarwal <[email protected]>
> Cc: Mark Greer <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: Rui Miguel Silva <[email protected]>
> Cc: David Lin <[email protected]>
> Cc: "Bryan O'Donoghue" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 05:59:12

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 3/9] staging: greybus: hd: Fix up some alignment checkpatch issues

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> Some function prototypes do not match the expected alignment formatting
> so fix that up so that checkpatch is happy.
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/staging/greybus/hd.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 06:14:56

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 4/9] staging: greybus: manifest: Fix up some alignment checkpatch issues

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> Some function prototypes do not match the expected alignment formatting
> so fix that up so that checkpatch is happy.
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> 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 */
> }

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 06:15:26

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 8/9] staging: greybus: move the greybus core to drivers/greybus

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> The Greybus core code has been stable for a long time, and has been
> shipping for many years in millions of phones. With the advent of a
> recent Google Summer of Code project, and a number of new devices in the
> works from various companies, it is time to get the core greybus code
> out of staging as it really is going to be with us for a while.
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 06:17:44

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 9/9] staging: greybus: move es2 to drivers/greybus/

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> The es2 Greybus host controller has long been stable, so move it out of
> drivers/staging/ to drivers/greybus/
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/greybus/Kconfig | 16 ++++++++++++++++
> drivers/greybus/Makefile | 7 +++++++
> drivers/{staging => }/greybus/arpc.h | 0
> drivers/{staging => }/greybus/es2.c | 2 +-
> drivers/staging/greybus/Kconfig | 11 -----------
> drivers/staging/greybus/Makefile | 5 -----
> 6 files changed, 24 insertions(+), 17 deletions(-)
> rename drivers/{staging => }/greybus/arpc.h (100%)
> rename drivers/{staging => }/greybus/es2.c (99%)

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 06:40:24

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 6/9] staging: greybus: loopback: Fix up some alignment checkpatch issues

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> Some function prototypes do not match the expected alignment formatting
> so fix that up so that checkpatch is happy.
>
> Cc: "Bryan O'Donoghue" <[email protected]>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/staging/greybus/loopback.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
> index 48d85ebe404a..b0ab0eed5c18 100644
> --- a/drivers/staging/greybus/loopback.c
> +++ b/drivers/staging/greybus/loopback.c
> @@ -882,7 +882,7 @@ static int gb_loopback_fn(void *data)
> gb->type = 0;
> gb->send_count = 0;
> sysfs_notify(&gb->dev->kobj, NULL,
> - "iteration_count");
> + "iteration_count");
> dev_dbg(&bundle->dev, "load test complete\n");
> } else {
> dev_dbg(&bundle->dev,
> @@ -1054,7 +1054,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,
>
> /* Allocate kfifo */
> if (kfifo_alloc(&gb->kfifo_lat, kfifo_depth * sizeof(u32),
> - GFP_KERNEL)) {
> + GFP_KERNEL)) {
> retval = -ENOMEM;
> goto out_conn;
> }

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-26 08:22:36

by Viresh Kumar

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 5/9] staging: greybus: log: Fix up some alignment checkpatch issues

On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> Some function prototypes do not match the expected alignment formatting
> so fix that up so that checkpatch is happy.
>
> Cc: David Lin <[email protected]>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/staging/greybus/log.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/greybus/log.c b/drivers/staging/greybus/log.c
> index 15a88574dbb0..4f1f161ff11c 100644
> --- a/drivers/staging/greybus/log.c
> +++ b/drivers/staging/greybus/log.c
> @@ -31,14 +31,14 @@ static int gb_log_request_handler(struct gb_operation *op)
> /* Verify size of payload */
> if (op->request->payload_size < sizeof(*receive)) {
> dev_err(dev, "log request too small (%zu < %zu)\n",
> - op->request->payload_size, sizeof(*receive));
> + op->request->payload_size, sizeof(*receive));
> return -EINVAL;
> }
> receive = op->request->payload;
> len = le16_to_cpu(receive->len);
> if (len != (op->request->payload_size - sizeof(*receive))) {
> dev_err(dev, "log request wrong size %d vs %zu\n", len,
> - (op->request->payload_size - sizeof(*receive)));
> + (op->request->payload_size - sizeof(*receive)));
> return -EINVAL;
> }
> if (len == 0) {
> @@ -83,7 +83,7 @@ static int gb_log_probe(struct gb_bundle *bundle,
> return -ENOMEM;
>
> connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id),
> - gb_log_request_handler);
> + gb_log_request_handler);
> if (IS_ERR(connection)) {
> retval = PTR_ERR(connection);
> goto error_free;

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2019-08-27 08:10:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

On Mon, Aug 26, 2019 at 11:21:19AM +0530, Viresh Kumar wrote:
> On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> > When these files originally got an SPDX tag, I used // instead of /* */
> > for the .h files. Fix this up to use // properly.
> >
> > Cc: Viresh Kumar <[email protected]>
> > Cc: Johan Hovold <[email protected]>
> > Cc: Alex Elder <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > ---
> > drivers/staging/greybus/firmware.h | 2 +-
> > drivers/staging/greybus/gb-camera.h | 2 +-
> > drivers/staging/greybus/gbphy.h | 2 +-
> > drivers/staging/greybus/greybus.h | 2 +-
> > drivers/staging/greybus/greybus_authentication.h | 2 +-
> > drivers/staging/greybus/greybus_firmware.h | 2 +-
> > drivers/staging/greybus/greybus_manifest.h | 2 +-
> > drivers/staging/greybus/greybus_protocols.h | 2 +-
> > drivers/staging/greybus/greybus_trace.h | 2 +-
> > drivers/staging/greybus/hd.h | 2 +-
> > drivers/staging/greybus/interface.h | 2 +-
> > drivers/staging/greybus/manifest.h | 2 +-
> > drivers/staging/greybus/module.h | 2 +-
> > drivers/staging/greybus/operation.h | 2 +-
> > drivers/staging/greybus/spilib.h | 2 +-
> > drivers/staging/greybus/svc.h | 2 +-
> > 16 files changed, 16 insertions(+), 16 deletions(-)
>
> Acked-by: Viresh Kumar <[email protected]>

Thanks for all of the acks!

greg k-h

2019-08-27 09:23:03

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

Hi Greg,

On Tue, Aug 27, 2019 at 09:58:02AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Aug 26, 2019 at 11:21:19AM +0530, Viresh Kumar wrote:
> > On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> > > When these files originally got an SPDX tag, I used // instead of /* */
> > > for the .h files. Fix this up to use // properly.
> > >
> > > Cc: Viresh Kumar <[email protected]>
> > > Cc: Johan Hovold <[email protected]>
> > > Cc: Alex Elder <[email protected]>
> > > Cc: [email protected]
> > > Cc: [email protected]
> > > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > > ---
> > > drivers/staging/greybus/firmware.h | 2 +-
> > > drivers/staging/greybus/gb-camera.h | 2 +-
> > > drivers/staging/greybus/gbphy.h | 2 +-
> > > drivers/staging/greybus/greybus.h | 2 +-
> > > drivers/staging/greybus/greybus_authentication.h | 2 +-
> > > drivers/staging/greybus/greybus_firmware.h | 2 +-
> > > drivers/staging/greybus/greybus_manifest.h | 2 +-
> > > drivers/staging/greybus/greybus_protocols.h | 2 +-
> > > drivers/staging/greybus/greybus_trace.h | 2 +-
> > > drivers/staging/greybus/hd.h | 2 +-
> > > drivers/staging/greybus/interface.h | 2 +-
> > > drivers/staging/greybus/manifest.h | 2 +-
> > > drivers/staging/greybus/module.h | 2 +-
> > > drivers/staging/greybus/operation.h | 2 +-
> > > drivers/staging/greybus/spilib.h | 2 +-
> > > drivers/staging/greybus/svc.h | 2 +-
> > > 16 files changed, 16 insertions(+), 16 deletions(-)
> >
> > Acked-by: Viresh Kumar <[email protected]>
>
> Thanks for all of the acks!
>
> greg k-h

I found similar issues of graybus when I tested the latest staging-testing

In file included from <command-line>:0:0:
./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ??__le16??
__le16 size; /* Size in bytes of header + payload */
^~~~~~
./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ??__le16??
__le16 operation_id; /* Operation unique id */
^~~~~~
./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ??__u8??
__u8 type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
^~~~
./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ??__u8??
__u8 result; /* Result of request (in responses only) */
^~~~
./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ??__u8??
__u8 pad[2]; /* must be zero (ignore when read) */
^~~~
./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ??__u8??
__u8 phase;
^~~~
./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ??__u8??
__u8 major;
^~~~
./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ??__u8??
__u8 minor;
^~~~
./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ??__u8??
__u8 major;
^~~~
./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ??__u8??
__u8 minor;
^~~~
./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ??__u8??
__u8 bundle_id;
^~~~
./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ??__u8??
__u8 major;
^~~~
./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ??__u8??
__u8 minor;
^~~~
./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ??__le16??
__le16 size;
^~~~~~
./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ??__u8??
__u8 data[0];
^~~~
./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ??__le16??
__le16 cport_id;
^~~~~~
./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ??__le16??
__le16 cport_id;

.. and other files...

Not very sure... but it seems it can be observed with allmodconfig or
CONFIG_KERNEL_HEADER_TEST=y and fail my compilation...
Hope that of some help (kind reminder...)

Thanks,
Gao Xiang


> _______________________________________________
> devel mailing list
> [email protected]
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

2019-08-27 10:46:24

by Alex Elder

[permalink] [raw]
Subject: Re: [greybus-dev] [PATCH 0/9] staging: move greybus core out of staging

On 8/25/19 12:54 AM, Greg Kroah-Hartman wrote:
> The Greybus code has long been "stable" but was living in the
> drivers/staging/ directory to see if there really was going to be
> devices using this protocol over the long-term. With the success of
> millions of phones with this hardware and code in it, and the recent
> Google Summer of Code project, and a number of of new devices in the
> works from various companies, it is time to finally move this code out
> of staging into the "real" portion of the kernel so that people know
> they can rely on it.
>
> This series first does a little bit of checkpatch cleanups for some
> basic remaining issues in the greybus files, and then moves the include
> directory, the greybus core code, and the es2 greybus host controller
> driver into drivers/greybus.
>
> To come after this is the movement of the Documentation entries and a
> number of the module drivers that are stable.

They all look good to me. (I don't always agree with checkpatch,
but standardization is good.) Thanks Greg.

Acked-by: Alex Elder <[email protected]>

> Greg Kroah-Hartman (9):
> staging: greybus: fix up SPDX comment in .h files
> staging: greybus: remove license "boilerplate"
> staging: greybus: hd: Fix up some alignment checkpatch issues
> staging: greybus: manifest: Fix up some alignment checkpatch issues
> staging: greybus: log: Fix up some alignment checkpatch issues
> staging: greybus: loopback: Fix up some alignment checkpatch issues
> staging: greybus: move core include files to include/linux/greybus/
> staging: greybus: move the greybus core to drivers/greybus
> staging: greybus: move es2 to drivers/greybus/
>
> MAINTAINERS | 3 +
> drivers/Kconfig | 2 +
> drivers/Makefile | 1 +
> drivers/greybus/Kconfig | 32 +++++
> drivers/greybus/Makefile | 26 +++++
> drivers/greybus/arpc.h | 63 ++++++++++
> drivers/{staging => }/greybus/bundle.c | 2 +-
> drivers/{staging => }/greybus/connection.c | 2 +-
> drivers/{staging => }/greybus/control.c | 2 +-
> drivers/{staging => }/greybus/core.c | 2 +-
> drivers/{staging => }/greybus/debugfs.c | 3 +-
> drivers/{staging => }/greybus/es2.c | 3 +-
> drivers/{staging => }/greybus/greybus_trace.h | 2 +-
> drivers/{staging => }/greybus/hd.c | 12 +-
> drivers/{staging => }/greybus/interface.c | 2 +-
> drivers/{staging => }/greybus/manifest.c | 41 ++++---
> drivers/{staging => }/greybus/module.c | 2 +-
> drivers/{staging => }/greybus/operation.c | 2 +-
> drivers/{staging => }/greybus/svc.c | 3 +-
> drivers/{staging => }/greybus/svc_watchdog.c | 2 +-
> .../Documentation/firmware/authenticate.c | 46 --------
> .../greybus/Documentation/firmware/firmware.c | 46 --------
> drivers/staging/greybus/Kconfig | 27 -----
> drivers/staging/greybus/Makefile | 22 ----
> drivers/staging/greybus/arche-platform.c | 2 +-
> drivers/staging/greybus/arpc.h | 109 ------------------
> drivers/staging/greybus/audio_apbridgea.c | 3 +-
> drivers/staging/greybus/audio_apbridgea.h | 26 +----
> drivers/staging/greybus/audio_codec.h | 4 +-
> drivers/staging/greybus/audio_gb.c | 4 +-
> drivers/staging/greybus/authentication.c | 3 +-
> drivers/staging/greybus/bootrom.c | 2 +-
> drivers/staging/greybus/camera.c | 2 +-
> drivers/staging/greybus/firmware.h | 4 +-
> drivers/staging/greybus/fw-core.c | 2 +-
> drivers/staging/greybus/fw-download.c | 2 +-
> drivers/staging/greybus/fw-management.c | 2 +-
> drivers/staging/greybus/gb-camera.h | 2 +-
> drivers/staging/greybus/gbphy.c | 2 +-
> drivers/staging/greybus/gbphy.h | 2 +-
> drivers/staging/greybus/gpio.c | 2 +-
> .../staging/greybus/greybus_authentication.h | 48 +-------
> drivers/staging/greybus/greybus_firmware.h | 48 +-------
> drivers/staging/greybus/hid.c | 3 +-
> drivers/staging/greybus/i2c.c | 2 +-
> drivers/staging/greybus/light.c | 4 +-
> drivers/staging/greybus/log.c | 9 +-
> drivers/staging/greybus/loopback.c | 9 +-
> drivers/staging/greybus/power_supply.c | 3 +-
> drivers/staging/greybus/pwm.c | 2 +-
> drivers/staging/greybus/raw.c | 3 +-
> drivers/staging/greybus/sdio.c | 2 +-
> drivers/staging/greybus/spi.c | 2 +-
> drivers/staging/greybus/spilib.c | 2 +-
> drivers/staging/greybus/spilib.h | 2 +-
> drivers/staging/greybus/tools/loopback_test.c | 2 -
> drivers/staging/greybus/uart.c | 2 +-
> drivers/staging/greybus/usb.c | 2 +-
> drivers/staging/greybus/vibrator.c | 3 +-
> .../greybus => include/linux}/greybus.h | 26 ++---
> .../linux}/greybus/bundle.h | 0
> .../linux}/greybus/connection.h | 0
> .../linux}/greybus/control.h | 0
> .../linux}/greybus/greybus_id.h | 0
> .../linux}/greybus/greybus_manifest.h | 2 +-
> .../linux}/greybus/greybus_protocols.h | 48 +-------
> .../staging => include/linux}/greybus/hd.h | 2 +-
> .../linux}/greybus/interface.h | 2 +-
> .../linux}/greybus/manifest.h | 2 +-
> .../linux}/greybus/module.h | 2 +-
> .../linux}/greybus/operation.h | 2 +-
> .../staging => include/linux}/greybus/svc.h | 2 +-
> 72 files changed, 225 insertions(+), 532 deletions(-)
> create mode 100644 drivers/greybus/Kconfig
> create mode 100644 drivers/greybus/Makefile
> create mode 100644 drivers/greybus/arpc.h
> rename drivers/{staging => }/greybus/bundle.c (99%)
> rename drivers/{staging => }/greybus/connection.c (99%)
> rename drivers/{staging => }/greybus/control.c (99%)
> rename drivers/{staging => }/greybus/core.c (99%)
> rename drivers/{staging => }/greybus/debugfs.c (94%)
> rename drivers/{staging => }/greybus/es2.c (99%)
> rename drivers/{staging => }/greybus/greybus_trace.h (99%)
> rename drivers/{staging => }/greybus/hd.c (96%)
> rename drivers/{staging => }/greybus/interface.c (99%)
> rename drivers/{staging => }/greybus/manifest.c (95%)
> rename drivers/{staging => }/greybus/module.c (99%)
> rename drivers/{staging => }/greybus/operation.c (99%)
> rename drivers/{staging => }/greybus/svc.c (99%)
> rename drivers/{staging => }/greybus/svc_watchdog.c (99%)
> delete mode 100644 drivers/staging/greybus/arpc.h
> rename {drivers/staging/greybus => include/linux}/greybus.h (88%)
> rename {drivers/staging => include/linux}/greybus/bundle.h (100%)
> rename {drivers/staging => include/linux}/greybus/connection.h (100%)
> rename {drivers/staging => include/linux}/greybus/control.h (100%)
> rename {drivers/staging => include/linux}/greybus/greybus_id.h (100%)
> rename {drivers/staging => include/linux}/greybus/greybus_manifest.h (99%)
> rename {drivers/staging => include/linux}/greybus/greybus_protocols.h (96%)
> rename {drivers/staging => include/linux}/greybus/hd.h (98%)
> rename {drivers/staging => include/linux}/greybus/interface.h (98%)
> rename {drivers/staging => include/linux}/greybus/manifest.h (87%)
> rename {drivers/staging => include/linux}/greybus/module.h (94%)
> rename {drivers/staging => include/linux}/greybus/operation.h (99%)
> rename {drivers/staging => include/linux}/greybus/svc.h (98%)
>

2019-08-27 13:38:55

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

I can't compile greybus so it's hard to run Smatch on it... I have a
Smatch thing which ignores missing includes and just tries its best.
It mostly generates garbage output but a couple of these look like
potential issues:

drivers/staging/greybus/operation.c:379 gb_operation_message_alloc() warn: check 'message_size' for integer overflows 'kzalloc()'
drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->channels' double freed
drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->name' double freed

regards,
dan carpenter


2019-08-27 13:47:30

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

On Tue, Aug 27, 2019 at 04:36:11PM +0300, Dan Carpenter wrote:
> I can't compile greybus so it's hard to run Smatch on it... I have a
> Smatch thing which ignores missing includes and just tries its best.
> It mostly generates garbage output but a couple of these look like
> potential issues:

Why can't you compile the code?

> drivers/staging/greybus/operation.c:379 gb_operation_message_alloc() warn: check 'message_size' for integer overflows 'kzalloc()'

That should be checked on line 368, right?

> drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->channels' double freed
> drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->name' double freed

I don't understand this warning, how are these potentially double freed?

And the light.c file isn't moving out of drivers/staging/ just yet :)

thanks,

greg k-h

2019-08-27 14:31:54

by Rui Miguel Silva

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

Hi,
On Tue 27 Aug 2019 at 14:45, Greg Kroah-Hartman wrote:
> On Tue, Aug 27, 2019 at 04:36:11PM +0300, Dan Carpenter wrote:
>> I can't compile greybus so it's hard to run Smatch on it... I have a
>> Smatch thing which ignores missing includes and just tries its best.
>> It mostly generates garbage output but a couple of these look like
>> potential issues:
>
> Why can't you compile the code?
>

I think we are missing includes in some of the
greybus header files.

>
>> drivers/staging/greybus/operation.c:379 gb_operation_message_alloc() warn: check 'message_size' for integer overflows 'kzalloc()'
>
> That should be checked on line 368, right?
>
>> drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->channels' double freed
>> drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->name' double freed
>
> I don't understand this warning, how are these potentially double freed?
>
> And the light.c file isn't moving out of drivers/staging/ just yet :)
>

I will take a look at this also.

Cheers,
Rui

2019-08-27 14:39:01

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

On Tue, Aug 27, 2019 at 03:45:57PM +0200, Greg Kroah-Hartman wrote:
> Why can't you compile the code?
>

Now that I try to investigate the compile errors, it starts to compile
perfectly...

> > drivers/staging/greybus/operation.c:379 gb_operation_message_alloc() warn: check 'message_size' for integer overflows 'kzalloc()'
>
> That should be checked on line 368, right?

This is a false positive. I assumed it was related to the compile
problem...

>
> > drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->channels' double freed
> > drivers/staging/greybus/light.c:1256 gb_lights_request_handler() warn: 'light->name' double freed
>
> I don't understand this warning, how are these potentially double freed?

I will fix these.

regards,
dan carpenter

2019-08-27 15:38:36

by Mark Greer

[permalink] [raw]
Subject: Re: [PATCH 2/9] staging: greybus: remove license "boilerplate"

On Sun, Aug 25, 2019 at 07:54:22AM +0200, Greg Kroah-Hartman wrote:
> When the greybus drivers were converted to SPDX identifiers for the
> license text, some license boilerplate was not removed. Clean this up
> by removing this unneeded text now.
>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: Vaibhav Agarwal <[email protected]>
> Cc: Mark Greer <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: "Bryan O'Donoghue" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---

Acked-by: Mark Greer <[email protected]>

2019-08-27 15:40:16

by Mark Greer

[permalink] [raw]
Subject: Re: [PATCH 7/9] staging: greybus: move core include files to include/linux/greybus/

On Sun, Aug 25, 2019 at 07:54:27AM +0200, Greg Kroah-Hartman wrote:
> With the goal of moving the core of the greybus code out of staging, the
> include files need to be moved to include/linux/greybus.h and
> include/linux/greybus/
>
> Cc: Vaibhav Hiremath <[email protected]>
> Cc: Johan Hovold <[email protected]>
> Cc: Alex Elder <[email protected]>
> Cc: Vaibhav Agarwal <[email protected]>
> Cc: Mark Greer <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: Rui Miguel Silva <[email protected]>
> Cc: David Lin <[email protected]>
> Cc: "Bryan O'Donoghue" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
> ---

Acked-by: Mark Greer <[email protected]>

2019-08-27 15:45:40

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

On Tue, Aug 27, 2019 at 03:30:21PM +0100, Rui Miguel Silva wrote:
> Hi,
> On Tue 27 Aug 2019 at 14:45, Greg Kroah-Hartman wrote:
> > On Tue, Aug 27, 2019 at 04:36:11PM +0300, Dan Carpenter wrote:
> >> I can't compile greybus so it's hard to run Smatch on it... I have a
> >> Smatch thing which ignores missing includes and just tries its best.
> >> It mostly generates garbage output but a couple of these look like
> >> potential issues:
> >
> > Why can't you compile the code?
> >
>
> I think we are missing includes in some of the
> greybus header files.

Really? Where? Builds fine here and passes 0-day :)

thanks,

greg k-h

2019-08-27 15:47:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

On Tue, Aug 27, 2019 at 05:20:36PM +0800, Gao Xiang wrote:
> Hi Greg,
>
> On Tue, Aug 27, 2019 at 09:58:02AM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Aug 26, 2019 at 11:21:19AM +0530, Viresh Kumar wrote:
> > > On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> > > > When these files originally got an SPDX tag, I used // instead of /* */
> > > > for the .h files. Fix this up to use // properly.
> > > >
> > > > Cc: Viresh Kumar <[email protected]>
> > > > Cc: Johan Hovold <[email protected]>
> > > > Cc: Alex Elder <[email protected]>
> > > > Cc: [email protected]
> > > > Cc: [email protected]
> > > > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > > > ---
> > > > drivers/staging/greybus/firmware.h | 2 +-
> > > > drivers/staging/greybus/gb-camera.h | 2 +-
> > > > drivers/staging/greybus/gbphy.h | 2 +-
> > > > drivers/staging/greybus/greybus.h | 2 +-
> > > > drivers/staging/greybus/greybus_authentication.h | 2 +-
> > > > drivers/staging/greybus/greybus_firmware.h | 2 +-
> > > > drivers/staging/greybus/greybus_manifest.h | 2 +-
> > > > drivers/staging/greybus/greybus_protocols.h | 2 +-
> > > > drivers/staging/greybus/greybus_trace.h | 2 +-
> > > > drivers/staging/greybus/hd.h | 2 +-
> > > > drivers/staging/greybus/interface.h | 2 +-
> > > > drivers/staging/greybus/manifest.h | 2 +-
> > > > drivers/staging/greybus/module.h | 2 +-
> > > > drivers/staging/greybus/operation.h | 2 +-
> > > > drivers/staging/greybus/spilib.h | 2 +-
> > > > drivers/staging/greybus/svc.h | 2 +-
> > > > 16 files changed, 16 insertions(+), 16 deletions(-)
> > >
> > > Acked-by: Viresh Kumar <[email protected]>
> >
> > Thanks for all of the acks!
> >
> > greg k-h
>
> I found similar issues of graybus when I tested the latest staging-testing
>
> In file included from <command-line>:0:0:
> ./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ‘__le16’
> __le16 size; /* Size in bytes of header + payload */
> ^~~~~~
> ./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ‘__le16’
> __le16 operation_id; /* Operation unique id */
> ^~~~~~
> ./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ‘__u8’
> __u8 type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ‘__u8’
> __u8 result; /* Result of request (in responses only) */
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ‘__u8’
> __u8 pad[2]; /* must be zero (ignore when read) */
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ‘__u8’
> __u8 phase;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ‘__u8’
> __u8 major;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ‘__u8’
> __u8 minor;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ‘__u8’
> __u8 major;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ‘__u8’
> __u8 minor;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ‘__u8’
> __u8 bundle_id;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ‘__u8’
> __u8 major;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ‘__u8’
> __u8 minor;
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ‘__le16’
> __le16 size;
> ^~~~~~
> ./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ‘__u8’
> __u8 data[0];
> ^~~~
> ./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ‘__le16’
> __le16 cport_id;
> ^~~~~~
> ./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ‘__le16’
> __le16 cport_id;
>
> .. and other files...
>
> Not very sure... but it seems it can be observed with allmodconfig or
> CONFIG_KERNEL_HEADER_TEST=y and fail my compilation...
> Hope that of some help (kind reminder...)

Ah, thank you so much for this, NOW that makes sense why I got that odd
kbuild warning that I could not figure out.

Let me go fix this up, thank you so much.

greg k-h

2019-08-27 15:58:49

by Rui Miguel Silva

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

Hi Greg,
On Tue 27 Aug 2019 at 16:43, Greg KH wrote:
> On Tue, Aug 27, 2019 at 03:30:21PM +0100, Rui Miguel Silva wrote:
>> Hi,
>> On Tue 27 Aug 2019 at 14:45, Greg Kroah-Hartman wrote:
>> > On Tue, Aug 27, 2019 at 04:36:11PM +0300, Dan Carpenter wrote:
>> >> I can't compile greybus so it's hard to run Smatch on it... I have a
>> >> Smatch thing which ignores missing includes and just tries its best.
>> >> It mostly generates garbage output but a couple of these look like
>> >> potential issues:
>> >
>> > Why can't you compile the code?
>> >
>>
>> I think we are missing includes in some of the
>> greybus header files.
>
> Really? Where? Builds fine here and passes 0-day :)
>

Yeah; just sent a patch to fix it.

Cheers,
Rui

2019-08-27 16:03:15

by Gao Xiang

[permalink] [raw]
Subject: Re: [PATCH 1/9] staging: greybus: fix up SPDX comment in .h files

On Tue, Aug 27, 2019 at 05:43:43PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Aug 27, 2019 at 05:20:36PM +0800, Gao Xiang wrote:
> > Hi Greg,
> >
> > On Tue, Aug 27, 2019 at 09:58:02AM +0200, Greg Kroah-Hartman wrote:
> > > On Mon, Aug 26, 2019 at 11:21:19AM +0530, Viresh Kumar wrote:
> > > > On 25-08-19, 07:54, Greg Kroah-Hartman wrote:
> > > > > When these files originally got an SPDX tag, I used // instead of /* */
> > > > > for the .h files. Fix this up to use // properly.
> > > > >
> > > > > Cc: Viresh Kumar <[email protected]>
> > > > > Cc: Johan Hovold <[email protected]>
> > > > > Cc: Alex Elder <[email protected]>
> > > > > Cc: [email protected]
> > > > > Cc: [email protected]
> > > > > Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > > > > ---
> > > > > drivers/staging/greybus/firmware.h | 2 +-
> > > > > drivers/staging/greybus/gb-camera.h | 2 +-
> > > > > drivers/staging/greybus/gbphy.h | 2 +-
> > > > > drivers/staging/greybus/greybus.h | 2 +-
> > > > > drivers/staging/greybus/greybus_authentication.h | 2 +-
> > > > > drivers/staging/greybus/greybus_firmware.h | 2 +-
> > > > > drivers/staging/greybus/greybus_manifest.h | 2 +-
> > > > > drivers/staging/greybus/greybus_protocols.h | 2 +-
> > > > > drivers/staging/greybus/greybus_trace.h | 2 +-
> > > > > drivers/staging/greybus/hd.h | 2 +-
> > > > > drivers/staging/greybus/interface.h | 2 +-
> > > > > drivers/staging/greybus/manifest.h | 2 +-
> > > > > drivers/staging/greybus/module.h | 2 +-
> > > > > drivers/staging/greybus/operation.h | 2 +-
> > > > > drivers/staging/greybus/spilib.h | 2 +-
> > > > > drivers/staging/greybus/svc.h | 2 +-
> > > > > 16 files changed, 16 insertions(+), 16 deletions(-)
> > > >
> > > > Acked-by: Viresh Kumar <[email protected]>
> > >
> > > Thanks for all of the acks!
> > >
> > > greg k-h
> >
> > I found similar issues of graybus when I tested the latest staging-testing
> >
> > In file included from <command-line>:0:0:
> > ./include/linux/greybus/greybus_protocols.h:45:2: error: unknown type name ??????_le16??????
> > __le16 size; /* Size in bytes of header + payload */
> > ^~~~~~
> > ./include/linux/greybus/greybus_protocols.h:46:2: error: unknown type name ??????_le16??????
> > __le16 operation_id; /* Operation unique id */
> > ^~~~~~
> > ./include/linux/greybus/greybus_protocols.h:47:2: error: unknown type name ??????_u8??????
> > __u8 type; /* E.g GB_I2C_TYPE_* or GB_GPIO_TYPE_* */
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:48:2: error: unknown type name ??????_u8??????
> > __u8 result; /* Result of request (in responses only) */
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:49:2: error: unknown type name ??????_u8??????
> > __u8 pad[2]; /* must be zero (ignore when read) */
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:58:2: error: unknown type name ??????_u8??????
> > __u8 phase;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:88:2: error: unknown type name ??????_u8??????
> > __u8 major;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:89:2: error: unknown type name ??????_u8??????
> > __u8 minor;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:93:2: error: unknown type name ??????_u8??????
> > __u8 major;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:94:2: error: unknown type name ??????_u8??????
> > __u8 minor;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:98:2: error: unknown type name ??????_u8??????
> > __u8 bundle_id;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:102:2: error: unknown type name ??????_u8??????
> > __u8 major;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:103:2: error: unknown type name ??????_u8??????
> > __u8 minor;
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:108:2: error: unknown type name ??????_le16??????
> > __le16 size;
> > ^~~~~~
> > ./include/linux/greybus/greybus_protocols.h:113:2: error: unknown type name ??????_u8??????
> > __u8 data[0];
> > ^~~~
> > ./include/linux/greybus/greybus_protocols.h:118:2: error: unknown type name ??????_le16??????
> > __le16 cport_id;
> > ^~~~~~
> > ./include/linux/greybus/greybus_protocols.h:122:2: error: unknown type name ??????_le16??????
> > __le16 cport_id;
> >
> > .. and other files...
> >
> > Not very sure... but it seems it can be observed with allmodconfig or
> > CONFIG_KERNEL_HEADER_TEST=y and fail my compilation...
> > Hope that of some help (kind reminder...)
>
> Ah, thank you so much for this, NOW that makes sense why I got that odd
> kbuild warning that I could not figure out.

Yeah, it seems KERNEL_HEADER_TEST is a new feature which aims at ensuring
kernel headers are self-contained... I think it can be observed by
CONFIG_GREYBUS and CONFIG_KERNEL_HEADER_TEST are on

see commit 43c78d88036e ("kbuild: compile-test kernel headers to ensure they are self-contained")

>
> Let me go fix this up, thank you so much.

You're welcome, I was just testing my previous patch after merging as well...

Thanks,
Gao Xiang

>
> greg k-h

2019-08-27 17:02:31

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

On Tue, Aug 27, 2019 at 04:57:20PM +0100, Rui Miguel Silva wrote:
> Hi Greg,
> On Tue 27 Aug 2019 at 16:43, Greg KH wrote:
> > On Tue, Aug 27, 2019 at 03:30:21PM +0100, Rui Miguel Silva wrote:
> >> Hi,
> >> On Tue 27 Aug 2019 at 14:45, Greg Kroah-Hartman wrote:
> >> > On Tue, Aug 27, 2019 at 04:36:11PM +0300, Dan Carpenter wrote:
> >> >> I can't compile greybus so it's hard to run Smatch on it... I have a
> >> >> Smatch thing which ignores missing includes and just tries its best.
> >> >> It mostly generates garbage output but a couple of these look like
> >> >> potential issues:
> >> >
> >> > Why can't you compile the code?
> >> >
> >>
> >> I think we are missing includes in some of the
> >> greybus header files.
> >
> > Really? Where? Builds fine here and passes 0-day :)
> >
>
> Yeah; just sent a patch to fix it.

Thanks, now merged!

greg k-h

2019-09-01 17:33:31

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

Hi!

> The Greybus code has long been "stable" but was living in the
> drivers/staging/ directory to see if there really was going to be
> devices using this protocol over the long-term. With the success of
> millions of phones with this hardware and code in it, and the recent

So, what phones do have this, for example?

Does that mean that there's large choice of phones well supported by the
mainline?

Best regards, Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2019-09-02 06:50:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/9] staging: move greybus core out of staging

On Sun, Sep 01, 2019 at 07:23:03PM +0200, Pavel Machek wrote:
> Hi!
>
> > The Greybus code has long been "stable" but was living in the
> > drivers/staging/ directory to see if there really was going to be
> > devices using this protocol over the long-term. With the success of
> > millions of phones with this hardware and code in it, and the recent
>
> So, what phones do have this, for example?

The Motorola Z line, all of the "Moto Mods" use this interface to
communicate.

> Does that mean that there's large choice of phones well supported by the
> mainline?

I have no idea what kernel version they use, you will have to talk to
Motorola about that.

greg k-h