From: Bart Van Assche <bvanassche@acm.org>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>
Cc: "CC Chou (周志杰)" <cc.chou@mediatek.com>,
"quic_ziqichen@quicinc.com" <quic_ziqichen@quicinc.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Chaotian Jing (井朝天)" <Chaotian.Jing@mediatek.com>,
"Qilin Tan (谭麒麟)" <Qilin.Tan@mediatek.com>,
"Lin Gui (桂林)" <Lin.Gui@mediatek.com>,
"Yi-fan Peng (彭羿凡)" <Yi-fan.Peng@mediatek.com>,
"Jiajie Hao (郝加节)" <jiajie.hao@mediatek.com>,
"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
"Ed Tsai (蔡宗軒)" <Ed.Tsai@mediatek.com>,
wsd_upstream <wsd_upstream@mediatek.com>,
"Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>,
"Tun-yu Yu (游敦聿)" <Tun-yu.Yu@mediatek.com>
Subject: Re: [PATCH v1] ufs: core: fix hwq_id type and value
Date: Wed, 7 May 2025 12:26:54 -0700 [thread overview]
Message-ID: <95235015-270d-451e-989c-9fddcbfcb97e@acm.org> (raw)
In-Reply-To: <6c9e983154ff8d9b4a1e63eb503e8b147303eb68.camel@mediatek.com>
On 5/6/25 9:03 PM, Peter Wang (王信友) wrote:
> Whether it is necessary or not depends on how we define 'necessary.'
> If the criterion is simply to avoid errors, then indeed, this patch
> is not necessary. However, if we are addressing the warning caused
> by incorrect behavior (assigning int to u32), then it is necessary
> to fix it. After all, we shouldn't just be satisfied with avoiding
> errors, we should strive to make the Linux kernel as perfect as
> possible, shouldn't we?
Errors? Which errors? Using -1 instead of UINT_MAX is common in C code.
Assigning variables of signed integer type to unsigned variables is also
widespread. Using %d to format a negative number, although dubious, is
also common in C code. Several years ago gcc warned about using %d to
format unsigned integers. That warning was disabled again because there
is too much existing code that follows this practice.
> Additionally, there are many ways to determine whether MCQ is enabled,
> including reading the host capability or checking hba->mcq_enabled,
> etc.
> Moreover, MCQ is not a feature that trun on and off at runtime.
> It is at the end of the UFS initialization that the status of MCQ
> is determined, so it shouldn't be necessary to rely on this to
> determine whether MCQ is enabled, right?
If you want to proceed with this patch, please make it clear in the
patch description that this patch is a behavior change and not a bug
fix.
Thanks,
Bart.
next prev parent reply other threads:[~2025-05-07 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 12:39 [PATCH v1] ufs: core: fix hwq_id type and value peter.wang
2025-05-06 16:15 ` Bart Van Assche
2025-05-07 4:03 ` Peter Wang (王信友)
2025-05-07 19:26 ` Bart Van Assche [this message]
2025-05-08 9:12 ` Peter Wang (王信友)
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=95235015-270d-451e-989c-9fddcbfcb97e@acm.org \
--to=bvanassche@acm.org \
--cc=Alice.Chao@mediatek.com \
--cc=Chaotian.Jing@mediatek.com \
--cc=Chun-hung.Wu@mediatek.com \
--cc=Ed.Tsai@mediatek.com \
--cc=Lin.Gui@mediatek.com \
--cc=Naomi.Chu@mediatek.com \
--cc=Qilin.Tan@mediatek.com \
--cc=Tun-yu.Yu@mediatek.com \
--cc=Yi-fan.Peng@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=cc.chou@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=quic_ziqichen@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=wsd_upstream@mediatek.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