[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ0pr190Lh74P_sj+BLm3-rwEJ64p+E0wtEU9JRev9TXYwo5FA@mail.gmail.com>
Date: Fri, 19 Aug 2011 19:49:20 +0200
From: Per Forlin <per.forlin@...aro.org>
To: Michal Nazarewicz <mina86@...a86.com>
Cc: Felipe Balbi <balbi@...com>,
Alan Stern <stern@...land.harvard.edu>,
Per Forlin <per.forlin@...ricsson.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linaro-dev@...ts.linaro.org, Greg Kroah-Hartman <gregkh@...e.de>
Subject: Re: [PATCH v5] usb: gadget: storage: make FSG_NUM_BUFFERS variable size
2011/8/19 Michal Nazarewicz <mina86@...a86.com>:
> On Fri, 19 Aug 2011 19:15:32 +0200, Per Forlin <per.forlin@...aro.org>
> wrote:
>
>> 2011/8/19 Michal Nazarewicz <mina86@...a86.com>:
>>>
>>> On Fri, 19 Aug 2011 16:28:25 +0200, Per Forlin
>>> <per.forlin@...ricsson.com>
>>> wrote:
>>>>
>>>> @@ -3605,6 +3608,9 @@ static int __init fsg_init(void)
>>>> int rc;
>>>> struct fsg_dev *fsg;
>>>> + if (!FSG_NUM_BUFFERS_IS_VALID(fsg_num_buffers))
>>>
>>> Care to add pr_err() here? Or better yet, change
>>> fsg_num_buffers_is_valid()
>>> to a function, eg.:
>>>
>>> static inline int fsg_num_buffers_validate()
>>> {
>>> if (fsg_num_buffers && fsg_num_buffers <= 4)
>>> return 0;
>>> pr_err("fsg_num_buffers too high: %u\n", fsg_num_buffers);
>>> return -EINVAL;
>>> }
>>>
>> Look good.
>> This will permit only 1 buffer to be used. Is this intentionally? I'm
>> fine with it.
>> In Kconfig the range is 2 to 4. For debug purposes there may be a
>> point of permitting range 1 to 4.
>
> Ah, sorry, no. I meant >= 2. Whether we want to allow a single buffer
> is another story (we might, why not?).
>
I stick with 2 to 4 in this patch. There may be other reasons for
permitting only 1 but for this patch it isn't relevant.
Thanks,
Per
> Best regards, _ _
> .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
> ..o | Computer Science, Michal "mina86" Nazarewicz (o o)
> ooo +-----<email/xmpp: mnazarewicz@...gle.com>-----ooO--(_)--Ooo--
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists