[OpenWrt-Devel] [PATCH] treewide: use "model" instead of ambiguous "boardname" in 01_leds

mail at adrianschmutzler.de mail at adrianschmutzler.de
Fri May 22 12:50:46 EDT 2020


Hi again,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Matthias Schiffer
> Sent: Donnerstag, 21. Mai 2020 20:14
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> Cc: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] treewide: use "model" instead of
> ambiguous "boardname" in 01_leds
> 
> On 5/21/20 8:01 PM, Adrian Schmutzler wrote:
> > At the moment, several board.d/01_leds files use a variable for the
> > model part of their label. For historic reasons, this is called
> > "boardname", though when a vendor is present in the result of the
> > board_name function, it's only the model part of this result.
> >
> > To signal this difference of the variable compared to the board_name
> > function, let's just rename it to "model", as it contains the model
> > part of the board name/compatible.
> >
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> 
> I don't think model is a good choice for the variable name: "model" is
> generally used to refer to a human-readable device identification, both in
> device trees, and in OpenWrt's sysinfo.
> 
> Maybe simply call it "device"? Or leave it as is, I'm not really convinced
> this needs to be changed.

I've thought about a better name (actually more than the subject is worth ... ), but to me the only really appropriate term is actually "model", even more now that I've considered other options.

After all, that's exactly the term referring to the part of a "device name" excluding the vendor, and there no other one close to it. As stated earlier, that's also why we used it for DEVICE_MODEL.
Even device-tree specs admit this in their model property section:

"The recommended format is: "manufacturer,model", where manufacturer is a string describing the name of the manufacturer (such as a stock ticker symbol), and model specifies the model number."

So, I'd like to keep the patch this way.

Best

Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200522/6ec33fa0/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list