Re: [2/3][PATCH][upstream] TDM Framework

2012-07-26 Thread Scott Wood
On 07/26/2012 04:28 PM, Timur Tabi wrote: > Michael Ellerman wrote: >> And the bible, K & R, includes an example of an enum which explicitly >> specifies all its values. It goes on to say "enumeration variables offer >> the chance of [type] checking and so are often better than #defines". > > I do

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-26 Thread Timur Tabi
Michael Ellerman wrote: > And the bible, K & R, includes an example of an enum which explicitly > specifies all its values. It goes on to say "enumeration variables offer > the chance of [type] checking and so are often better than #defines". I don't want to beat a dead horse here, but if the driv

RE: [2/3][PATCH][upstream] TDM Framework

2012-07-26 Thread Singh Sandeep-B37400
Hi, Please find my comment inline. Regards, Sandeep -Original Message- From: Tabi Timur-B04825 Sent: Tuesday, July 24, 2012 8:13 PM To: Singh Sandeep-B37400 Cc: linuxppc-dev@lists.ozlabs.org; Aggrwal Poonam-B10812 Subject: Re: [2/3][PATCH][upstream] TDM Framework Singh Sandeep-B37400

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-24 Thread Michael Ellerman
On Wed, 2012-07-25 at 02:40 +, Tabi Timur-B04825 wrote: > Michael Ellerman wrote: > > I agree these values are odd. But there's no rule that you can only use > > an enum if the values are monotonically increasing. > > > > It can still serve as helpful documentation, and reduce the number of > >

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-24 Thread Tabi Timur-B04825
Michael Ellerman wrote: > I agree these values are odd. But there's no rule that you can only use > an enum if the values are monotonically increasing. > > It can still serve as helpful documentation, and reduce the number of > places you pass a bare int around. IMHO, an enum should only be used i

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-24 Thread Michael Ellerman
On Tue, 2012-07-24 at 09:43 -0500, Timur Tabi wrote: > Singh Sandeep-B37400 wrote: > > >> +int tdm_adap_send(struct tdm_adapter *adap, void **buf, int count) { > >> + int res; > >> + > >> + if (adap->algo->tdm_write) > >> + res = adap->algo->tdm_write(adap, buf, count); >

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-24 Thread Timur Tabi
Singh Sandeep-B37400 wrote: >> +int tdm_adap_send(struct tdm_adapter *adap, void **buf, int count) { >> + int res; >> + >> + if (adap->algo->tdm_write) >> + res = adap->algo->tdm_write(adap, buf, count); > > Why does tdm_write() return a u32? And shouldn't 'res' also be

RE: [2/3][PATCH][upstream] TDM Framework

2012-07-24 Thread Singh Sandeep-B37400
][PATCH][upstream] TDM Framework On Mon, Jul 23, 2012 at 5:49 AM, wrote: > From: Sandeep Singh Please fix your git configuration so that the From: line in your emails contains your full name. This patch was sent with this From: line: From: It should say: From: Sandeep Singh Three m

Re: [2/3][PATCH][upstream] TDM Framework

2012-07-23 Thread Tabi Timur-B04825
On Mon, Jul 23, 2012 at 5:49 AM, wrote: > From: Sandeep Singh Please fix your git configuration so that the From: line in your emails contains your full name. This patch was sent with this From: line: From: It should say: From: Sandeep Singh Three more things: 1) You don't need to add

[2/3][PATCH][upstream] TDM Framework

2012-07-23 Thread b37400
From: Sandeep Singh TDM Framework is an attempt to provide a platform independent layer which can offer a standard interface for TDM access to different client modules. Beneath, the framework layer can house different types of TDM drivers to handle various TDM devices, the hardware intricacies o