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] [day] [month] [year] [list]
Message-ID: <20250729194150.1985404b@jic23-huawei>
Date: Tue, 29 Jul 2025 19:41:50 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>, sboyd@...nel.org,
 dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org, arnd@...db.de,
 gregkh@...uxfoundation.org, srini@...nel.org, vkoul@...nel.org,
 kishon@...nel.org, sre@...nel.org, krzysztof.kozlowski@...aro.org,
 u.kleine-koenig@...libre.com, linux-arm-msm@...r.kernel.org,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-phy@...ts.infradead.org, linux-pm@...r.kernel.org,
 kernel@...labora.com, wenst@...omium.org, casey.connolly@...aro.org
Subject: Re: [PATCH v2 1/7] spmi: Implement spmi_subdevice_alloc_and_add()
 and devm variant


> >> +/**
> >> + * struct spmi_subdevice - Basic representation of an SPMI sub-device
> >> + * @sdev:	Sub-device representation of an SPMI device
> >> + * @devid:	Platform Device ID of an SPMI sub-device
> >> + */
> >> +struct spmi_subdevice {
> >> +	struct spmi_device	sdev;  
> > 
> > Having something called a subdevice containing an instance of a device
> > does seem a little odd.  Maybe the spmi_device naming is inappropriate after
> > this patch?
> >   
> 
> A SPMI Sub-Device is a SPMI Device on its own, but one that is child of a device.
> 
> Controller -> Device -> Sub-Device
> 
> Before this version, I initially added devid to spmi_device, but that felt wrong
> because:
>   1. Sub-devices are children of devices (though, still also devices themselves)
>   2. The devid field would be useless in "main" SPMI devices (struct spmi_device)
>      and would not only waste (a very small amount of) memory for each device but,
>      more importantly, would confuse people with an unused field there.
> 
> So, this defines a SPMI Sub-Device as an extension of a SPMI Device, where:
>   - Device has controller-device numbers
>   - Sub-device has controller-device.subdev_id numbers.
> 
> I don't really see any cleaner way of defining this, but I am completely open to
> any idea :-)
I was thinking it was a specialization at the same level as the old spmi_device
(not it's child). As a child this is fine.

Just showing my complete lack of knowledge of the SPMI code :)

Jonathan

> 
> Cheers,
> Angelo
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ