Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Christoph Hellwig
On Wed, Jan 02, 2008 at 02:18:27PM +0200, Boaz Harrosh wrote: > > But yes, this is one of the rare cases where a typedef makes sense, > > but ???'d call it osd_off_t or something like that. > > > > You mean osd_cdb_offset_t. I thought of dropping that _t, I hate it, > just a personal preference.

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Boaz Harrosh
On Wed, Jan 02 2008 at 12:08 +0200, Christoph Hellwig <[EMAIL PROTECTED]> wrote: > On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: >> I have this code: >> >> >> /* >> * osd-r10 4.12.5 Data-In and Data-Out buffer offsets >> * byte offset = mantissa * (2^(exponent+8)) >> */ >>

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Christoph Hellwig
On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: > I have this code: > > > /* > * osd-r10 4.12.5 Data-In and Data-Out buffer offsets > * byte offset = mantissa * (2^(exponent+8)) > */ > typedef __be32 osd_cdb_offset; Given that you can't do normal arithmetic on this type it

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Andy Whitcroft
On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: > I have this code: > > > /* > * osd-r10 4.12.5 Data-In and Data-Out buffer offsets > * byte offset = mantissa * (2^(exponent+8)) > */ > typedef __be32 osd_cdb_offset; > > osd_cdb_offset __osd_encode_offset(u64 offset, unsigned

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Andy Whitcroft
On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: I have this code: c_code /* * osd-r10 4.12.5 Data-In and Data-Out buffer offsets * byte offset = mantissa * (2^(exponent+8)) */ typedef __be32 osd_cdb_offset; osd_cdb_offset __osd_encode_offset(u64 offset, unsigned

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Christoph Hellwig
On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: I have this code: c_code /* * osd-r10 4.12.5 Data-In and Data-Out buffer offsets * byte offset = mantissa * (2^(exponent+8)) */ typedef __be32 osd_cdb_offset; Given that you can't do normal arithmetic on this type it

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Boaz Harrosh
On Wed, Jan 02 2008 at 12:08 +0200, Christoph Hellwig [EMAIL PROTECTED] wrote: On Tue, Jan 01, 2008 at 06:15:46PM +0200, Boaz Harrosh wrote: I have this code: c_code /* * osd-r10 4.12.5 Data-In and Data-Out buffer offsets * byte offset = mantissa * (2^(exponent+8)) */ typedef __be32

Re: WARNING: do not add new typedefs - is that for real?

2008-01-02 Thread Christoph Hellwig
On Wed, Jan 02, 2008 at 02:18:27PM +0200, Boaz Harrosh wrote: But yes, this is one of the rare cases where a typedef makes sense, but ???'d call it osd_off_t or something like that. You mean osd_cdb_offset_t. I thought of dropping that _t, I hate it, just a personal preference. No, I

WARNING: do not add new typedefs - is that for real?

2008-01-01 Thread Boaz Harrosh
I have this code: /* * osd-r10 4.12.5 Data-In and Data-Out buffer offsets * byte offset = mantissa * (2^(exponent+8)) */ typedef __be32 osd_cdb_offset; osd_cdb_offset __osd_encode_offset(u64 offset, unsigned *padding, int min_shift, int max_shift); struct osd_attributes_list_mode {

WARNING: do not add new typedefs - is that for real?

2008-01-01 Thread Boaz Harrosh
I have this code: c_code /* * osd-r10 4.12.5 Data-In and Data-Out buffer offsets * byte offset = mantissa * (2^(exponent+8)) */ typedef __be32 osd_cdb_offset; osd_cdb_offset __osd_encode_offset(u64 offset, unsigned *padding, int min_shift, int max_shift); struct