On Thu, Oct 12, 2023 at 08:50:21PM +0800, Chen Shuo wrote:
> This patch fixes the checks reported by checkpatch.pl
> for alignment should match open parenthesis
No it doesn't :(
Also, please always use scripts/checkpatch.pl to get the proper mailing
lists to send patches to.
thanks,
greg k-h
BeagleConnect is both a technology concept and a line of board designs
that implement the technology. Born from Greybus, a mechanism for
dynamically extending a Linux system with embedded peripherals,
BeagleConnect adds two key elements: a 6LoWPAN transport and mikroBUS
manifests. The 6LoWPAN transport provides for arbitrary connections,
including the IEEE802.15.4g long-range wireless transport supported
between BeaglePlay and BeagleConnect Freedom (the first BeagleConnect
board design). The mikroBUS manifests provide for rapid prototyping
and low-node-count production with sensor boards following the
mikroBUS freely-licensable embedded bus standard such that existing
Linux drivers can be loaded upon Greybus discovery of the nodes.
This patch set provides the Linux-side hooks required for the 6LoWPAN
transport for BeagleConnect on BeaglePlay. Also adds required devicetree
additions.
Tested over `next-20230825`.
Link: https://programmershideaway.xyz/tags/gsoc23/ GSoC23 Blog
Link: https://git.beagleboard.org/gsoc/greybus/cc1352-firmware Zephyr App
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay GitHub Branch
Link: https://docs.beagleboard.org/latest/boards/beagleconnect/index.html BeagleConnect
Link: https://docs.beagleboard.org/latest/boards/beagleplay/index.html BeaglePlay
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay Github Repo
Link: https://lists.linaro.org/archives/list/greybus-dev@lists.linaro.org/thread/… Patch v7
Changes in Patch v8
v7 -> v8:
- fix clocks
- fix reset-gpios
- depend on serdev
v6 -> v7:
- Drop speed variable
- Fix commit message
- add clock-names and descriptions
- fix power lines
v5 -> v6:
- Rename compatible to `ti,cc1352p7`
- Fix formatting
- Use kerneldoc
- Add clocks, power-gpios, reset-gpios to dt bindings
v4 -> v5:
- Move DT Bindings to net
- Rename compatible to `beagle,play-cc1352`
- Expose CC1352 as MCU
- Remove redundant tracing messages
- Fix memory leaks
v3 -> v4:
- Add DT Bindings
- Reorder commits
- Improve commit messages
v2 -> v3:
- Move gb-beagleplay out of staging
v1 -> v2:
- Combine the driver into a single file
- Remove redundant code
- Fix Checkpatch complaints
- Other suggested changes
Ayush Singh (3):
dt-bindings: net: Add ti,cc1352p7
greybus: Add BeaglePlay Linux Driver
dts: ti: k3-am625-beagleplay: Add beaglecc1352
.../devicetree/bindings/net/ti,cc1352p7.yaml | 51 ++
MAINTAINERS | 7 +
.../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 4 +
drivers/greybus/Kconfig | 10 +
drivers/greybus/Makefile | 2 +
drivers/greybus/gb-beagleplay.c | 501 ++++++++++++++++++
6 files changed, 575 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ti,cc1352p7.yaml
create mode 100644 drivers/greybus/gb-beagleplay.c
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
--
2.41.0
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
While there, use struct_size() helper, instead of the open-coded
version, to calculate the size for the allocation of the whole
flexible structure, including of course, the flexible-array member.
This code was found with the help of Coccinelle, and audited and
fixed manually.
Signed-off-by: Gustavo A. R. Silva <gustavoars(a)kernel.org>
---
drivers/staging/greybus/raw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/greybus/raw.c b/drivers/staging/greybus/raw.c
index a00978c8e1d2..b9c6eff7cdc1 100644
--- a/drivers/staging/greybus/raw.c
+++ b/drivers/staging/greybus/raw.c
@@ -29,7 +29,7 @@ struct gb_raw {
struct raw_data {
struct list_head entry;
u32 len;
- u8 data[];
+ u8 data[] __counted_by(len);
};
static const struct class raw_class = {
@@ -73,7 +73,7 @@ static int receive_data(struct gb_raw *raw, u32 len, u8 *data)
goto exit;
}
- raw_data = kmalloc(sizeof(*raw_data) + len, GFP_KERNEL);
+ raw_data = kmalloc(struct_size(raw_data, data, len), GFP_KERNEL);
if (!raw_data) {
retval = -ENOMEM;
goto exit;
--
2.34.1
BeagleConnect is both a technology concept and a line of board designs
that implement the technology. Born from Greybus, a mechanism for
dynamically extending a Linux system with embedded peripherals,
BeagleConnect adds two key elements: a 6LoWPAN transport and mikroBUS
manifests. The 6LoWPAN transport provides for arbitrary connections,
including the IEEE802.15.4g long-range wireless transport supported
between BeaglePlay and BeagleConnect Freedom (the first BeagleConnect
board design). The mikroBUS manifests provide for rapid prototyping
and low-node-count production with sensor boards following the
mikroBUS freely-licensable embedded bus standard such that existing
Linux drivers can be loaded upon Greybus discovery of the nodes.
This patch set provides the Linux-side hooks required for the 6LoWPAN
transport for BeagleConnect on BeaglePlay. Also adds required devicetree
additions.
Tested over `next-20230825`.
Link: https://programmershideaway.xyz/tags/gsoc23/ GSoC23 Blog
Link: https://git.beagleboard.org/gsoc/greybus/cc1352-firmware Zephyr App
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay GitHub Branch
Link: https://docs.beagleboard.org/latest/boards/beagleconnect/index.html BeagleConnect
Link: https://docs.beagleboard.org/latest/boards/beagleplay/index.html BeaglePlay
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay Github Repo
Link: https://lists.linaro.org/archives/list/greybus-dev@lists.linaro.org/thread/… Patch v6
Changes in Patch v7
v6 -> v7:
- Drop speed variable
- Fix commit message
- add clock-names and descriptions
- fix power lines
v5 -> v6:
- Rename compatible to `ti,cc1352p7`
- Fix formatting
- Use kerneldoc
- Add clocks, power-gpios, reset-gpios to dt bindings
v4 -> v5:
- Move DT Bindings to net
- Rename compatible to `beagle,play-cc1352`
- Expose CC1352 as MCU
- Remove redundant tracing messages
- Fix memory leaks
v3 -> v4:
- Add DT Bindings
- Reorder commits
- Improve commit messages
v2 -> v3:
- Move gb-beagleplay out of staging
v1 -> v2:
- Combine the driver into a single file
- Remove redundant code
- Fix Checkpatch complaints
- Other suggested changes
Ayush Singh (3):
dt-bindings: net: Add ti,cc1352p7
greybus: Add BeaglePlay Linux Driver
dts: ti: k3-am625-beagleplay: Add beaglecc1352
.../devicetree/bindings/net/ti,cc1352p7.yaml | 51 ++
MAINTAINERS | 7 +
.../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 4 +
drivers/greybus/Kconfig | 10 +
drivers/greybus/Makefile | 2 +
drivers/greybus/gb-beagleplay.c | 501 ++++++++++++++++++
6 files changed, 575 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ti,cc1352p7.yaml
create mode 100644 drivers/greybus/gb-beagleplay.c
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
--
2.41.0
BeagleConnect is both a technology concept and a line of board designs
that implement the technology. Born from Greybus, a mechanism for
dynamically extending a Linux system with embedded peripherals,
BeagleConnect adds two key elements: a 6LoWPAN transport and mikroBUS
manifests. The 6LoWPAN transport provides for arbitrary connections,
including the IEEE802.15.4g long-range wireless transport supported
between BeaglePlay and BeagleConnect Freedom (the first BeagleConnect
board design). The mikroBUS manifests provide for rapid prototyping
and low-node-count production with sensor boards following the
mikroBUS freely-licensable embedded bus standard such that existing
Linux drivers can be loaded upon Greybus discovery of the nodes.
This patch set provides the Linux-side hooks required for the 6LoWPAN
transport for BeagleConnect on BeaglePlay. Also adds required devicetree
additions.
Tested over `next-20230825`.
Link: https://programmershideaway.xyz/tags/gsoc23/ GSoC23 Blog
Link: https://git.beagleboard.org/gsoc/greybus/cc1352-firmware Zephyr App
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay GitHub Branch
Link: https://docs.beagleboard.org/latest/boards/beagleconnect/index.html BeagleConnect
Link: https://docs.beagleboard.org/latest/boards/beagleplay/index.html BeaglePlay
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay Github Repo
Link: https://lists.linaro.org/archives/list/greybus-dev@lists.linaro.org/thread/… Patch v5
Changes in Patch v6
v5 -> v6:
- Rename compatible to `ti,cc1352p7`
- Fix formatting
- Use kerneldoc
- Add clocks, power-gpios, reset-gpios to dt bindings
v4 -> v5:
- Move DT Bindings to net
- Rename compatible to `beagle,play-cc1352`
- Expose CC1352 as MCU
- Remove redundant tracing messages
- Fix memory leaks
v3 -> v4:
- Add DT Bindings
- Reorder commits
- Improve commit messages
v2 -> v3:
- Move gb-beagleplay out of staging
v1 -> v2:
- Combine the driver into a single file
- Remove redundant code
- Fix Checkpatch complaints
- Other suggested changes
Ayush Singh (3):
dt-bindings: Add beaglecc1352
greybus: Add BeaglePlay Linux Driver
dts: ti: k3-am625-beagleplay: Add beaglecc1352
.../devicetree/bindings/net/ti,cc1352p7.yaml | 48 ++
MAINTAINERS | 7 +
.../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 4 +
drivers/greybus/Kconfig | 10 +
drivers/greybus/Makefile | 2 +
drivers/greybus/gb-beagleplay.c | 495 ++++++++++++++++++
6 files changed, 566 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ti,cc1352p7.yaml
create mode 100644 drivers/greybus/gb-beagleplay.c
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
--
2.41.0
BeagleConnect is both a technology concept and a line of board designs
that implement the technology. Born from Greybus, a mechanism for
dynamically extending a Linux system with embedded peripherals,
BeagleConnect adds two key elements: a 6LoWPAN transport and mikroBUS
manifests. The 6LoWPAN transport provides for arbitrary connections,
including the IEEE802.15.4g long-range wireless transport supported
between BeaglePlay and BeagleConnect Freedom (the first BeagleConnect
board design). The mikroBUS manifests provide for rapid prototyping
and low-node-count production with sensor boards following the
mikroBUS freely-licensable embedded bus standard such that existing
Linux drivers can be loaded upon Greybus discovery of the nodes.
This patch set provides the Linux-side hooks required for the 6LoWPAN
transport for BeagleConnect on BeaglePlay. Also adds required devicetree
additions.
Tested over `next-20230825`.
Link: https://programmershideaway.xyz/tags/gsoc23/ GSoC23 Blog
Link: https://git.beagleboard.org/gsoc/greybus/cc1352-firmware Zephyr App
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay GitHub Branch
Link: https://lists.linaro.org/archives/list/greybus-dev@lists.linaro.org/thread/… Patch v4
Link: https://docs.beagleboard.org/latest/boards/beagleconnect/index.html BeagleConnect
Link: https://docs.beagleboard.org/latest/boards/beagleplay/index.html BeaglePlay
Link: https://github.com/Ayush1325/linux/tree/gb-beagleplay Github Repo
Changes in Patch v5
v4 -> v5:
- Move DT Bindings to net
- Rename compatible to `beagle,play-cc1352`
- Expose CC1352 as MCU
- Remove redundant tracing messages
- Fix memory leaks
v3 -> v4:
- Add DT Bindings
- Reorder commits
- Improve commit messages
v2 -> v3:
- Move gb-beagleplay out of staging
v1 -> v2:
- Combine the driver into a single file
- Remove redundant code
- Fix Checkpatch complaints
- Other suggested changes
Ayush Singh (3):
dt-bindings: Add beaglecc1352
greybus: Add BeaglePlay Linux Driver
dts: ti: k3-am625-beagleplay: Add beaglecc1352
.../bindings/net/beagle,play-cc1352.yaml | 25 +
MAINTAINERS | 7 +
.../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 4 +
drivers/greybus/Kconfig | 10 +
drivers/greybus/Makefile | 4 +-
drivers/greybus/gb-beagleplay.c | 526 ++++++++++++++++++
6 files changed, 574 insertions(+), 2 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/beagle,play-cc1352.yaml
create mode 100644 drivers/greybus/gb-beagleplay.c
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
--
2.41.0