public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] spi: cf_qspi: Use DIV_ROUND_UP at appropriate place
Date: Fri, 14 Jun 2013 20:40:15 +0530	[thread overview]
Message-ID: <51BB3257.6040504@gmail.com> (raw)
In-Reply-To: <51BB178E.9060803@ruggedcom.com>

On 14-06-2013 18:45, Richard Retanubun wrote:
> On 14/06/13 09:12 AM, Axel Lin wrote:
>> This change slightly improves readability.
>>
>> Signed-off-by: Axel Lin<axel.lin@ingics.com>
>> ---
>>   drivers/spi/cf_qspi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/spi/cf_qspi.c b/drivers/spi/cf_qspi.c
>> index a37ac4e..06bcf91 100644
>> --- a/drivers/spi/cf_qspi.c
>> +++ b/drivers/spi/cf_qspi.c
>> @@ -171,7 +171,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int
>> bitlen, const void *dout,
>>       volatile qspi_t *qspi = dev->regs;
>>       u8 *txbuf = (u8 *)dout;
>>       u8 *rxbuf = (u8 *)din;
>> -    u32 count = ((bitlen / 8) + (bitlen % 8 ? 1 : 0));
>> +    u32 count = DIV_ROUND_UP(bitlen, 8);
>>       u32 n, i = 0;
>>
>>       /* Sanitize arguments */
> ACK. Thanks for the cleanup.
>
> Signed-off-by: Richard Retanubun<richardretanubun@ruggedcom.com>

Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

--
Thanks,
Jagan.

  reply	other threads:[~2013-06-14 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14 13:12 [U-Boot] [PATCH 1/2] spi: cf_qspi: Use DIV_ROUND_UP at appropriate place Axel Lin
2013-06-14 13:13 ` [U-Boot] [PATCH 2/2] spi: mxc_spi: Use DIV_ROUND_UP at appropriate places Axel Lin
2013-06-14 15:11   ` Jagan Teki
2013-06-14 17:05     ` Jagan Teki
2013-06-14 13:15 ` [U-Boot] [PATCH 1/2] spi: cf_qspi: Use DIV_ROUND_UP at appropriate place Richard Retanubun
2013-06-14 15:10   ` Jagan Teki [this message]
2013-06-14 17:05     ` Jagan Teki

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=51BB3257.6040504@gmail.com \
    --to=jagannadh.teki@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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