Re: [PATCH 1/1] rtc: mediatek: Add mt6685 RTC driver

From: Krzysztof Kozlowski
Date: Thu Oct 31 2024 - 12:00:21 EST


On 31/10/2024 14:58, shunxi zhang wrote:
> From: Shunxi Zhang <ot_shunxi.zhang@xxxxxxxxxxxx>
>
> Signed-off-by: Shunxi Zhang <ot_shunxi.zhang@xxxxxxxxxxxx>

...

> +
> +static const struct mtk_rtc_data mt6685_rtc_data = {
> + .wrtgr = RTC_WRTGR,
> + .hwid = HWID_MT6685,
> + .chip_version = MT6685_SERIES,
> + .spare_reg_fields = mt6685_spare_reg_fields,
> + .cali_reg_fields = mt6685_cali_reg_fields,
> + .single_read_write_is_supported = true,
> +};
> +
> +static const struct of_device_id mt6685_rtc_of_match[] = {
> + { .compatible = "mediatek,mt6685-rtc", .data = &mt6685_rtc_data },

Please run scripts/checkpatch.pl and fix reported warnings. Then please
run `scripts/checkpatch.pl --strict` and (probably) fix more warnings.
Some warnings can be ignored, especially from --strict run, but the code
here looks like it needs a fix. Feel free to get in touch if the warning
is not clear.

You did not even run basic tools... I doubt that this was ever built
with W=1 and static checkers.

But above warning about undocumented ABI is a NAK.

Please run standard kernel tools for static analysis, like coccinelle,
smatch and sparse, and fix reported warnings. Also please check for
warnings when building with W=1. Most of these commands (checks or W=1
build) can build specific targets, like some directory, to narrow the
scope to only your code. The code here looks like it needs a fix. Feel
free to get in touch if the warning is not clear.


Best regards,
Krzysztof