From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751378AbbIFBeG (ORCPT ); Sat, 5 Sep 2015 21:34:06 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:47259 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbbIFBd4 (ORCPT ); Sat, 5 Sep 2015 21:33:56 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: ykk@rock-chips.com X-FST-TO: linux-arm-kernel@lists.infradead.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <55EB97F9.3010503@rock-chips.com> Date: Sun, 06 Sep 2015 09:33:45 +0800 From: Yakir Yang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Joe Perches CC: Krzysztof Kozlowski , Heiko Stuebner , Thierry Reding , Jingoo Han , Inki Dae , Kukjin Kim , Mark Yao , Russell King , djkurtz@chromium.com, dianders@chromium.com, seanpaul@chromium.com, ajaynumb@gmail.com, Andrzej Hajda , Kyungmin Park , David Airlie , Gustavo Padovan , Andy Yan , Kumar Gala , Ian Campbell , Rob Herring , Pawel Moll , Kishon Vijay Abraham I , architt@codeaurora.org, robherring2@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 01/16] drm: exynos/dp: fix code style References: <1441086371-24838-1-git-send-email-ykk@rock-chips.com> <1441086399-24889-1-git-send-email-ykk@rock-chips.com> <55E79297.3050203@samsung.com> <55E7D4E4.6070808@rock-chips.com> <55E7D5EB.1060505@samsung.com> <55E7DBA7.90504@rock-chips.com> <1441259878.12163.75.camel@perches.com> In-Reply-To: <1441259878.12163.75.camel@perches.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, 在 09/03/2015 01:57 PM, Joe Perches 写道: > On Thu, 2015-09-03 at 13:33 +0800, Yakir Yang wrote: > [] >>>>>> diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c > [] >>>>>> @@ -155,24 +156,22 @@ static int exynos_dp_read_edid(struct >>>>>> 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); >>>>> To me, missing argument after opening parenthesis, looks worse. I would >>>>> prefer: >>>>> >>>>> exynos_dp_write_byte_to_dpcd(dp, >>>>> >>>>> Why you moved the 'dp' argument to new line? >>>> Hmm... Just like style tool indicate, no more warning after >>>> that change. >>>> >>>> For now, I would like to follow the original style, just improved >>>> some obvious style problem. :-) >>> What was the checkpatch warning that said 'dp' has to move to new line? >>> I tried this and I don't see it. >> checkpatch haven't remind me that put dp to new line would fix >> this warning, this just come from my experiments. And I works, >> no more warnings from checkpatch, so I toke this style. > Checkpatch isn't a great arbiter of 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); > } > So... just ignore the 80 columns warnings. Actually I prefer to keep the original style in this case. Thanks, - Yakir ] > > >