From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
To: "Pietrek,
Markus" <Markus.Pietrek-BU0Y/NROKIiELgA04lAiVw@public.gmane.org>
Cc: "spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
<spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] added drivers/spi/spi_board_info_cmdline for setting up an spi_board_info structure on commandline
Date: Sun, 31 Jan 2010 01:06:30 +0200 [thread overview]
Message-ID: <20100130230629.GA2634@tarshish> (raw)
In-Reply-To: <95F51F4B902CAC40AF459205F6322F0171E8D49880-76KB/CMpcTeJqUQdFWzYuOuPKLVQfWtC@public.gmane.org>
Hi Pietrek,
On Fri, Jan 29, 2010 at 02:48:29PM +0100, Pietrek, Markus wrote:
[snip]
> + else if (!strcmp(opt, "cs"))
> + info->mode |= SPI_CS_HIGH;
The name of this option should be "cs_high" in my opinion.
> + else if (!strcmp(opt, "lsb"))
> + info->mode |= SPI_LSB_FIRST;
> + else if (!strcmp(opt, "3wire"))
> + info->mode |= SPI_3WIRE;
> + else if (!strcmp(opt, "loop"))
> + info->mode |= SPI_LOOP;
> + else if (!strcmp(opt, "no_cs"))
> + info->mode |= SPI_NO_CS;
> + else if (!strcmp(opt, "ready"))
> + info->mode |= SPI_READY;
> + else {
> + pr_err(DRIVER_NAME ": Don't know value %s\n", opt);
> + kfree(info);
> + return -1;
> + }
For the sake of future compatibility I think we should ignore unknown options,
and print a message along the lines of "Unknown option %s, ignoring".
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
next prev parent reply other threads:[~2010-01-30 23:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-29 13:48 [PATCH] added drivers/spi/spi_board_info_cmdline for setting up an spi_board_info structure on commandline Pietrek, Markus
[not found] ` <95F51F4B902CAC40AF459205F6322F0171E8D49880-76KB/CMpcTeJqUQdFWzYuOuPKLVQfWtC@public.gmane.org>
2010-01-30 23:06 ` Baruch Siach [this message]
2010-02-02 15:08 ` [PATCH] spi_board_info_cmdline.c: unknown command line options are ignored and all options have a name instead of being anonymous Pietrek, Markus
[not found] ` <95F51F4B902CAC40AF459205F6322F0171E8D499AC-76KB/CMpcTeJqUQdFWzYuOuPKLVQfWtC@public.gmane.org>
2010-02-03 17:39 ` Grant Likely
2010-02-04 5:58 ` Baruch Siach
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=20100130230629.GA2634@tarshish \
--to=baruch-nswtu9s1w3p6gbpvegmw2w@public.gmane.org \
--cc=Markus.Pietrek-BU0Y/NROKIiELgA04lAiVw@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.