[PATCH v3 09/15] drm/tests: hdmi: Fixup CamelCase warning

Cristian Ciocaltea posted 15 patches 8 months, 4 weeks ago
There is a newer version of this series
[PATCH v3 09/15] drm/tests: hdmi: Fixup CamelCase warning
Posted by Cristian Ciocaltea 8 months, 4 weeks ago
Rename the reject_100_MHz_connector_hdmi_funcs variable to make
checkpatch.pl happy:

  CHECK: Avoid CamelCase: <reject_100_MHz_connector_hdmi_funcs>

While at it, also rename reject_100MHz_connector_tmds_char_rate_valid()
for consistency.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
 drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
index bcbd146fb655f4402529e59af09c99dbae7be0bf..284bd9b1418a454d05c4a38263519eb8ae450090 100644
--- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
@@ -89,15 +89,15 @@ static const struct drm_connector_hdmi_funcs reject_connector_hdmi_funcs = {
 };
 
 static enum drm_mode_status
-reject_100MHz_connector_tmds_char_rate_valid(const struct drm_connector *connector,
+reject_100mhz_connector_tmds_char_rate_valid(const struct drm_connector *connector,
 					     const struct drm_display_mode *mode,
 					     unsigned long long tmds_rate)
 {
 	return (tmds_rate > 100ULL * 1000 * 1000) ? MODE_BAD : MODE_OK;
 }
 
-static const struct drm_connector_hdmi_funcs reject_100_MHz_connector_hdmi_funcs = {
-	.tmds_char_rate_valid	= reject_100MHz_connector_tmds_char_rate_valid,
+static const struct drm_connector_hdmi_funcs reject_100mhz_connector_hdmi_funcs = {
+	.tmds_char_rate_valid	= reject_100mhz_connector_tmds_char_rate_valid,
 };
 
 static int dummy_connector_get_modes(struct drm_connector *connector)
@@ -1933,7 +1933,7 @@ static void drm_test_check_mode_valid_reject_rate(struct kunit *test)
 	priv = drm_kunit_helper_connector_hdmi_init_funcs(test,
 							  BIT(HDMI_COLORSPACE_RGB),
 							  8,
-							  &reject_100_MHz_connector_hdmi_funcs);
+							  &reject_100mhz_connector_hdmi_funcs);
 	KUNIT_ASSERT_NOT_NULL(test, priv);
 
 	conn = &priv->connector;

-- 
2.49.0
Re: [PATCH v3 09/15] drm/tests: hdmi: Fixup CamelCase warning
Posted by Maxime Ripard 8 months, 1 week ago
On Wed, Mar 26, 2025 at 12:19:58PM +0200, Cristian Ciocaltea wrote:
> Rename the reject_100_MHz_connector_hdmi_funcs variable to make
> checkpatch.pl happy:
> 
>   CHECK: Avoid CamelCase: <reject_100_MHz_connector_hdmi_funcs>
> 
> While at it, also rename reject_100MHz_connector_tmds_char_rate_valid()
> for consistency.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>

In this case, checkpatch is wrong. mhz != MHz.

And since it's not a warning, I'd just ignore it.

Maxime
Re: [PATCH v3 09/15] drm/tests: hdmi: Fixup CamelCase warning
Posted by Cristian Ciocaltea 8 months, 1 week ago
On 4/9/25 6:13 PM, Maxime Ripard wrote:
> On Wed, Mar 26, 2025 at 12:19:58PM +0200, Cristian Ciocaltea wrote:
>> Rename the reject_100_MHz_connector_hdmi_funcs variable to make
>> checkpatch.pl happy:
>>
>>   CHECK: Avoid CamelCase: <reject_100_MHz_connector_hdmi_funcs>
>>
>> While at it, also rename reject_100MHz_connector_tmds_char_rate_valid()
>> for consistency.
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> 
> In this case, checkpatch is wrong. mhz != MHz.
> 
> And since it's not a warning, I'd just ignore it.

I think it also improves consistency a bit, as this is actually the only
place where "[_]MHz" is being used in the file, everywhere else we have
"mhz", without '_' prefix.

But I can still drop the patch if you prefer.