linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: huobean@gmail.com, alim.akhtar@samsung.com, avri.altman@wdc.com,
	asutoshd@codeaurora.org, jejb@linux.ibm.com,
	martin.petersen@oracle.com, stanley.chu@mediatek.com,
	beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] scsi; ufs: add device descriptor for Host Performance Booster
Date: Wed, 22 Apr 2020 16:11:41 -0700	[thread overview]
Message-ID: <6e092ac1-7e7d-3f12-8c81-b88369f1f621@acm.org> (raw)
In-Reply-To: <20200416203126.1210-2-beanhuo@micron.com>

On 4/16/20 1:31 PM, huobean@gmail.com wrote:
> +	if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) {

Please introduce a symbolic name instead of using the number 0x80 directly.

> +		hba->dev_info.hpb_control_mode =
> +			desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE];
> +		hba->dev_info.hpb_ver =
> +			(u16) (desc_buf[DEVICE_DESC_PARAM_HPB_VER] << 8) |
> +			desc_buf[DEVICE_DESC_PARAM_HPB_VER + 1];

Please use get_unaligned_be16() instead of open-coding it.

Thanks,

Bart.

  reply	other threads:[~2020-04-22 23:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 20:31 [PATCH v2 0/5] UFS Host Performance Booster (HPB v1.0) driver huobean
2020-04-16 20:31 ` [PATCH v2 1/5] scsi; ufs: add device descriptor for Host Performance Booster huobean
2020-04-22 23:11   ` Bart Van Assche [this message]
2020-04-23 11:01     ` [EXT] " Bean Huo (beanhuo)
2020-04-23 17:57       ` Bart Van Assche
2020-04-16 20:31 ` [PATCH v2 2/5] scsi: ufs: make ufshcd_read_unit_desc_param() non-static func huobean
2020-04-16 20:31 ` [PATCH v2 3/5] scsi: ufs: add ufs_features parameter in structure ufs_dev_info huobean
2020-04-22 23:13   ` Bart Van Assche
2020-04-16 20:31 ` [PATCH v2 4/5] scsi: ufs: add unit and geometry parameters for HPB huobean
2020-04-16 20:31 ` [PATCH v2 5/5] scsi: ufs: UFS Host Performance Booster(HPB) driver huobean
2020-04-16 21:35   ` Randy Dunlap
2020-04-23  0:00   ` Bart Van Assche
2020-04-24  9:51     ` [EXT] " Bean Huo (beanhuo)
2020-04-24 18:17     ` Avri Altman
2020-04-24 20:02       ` [EXT] " Bean Huo (beanhuo)
2020-04-25  8:59       ` Avri Altman
2020-04-25 17:51         ` Bart Van Assche
2020-04-27  6:13           ` Avri Altman
2020-04-28  3:36             ` Bart Van Assche
2020-04-28  8:14               ` Avri Altman
2020-04-28 11:59                 ` Bean Huo
2020-04-30  7:23                   ` Avri Altman
2020-04-30 12:45                     ` Bean Huo
2020-05-02 16:19                       ` Avri Altman
2020-04-28  9:12               ` Bean Huo
2020-04-25 18:07   ` Bart Van Assche
2020-04-26 22:03     ` Bean Huo
2020-04-22  6:43 ` [PATCH v2 0/5] UFS Host Performance Booster (HPB v1.0) driver Christoph Hellwig
2020-04-22 22:09   ` [EXT] " Bean Huo (beanhuo)
2020-04-23  8:26     ` Avri Altman

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=6e092ac1-7e7d-3f12-8c81-b88369f1f621@acm.org \
    --to=bvanassche@acm.org \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=huobean@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    --cc=tomas.winkler@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).