On 01.09.2020 10:11, tongc...@whu.edu.cn wrote:
> I run the checkpatch script against the c source, and the following output 
> says it prefers a maximum of 75 chars per-line.
> 
That's wrong. As the name suggests, checkpatch is meant to be used with patches,
not with source files.

> #./scripts/checkpatch.pl drivers/net/ethernet/realtek/r8169_phy_config.c 
> WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per 
> line)
> #1305: 

This refers to line length in commit description, not source file line length.

> void r8169_hw_phy_config(struct rtl8169_private *tp, struct phy_device 
> *phydev, 
> 
> ERROR: Does not appear to be a unified-diff format patch
> 
> total: 1 errors, 1 warnings, 0 lines checked
> 
> NOTE: For some of the reported defects, checkpatch may be able to
>       mechanically convert to the typical style using --fix or --fix-inplace.
> 
> drivers/net/ethernet/realtek/r8169_phy_config.c has style problems, please 
> review.
> 
> NOTE: If any of the errors are false positives, please report
>       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> 2020年9月1日 下午3:57,Heiner Kallweit <hkallwe...@gmail.com>写道:
> 
>     On 01.09.2020 09:52, tongc...@whu.edu.cn wrote:
>     > 1)So the patch title should be written like this?
>     > "net: reduce the param length of the line"
>     >
>     > 2)I have checked the patch with the checkpatch script, no warnings or 
> errors.
>     >
>     > 3)I saw the line length exceeded 75 chars which may look better if was 
> written on a new line (which was what checkpatch suggeted).
> 
>     Max line length is 80 characters, therefore I don't see what should be 
> wrong with the
>     current status. Can you send the checkpatch suggestion you're referring 
> to?
> 
>     > (I'm a newbie to the patch world, know not much and feel like taking 
> your advice sincerely)
>     > 2020年9月1日 下午3:29,Heiner Kallweit <hkallwe...@gmail.com>写道:
>     >
>     >     On 01.09.2020 04:28, Tong Chen wrote:
>     >     > Reduce the param length of the line from 79 chars to 52 chars,
>     >     > which complies with kernel preferences.
>     >
>     >     Apart from formal issues with the patch (missing net/net-next
>     >     annotation, wrong prefix): Did you get a checkpatch warning?
>     >     Or what's the source of your assumed kernel preference?
>     >
>     >     > Signed-off-by: Tong Chen <tongc...@whu.edu.cn>
>     >     > ---
>     >     >  drivers/net/ethernet/realtek/r8169_phy_config.c | 3 ++-
>     >     >  1 file changed, 2 insertions(+), 1 deletion(-)
>     >     >
>     >     > diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c 
> b/drivers/net/ethernet/realtek/r8169_phy_config.c
>     >     > index 913d030d73eb..f4b738cf8ad7 100644
>     >     > --- a/drivers/net/ethernet/realtek/r8169_phy_config.c
>     >     > +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
>     >     > @@ -1302,7 +1302,8 @@ static void rtl8125b_hw_phy_config(struct 
> rtl8169_private *tp,
>     >     >  rtl8125b_config_eee_phy(phydev);
>     >     >  }
>     >     > 
>     >     > -void r8169_hw_phy_config(struct rtl8169_private *tp, struct 
> phy_device *phydev,
>     >     > +void r8169_hw_phy_config(struct rtl8169_private *tp,
>     >     > + struct phy_device *phydev,
>     >     >  enum mac_version ver)
>     >     >  {
>     >     >  static const rtl_phy_cfg_fct phy_configs[] = {
>     >     >
>     >
>     >
> 
> 

Reply via email to