On Thu, 2015-09-03 at 13:33 +0800, Yakir Yang wrote:
[]
[]diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c
Checkpatch isn't a great arbiter of style.checkpatch haven't remind me that put dp to new line would fixWhat was the checkpatch warning that said 'dp' has to move to new line?Hmm... Just like style tool indicate, no more warning after@@ -155,24 +156,22 @@ static int exynos_dp_read_edid(structTo me, missing argument after opening parenthesis, looks worse. I would
exynos_dp_device *dp)
}
exynos_dp_read_byte_from_dpcd(dp, DP_TEST_REQUEST,
- &test_vector);
+ &test_vector);
if (test_vector & DP_TEST_LINK_EDID_READ) {
- exynos_dp_write_byte_to_dpcd(dp,
- DP_TEST_EDID_CHECKSUM,
+ exynos_dp_write_byte_to_dpcd(
+ dp, DP_TEST_EDID_CHECKSUM,
edid[EDID_BLOCK_LENGTH + EDID_CHECKSUM]);
- exynos_dp_write_byte_to_dpcd(dp,
- DP_TEST_RESPONSE,
+ exynos_dp_write_byte_to_dpcd(
+ dp, DP_TEST_RESPONSE,
DP_TEST_EDID_CHECKSUM_WRITE);
prefer:
exynos_dp_write_byte_to_dpcd(dp,
Why you moved the 'dp' argument to new line?
that change.
For now, I would like to follow the original style, just improved
some obvious style problem. :-)
I tried this and I don't see it.
this warning, this just come from my experiments. And I works,
no more warnings from checkpatch, so I toke this style.
It's just a brainless tool.
Always use your instead of anything brainless.
If it were code I was writing, I'd ignore 80 columns warnings
where appropriate.
These are long function names and long macro defines, so it's
inappropriate to use 80 columns as a guiding style.
I'd write:
exynos_dp_read_byte_from_dpcd(dp, DP_TEST_REQUEST, &test_vector);
if (test_vector & DP_TEST_LINK_EDID_READ) {
exynos_dp_write_byte_to_dpcd(dp, DP_TEST_EDID_CHECKSUM,
edid[EDID_BLOCK_LENGTH + EDID_CHECKSUM]);
exynos_dp_write_byte_to_dpcd(dp, DP_TEST_RESPONSE,
DP_TEST_EDID_CHECKSUM_WRITE);
}