From: Bart Van Assche <bvanassche@acm.org>
To: Chanwoo Lee <cw9316.lee@samsung.com>,
stanley.chu@mediatek.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, matthias.bgg@gmail.com,
linux-scsi@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] scsi: ufs: ufs-mediatek: Modify the return value
Date: Fri, 18 Nov 2022 09:30:04 -0800 [thread overview]
Message-ID: <db25901b-8537-ca16-aaac-0daaa636d84d@acm.org> (raw)
In-Reply-To: <20221118045242.2770-1-cw9316.lee@samsung.com>
On 11/17/22 20:52, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.com>
>
> Change the same as the other code to return bool type.
> 91: return !!(host->caps & UFS_MTK_CAP_BOOST_CRYPT_ENGINE);
> 98: return !!(host->caps & UFS_MTK_CAP_VA09_PWR_CTRL);
> 105: return !!(host->caps & UFS_MTK_CAP_BROKEN_VCC);
>
> Signed-off-by: ChanWoo Lee <cw9316.lee@samsung.com>
> ---
> drivers/ufs/host/ufs-mediatek.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
> index 7d13878dff47..ef5816d82326 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
> @@ -109,7 +109,7 @@ static bool ufs_mtk_is_pmc_via_fastauto(struct ufs_hba *hba)
> {
> struct ufs_mtk_host *host = ufshcd_get_variant(hba);
>
> - return (host->caps & UFS_MTK_CAP_PMC_VIA_FASTAUTO);
> + return !!(host->caps & UFS_MTK_CAP_PMC_VIA_FASTAUTO);
> }
Hi ChanWoo,
Please drop this patch and instead remove the !! from the other functions
that have return type 'bool'. There is more Linux kernel code that relies on
the implicit conversion from type 'int' to 'bool' than code that converts
explicitly from 'int' to 'bool'.
Thanks,
Bart.
next prev parent reply other threads:[~2022-11-18 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20221118045326epcas1p408c9e16a58201043c9eb3c99110fab0c@epcas1p4.samsung.com>
2022-11-18 4:52 ` [PATCH] scsi: ufs: ufs-mediatek: Modify the return value Chanwoo Lee
2022-11-18 5:42 ` Stanley Chu
2022-11-18 10:39 ` AngeloGioacchino Del Regno
2022-11-18 17:30 ` Bart Van Assche [this message]
2022-11-18 21:34 ` Finn Thain
2022-11-18 21:44 ` Bart Van Assche
2022-11-18 22:29 ` Finn Thain
2022-11-26 2:11 ` Martin K. Petersen
2022-12-01 3:45 ` Martin K. Petersen
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=db25901b-8537-ca16-aaac-0daaa636d84d@acm.org \
--to=bvanassche@acm.org \
--cc=cw9316.lee@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=stanley.chu@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