All of lore.kernel.org
 help / color / mirror / Atom feed
From: "sayali" <sayalil@codeaurora.org>
To: "'Bart Van Assche'" <Bart.VanAssche@wdc.com>,
	<vinholikatti@gmail.com>, <asutoshd@codeaurora.org>,
	<evgreen@chromium.org>, <cang@codeaurora.org>,
	<martin.petersen@oracle.com>, <subhashj@codeaurora.org>,
	<vivek.gautam@codeaurora.org>, <rnayak@codeaurora.org>,
	<jejb@linux.vnet.ibm.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH V1 2/3] scsi: ufs: Add ufs provisioning support
Date: Wed, 6 Jun 2018 16:17:14 +0530	[thread overview]
Message-ID: <000d01d3fd83$bee3ce60$3cab6b20$@codeaurora.org> (raw)
In-Reply-To: <39ab956b95a645c6e63eb9713ea9547fdc265a22.camel@wdc.com>

-----Original Message-----
From: Bart Van Assche [mailto:Bart.VanAssche@wdc.com] 
Sent: Monday, June 04, 2018 2:48 PM
To: vinholikatti@gmail.com; asutoshd@codeaurora.org; sayalil@codeaurora.org; evgreen@chromium.org; cang@codeaurora.org; martin.petersen@oracle.com; subhashj@codeaurora.org; vivek.gautam@codeaurora.org; rnayak@codeaurora.org; jejb@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH V1 2/3] scsi: ufs: Add ufs provisioning support

On Fri, 2018-06-01 at 16:12 +0530, Sayali Lokhande wrote:
> +	qTotalRawDeviceCapacity =
> +		(uint64_t)geo_buf[0x0b] | ((uint64_t)geo_buf[0x0a] << 8) |
> +		((uint64_t)geo_buf[0x09] << 16) |
> +		((uint64_t)geo_buf[0x08] << 24) |
> +		((uint64_t)geo_buf[0x07] << 32) |
> +		((uint64_t)geo_buf[0x06] << 40) |
> +		((uint64_t)geo_buf[0x05] << 48) |
> +		((uint64_t)geo_buf[0x04] << 56);
> +	wEnhanced1CapAdjFac =
> +		(uint16_t)geo_buf[0x31] | ((uint16_t)geo_buf[0x30] << 8);

Please use get_unaligned_be*() instead of open-coding these functions.
[Sayali]Agreed. Will update.

> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 24) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 16) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 8) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits) & 0xff;

Please use put_unaligned_be() instead of open-coding this function.
[Sayali]Agreed. Will update.

Thanks,

Bart.

WARNING: multiple messages have this Message-ID (diff)
From: "sayali" <sayalil@codeaurora.org>
To: 'Bart Van Assche' <Bart.VanAssche@wdc.com>,
	vinholikatti@gmail.com, asutoshd@codeaurora.org,
	evgreen@chromium.org, cang@codeaurora.org,
	martin.petersen@oracle.com, subhashj@codeaurora.org,
	vivek.gautam@codeaurora.org, rnayak@codeaurora.org,
	jejb@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: RE: [PATCH V1 2/3] scsi: ufs: Add ufs provisioning support
Date: Wed, 6 Jun 2018 16:17:14 +0530	[thread overview]
Message-ID: <000d01d3fd83$bee3ce60$3cab6b20$@codeaurora.org> (raw)
In-Reply-To: <39ab956b95a645c6e63eb9713ea9547fdc265a22.camel@wdc.com>

-----Original Message-----
From: Bart Van Assche [mailto:Bart.VanAssche@wdc.com] 
Sent: Monday, June 04, 2018 2:48 PM
To: vinholikatti@gmail.com; asutoshd@codeaurora.org; sayalil@codeaurora.org; evgreen@chromium.org; cang@codeaurora.org; martin.petersen@oracle.com; subhashj@codeaurora.org; vivek.gautam@codeaurora.org; rnayak@codeaurora.org; jejb@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH V1 2/3] scsi: ufs: Add ufs provisioning support

On Fri, 2018-06-01 at 16:12 +0530, Sayali Lokhande wrote:
> +	qTotalRawDeviceCapacity =
> +		(uint64_t)geo_buf[0x0b] | ((uint64_t)geo_buf[0x0a] << 8) |
> +		((uint64_t)geo_buf[0x09] << 16) |
> +		((uint64_t)geo_buf[0x08] << 24) |
> +		((uint64_t)geo_buf[0x07] << 32) |
> +		((uint64_t)geo_buf[0x06] << 40) |
> +		((uint64_t)geo_buf[0x05] << 48) |
> +		((uint64_t)geo_buf[0x04] << 56);
> +	wEnhanced1CapAdjFac =
> +		(uint16_t)geo_buf[0x31] | ((uint16_t)geo_buf[0x30] << 8);

Please use get_unaligned_be*() instead of open-coding these functions.
[Sayali]Agreed. Will update.

> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 24) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 16) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits >> 8) & 0xff;
> +		*pt++ = (cfg->unit[i].dNumAllocUnits) & 0xff;

Please use put_unaligned_be() instead of open-coding this function.
[Sayali]Agreed. Will update.

Thanks,

Bart.

  reply	other threads:[~2018-06-06 10:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1527849774-7623-1-git-send-email-sayalil@codeaurora.org>
2018-06-01 10:42 ` [PATCH V1 1/3] scsi: ufs: set the device reference clock setting Sayali Lokhande
2018-06-01 10:42   ` Sayali Lokhande
2018-06-01 12:29   ` Adrian Hunter
2018-06-01 13:11     ` sayali
2018-06-01 13:11       ` sayali
2018-06-01 13:17       ` Adrian Hunter
2018-06-01 13:34         ` sayali
2018-06-01 13:34           ` sayali
2018-06-02  5:33   ` Kyuho Choi
2018-06-05 10:48     ` sayali
2018-06-05 10:48       ` sayali
2018-06-01 10:42 ` [PATCH V1 2/3] scsi: ufs: Add ufs provisioning support Sayali Lokhande
2018-06-01 10:42   ` Sayali Lokhande
2018-06-02  6:36   ` Kyuho Choi
2018-06-05 10:54     ` sayali
2018-06-05 10:54       ` sayali
2018-06-04  9:17   ` Bart Van Assche
2018-06-06 10:47     ` sayali [this message]
2018-06-06 10:47       ` sayali
2018-06-01 10:42 ` [PATCH V1 3/3] scsi: ufs: Add sysfs support for ufs provision Sayali Lokhande
2018-06-01 10:42   ` Sayali Lokhande
2018-06-01 10:49   ` sayali
2018-06-01 10:49     ` sayali
2018-06-04 15:41     ` Evan Green
     [not found]   ` <MWHPR04MB113794E2654BEDA8E927F0FC9A660@MWHPR04MB1137.namprd04.prod.outlook.com>
2018-06-05  8:42     ` Greg Kroah-Hartman
2018-06-08 10:55       ` sayali
2018-06-08 10:55         ` sayali

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='000d01d3fd83$bee3ce60$3cab6b20$@codeaurora.org' \
    --to=sayalil@codeaurora.org \
    --cc=Bart.VanAssche@wdc.com \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=evgreen@chromium.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=rnayak@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    --cc=vivek.gautam@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.