lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50a0de57-db28-424a-915d-fc6e00ae4758@linaro.org>
Date:   Tue, 3 Oct 2023 10:25:05 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Ayush Singh <ayushdevel1325@...il.com>,
        greybus-dev@...ts.linaro.org
Cc:     devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org, vaishnav@...gleboard.org,
        jkridner@...gleboard.org, nm@...com,
        krzysztof.kozlowski+dt@...aro.org, johan@...nel.org,
        elder@...nel.org
Subject: Re: [PATCH v6 2/3] greybus: Add BeaglePlay Linux Driver

On 02/10/2023 20:24, Ayush Singh wrote:
> Add the Greybus host driver for BeaglePlay board by BeagleBoard.org.
> 
> The current greybus setup involves running SVC in a user-space
> application (GBridge) and using netlink to communicate with kernel
> space. GBridge itself uses wpanusb kernel driver, so the greybus messages
> travel from kernel space (gb_netlink) to user-space (GBridge) and then
> back to kernel space (wpanusb) before reaching CC1352.
> 
> This driver directly communicates with CC1352 (running SVC Zephyr
> application). Thus, it simplifies the complete greybus setup eliminating
> user-space GBridge.
> 

...

Thank you for your patch. There is something to discuss/improve.

> +
> +static int gb_serdev_init(struct gb_beagleplay *bg)
> +{
> +	u32 speed = 115200;
> +	int ret;
> +
> +	serdev_device_set_drvdata(bg->sd, bg);
> +	serdev_device_set_client_ops(bg->sd, &gb_beagleplay_ops);
> +	ret = serdev_device_open(bg->sd);
> +	if (ret)
> +		return dev_err_probe(&bg->sd->dev, ret, "Unable to open serial device");
> +
> +	speed = serdev_device_set_baudrate(bg->sd, speed);

Unused value speed. Probably this results in warnings. Plus it is a
confusing code. Check the return value if it is relevant. If it can be
ignored, skip assignment and drop "speed" variable.

Rest looks okay to me after glance (I did not perform full review).


> +	serdev_device_set_flow_control(bg->sd, false);
> +
> +	return 0;
> +}
> +
> +static int gb_beagleplay_probe(struct serdev_device *serdev)
> +{
> +	int ret = 0;
> +	struct gb_beagleplay *bg;
> +
> +	bg = devm_kmalloc(&serdev->dev, sizeof(*bg), GFP_KERNEL);
> +	if (!bg)
> +		return -ENOMEM;
> +
Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ