From: Bart Van Assche <bvanassche@acm.org>
To: WangYuli <wangyuli@uniontech.com>,
James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
zhanjun@uniontech.com, guanwentao@uniontech.com,
chenlinxuan@uniontech.com, Xinwei Zhou <zhouxinwei@uniontech.com>,
Xu Rao <raoxu@uniontech.com>,
Yujing Ming <mingyujing@uniontech.com>
Subject: Re: [PATCH v2] scsi: Bypass certain SCSI commands on disks with "use_192_bytes_for_3f" attribute
Date: Fri, 7 Feb 2025 09:51:05 -0800 [thread overview]
Message-ID: <ad4bd008-8d0d-439b-879c-e9cf4c89ec56@acm.org> (raw)
In-Reply-To: <5653B7D4FD7224D2+20250207091723.258095-1-wangyuli@uniontech.com>
On 2/7/25 1:17 AM, WangYuli wrote:
> + /* Bofore we queue this comman, check attribute use_192_bytes_for_3f */
Please replace this source code comment with a comment that explains why
the code below is necessary. The above comment duplicates the code below
rather than explaining something that cannot be derived from the code
easily. Additionally, there are spelling errors in the above comment.
> + if (cmd->cmnd[0] == MODE_SENSE && sdev->use_192_bytes_for_3f == 1 &&
Please remove "== 1" because this part is redundant when using a single
bit in a boolean "and" expression.
> + cmd->result = (DID_ABORT << 16);
Please remove the superfluous parentheses from the above statement.
Thanks,
Bart.
prev parent reply other threads:[~2025-02-07 17:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 9:17 [PATCH v2] scsi: Bypass certain SCSI commands on disks with "use_192_bytes_for_3f" attribute WangYuli
2025-02-07 17:51 ` Bart Van Assche [this message]
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=ad4bd008-8d0d-439b-879c-e9cf4c89ec56@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=chenlinxuan@uniontech.com \
--cc=gregkh@linuxfoundation.org \
--cc=guanwentao@uniontech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mingyujing@uniontech.com \
--cc=raoxu@uniontech.com \
--cc=stern@rowland.harvard.edu \
--cc=wangyuli@uniontech.com \
--cc=zhanjun@uniontech.com \
--cc=zhouxinwei@uniontech.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