From: Oliver Neukum <oneukum@suse.com>
To: Mikhail Zaytsev <flashed@mail.ru>
Cc: Johan Hovold <johan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl
Date: Wed, 13 Dec 2017 12:40:48 +0100 [thread overview]
Message-ID: <1513165248.26281.11.camel@suse.com> (raw)
Am Mittwoch, den 13.12.2017, 14:31 +0300 schrieb Mikhail Zaytsev:
> On Wed, 13 Dec 2017 11:17:28 +0100 Oliver Neukum <oneukum@suse.com> wrote:
>
> >
> > Am Mittwoch, den 13.12.2017, 12:30 +0300 schrieb Mikhail Zaytsev:
> > >
> > > +#define RS232_VENDOR 0x6547
> > > +#define RS232_PRODUCT 0x0232
> > > +#define IRDA_VENDOR 0x18ec
> > > +#define IRDA_PRODUCT 0x3118
> > >
> > > /* usb timeout of 1 second */
> > > #define ARK_TIMEOUT 1000
> > >
> > > static const struct usb_device_id id_table[] = {
> > > - { USB_DEVICE(0x6547, 0x0232) },
> > > - { USB_DEVICE(0x18ec, 0x3118) }, /* USB to IrDA adapter */
> > > + { USB_DEVICE(RS232_VENDOR, RS232_PRODUCT) },
> > > + { USB_DEVICE(IRDA_VENDOR, IRDA_PRODUCT) }, /* USB to IrDA adapter */
> >
> > Hi,
> >
> > what is the purpose of this change? It just makes it harder to grep.
> > The constants are arbitrary and they are clearly device IDs.
>
> The constants are using in several places.
> I think the names easier to read.
They give you nothing. If you are looking at a vendor ID nothing but the
bare number makes sense. You are just making peoples' life harder when
they have to look up that definition. A symbolic name is fine if it gives
meaning. Even if the information you give is that the value is magic
and therefore not understood. But a vendor ID is an arbitrary yet
meaningful number. There is no point in hiding it.
Regards
Oliver
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-12-13 11:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 11:40 Oliver Neukum [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-13 16:43 USB: serial: ark3116.c: Remove unused TIOCSSERIAL case from ioctl Mikhail Zaytsev
2017-12-13 14:39 Oliver Neukum
2017-12-13 13:44 Mikhail Zaytsev
2017-12-13 12:30 Mikhail Zaytsev
2017-12-13 11:31 Mikhail Zaytsev
2017-12-13 11:24 Johan Hovold
2017-12-13 10:17 Oliver Neukum
2017-12-13 9:30 Mikhail Zaytsev
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=1513165248.26281.11.camel@suse.com \
--to=oneukum@suse.com \
--cc=flashed@mail.ru \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).