public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Johan Hovold <johan@kernel.org>
Cc: "Liu.Zhao" <lzsos369@163.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, konstantin@linuxfoundation.org,
	398817832@qq.com, 278883616@qq.com, yang.haojun3@zte.com.cn
Subject: Re: [PATCH v3 1/1] USB:option:add ZTE PIDs
Date: Mon, 24 Aug 2015 09:51:33 +0200	[thread overview]
Message-ID: <87a8th6s56.fsf@nemi.mork.no> (raw)
In-Reply-To: <20150824072636.GD14209@localhost> (Johan Hovold's message of "Mon, 24 Aug 2015 09:26:36 +0200")

Johan Hovold <johan@kernel.org> writes:
> On Wed, Aug 19, 2015 at 08:51:17AM -0700, Liu.Zhao wrote:
>> 
>>  #define BENQ_VENDOR_ID				0x04a5
>>  #define BENQ_PRODUCT_H10			0x4068
>> @@ -544,6 +548,14 @@ static const struct option_blacklist_info zte_mc2716_z_blacklist = {
>>  	.sendsetup = BIT(1) | BIT(2) | BIT(3),
>>  };
>>  
>> +static const struct option_blacklist_info zte_me3620andzm8620_xl_blacklist = {
>> +	.reserved = BIT(3) | BIT(4) | BIT(5),
>> +};
>
> Use two structs for this: zte_me3620_blacklist and zm8620_xl_blacklist
> even if they reserve the same ports.

Why?  Wouldn't it be better to merge all identical lists and give them
structured names describing their contents instead?  E.g.

 static const struct option_blacklist_info bi_s0001_r = {
        .sendsetup = BIT(0) | BIT(1),
 };

 static const struct option_blacklist_info bi_s0001_r04 = {
        .sendsetup = BIT(0) | BIT(1),
        .reserved = BIT(4),
 };

 static const struct option_blacklist_info bi_s_r030405 =  {
	.reserved = BIT(3) | BIT(4) | BIT(5),
 };


etc.  Or some other naming scheme.

I don't see the point of having lots of identical structs just to be
able to name them after some rarely meaningful marketing name.  Many
vendors recycle their pids, making this completely futile.


Bjørn

  reply	other threads:[~2015-08-24  7:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 15:51 [PATCH v3 1/1] USB:option:add ZTE PIDs Liu.Zhao
2015-08-24  7:26 ` Johan Hovold
2015-08-24  7:51   ` Bjørn Mork [this message]
2015-08-24 12:31     ` Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2015-10-07  2:10 Liu.Zhao
2015-10-08 11:58 ` Johan Hovold
2015-08-24 15:36 Liu.Zhao
2015-09-14  7:56 ` Johan Hovold
2015-08-18 17:56 Liu.Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8th6s56.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=278883616@qq.com \
    --cc=398817832@qq.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lzsos369@163.com \
    --cc=yang.haojun3@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox