public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Rajeev kumar <rajeev-dlh.kumar-qxv4g6HH51o@public.gmane.org>
To: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
Cc: "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Shiraz HASHIM <shiraz.hashim-qxv4g6HH51o@public.gmane.org>,
	Viresh KUMAR <viresh.kumar-qxv4g6HH51o@public.gmane.org>,
	Bhupesh SHARMA <bhupesh.sharma-qxv4g6HH51o@public.gmane.org>,
	Pratyush ANAND <pratyush.anand-qxv4g6HH51o@public.gmane.org>,
	Vipin KUMAR <vipin.kumar-qxv4g6HH51o@public.gmane.org>,
	Deepak SIKRI <deepak.sikri-qxv4g6HH51o@public.gmane.org>,
	Amit VIRDI <Amit.VIRDI-qxv4g6HH51o@public.gmane.org>,
	Vipul Kumar SAMAR <vipulkumar.samar-qxv4g6HH51o@public.gmane.org>,
	Armando VISCONTI <armando.visconti-qxv4g6HH51o@public.gmane.org>
Subject: Re: [PATCH V2] i2c-designware: Change readl to readw and writel to writew
Date: Mon, 24 Oct 2011 16:38:26 +0530	[thread overview]
Message-ID: <4EA5472A.1000400@st.com> (raw)
In-Reply-To: <20111024103316.GC26649-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>


Hi Baruch

On 10/24/2011 4:03 PM, Baruch Siach wrote:
> Hi Rajeev,
>
> On Mon, Oct 24, 2011 at 03:28:02PM +0530, Rajeev Kumar wrote:
>> Since I2C designware registers are 16 bit wide and so we should use
>> readw/writew.
>>
>> Signed-off-by: Rajeev Kumar<rajeev-dlh.kumar-qxv4g6HH51o@public.gmane.org>
>> ---
>>   drivers/i2c/busses/i2c-designware.c |  104 +++++++++++++++++-----------------
>>   1 files changed, 52 insertions(+), 52 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c
>> index 6eaa681..5149a10 100644
>> --- a/drivers/i2c/busses/i2c-designware.c
>> +++ b/drivers/i2c/busses/i2c-designware.c
>> @@ -216,11 +216,11 @@ struct dw_i2c_dev {
>>   	u32			abort_source;
>>   	int			irq;
>>   	struct i2c_adapter	adapter;
>> -	unsigned int		tx_fifo_depth;
>> -	unsigned int		rx_fifo_depth;
>> +	u16			tx_fifo_depth;
>> +	u16			rx_fifo_depth;
>>   };
>
> This looks wrong. The {tx,rx}_fifo_depth fields do not represent bit fields,
> but numbers. So unsigned int should be better here.

Yes, I agree with you, but I do not see any possibility of value of 
{tx,rx}_fifo_depth fields greater than 2^^16 - 1. So, would not it be 
better to keep them as u16 and save just 4 bytes.

~Rajeev

>
> baruch


>

  parent reply	other threads:[~2011-10-24 11:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24  9:58 [PATCH V2] i2c-designware: Change readl to readw and writel to writew Rajeev Kumar
     [not found] ` <1319450282-914-1-git-send-email-rajeev-dlh.kumar-qxv4g6HH51o@public.gmane.org>
2011-10-24 10:33   ` Baruch Siach
     [not found]     ` <20111024103316.GC26649-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
2011-10-24 11:08       ` Rajeev kumar [this message]
     [not found]         ` <4EA5472A.1000400-qxv4g6HH51o@public.gmane.org>
2011-10-24 12:23           ` Baruch Siach
     [not found]             ` <20111024122349.GD26649-MwjkAAnuF3khR1HGirfZ1z4kX+cae0hd@public.gmane.org>
2011-10-27  5:31               ` Rajeev kumar
     [not found]                 ` <4EA8ECB6.50600-qxv4g6HH51o@public.gmane.org>
2011-10-27  6:51                   ` 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=4EA5472A.1000400@st.com \
    --to=rajeev-dlh.kumar-qxv4g6hh51o@public.gmane.org \
    --cc=Amit.VIRDI-qxv4g6HH51o@public.gmane.org \
    --cc=armando.visconti-qxv4g6HH51o@public.gmane.org \
    --cc=baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org \
    --cc=bhupesh.sharma-qxv4g6HH51o@public.gmane.org \
    --cc=deepak.sikri-qxv4g6HH51o@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pratyush.anand-qxv4g6HH51o@public.gmane.org \
    --cc=shiraz.hashim-qxv4g6HH51o@public.gmane.org \
    --cc=vipin.kumar-qxv4g6HH51o@public.gmane.org \
    --cc=vipulkumar.samar-qxv4g6HH51o@public.gmane.org \
    --cc=viresh.kumar-qxv4g6HH51o@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox