Re: [PATCH net-next v17 03/14] netdev: support binding dma-buf to netdevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Markus Elfring wrote:
> >> …
> >>> +++ b/include/net/devmem.h
> >>> @@ -0,0 +1,115 @@
> >> …
> >>> +#ifndef _NET_DEVMEM_H
> >>> +#define _NET_DEVMEM_H
> >> …
> >>
> >> I suggest to omit leading underscores from such identifiers.
> >> https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier
> >>
> >
> > I was gonna apply this change, but I ack'd existing files and I find
> > that all of them include leading underscores, including some very
> > recently added files like net/core/page_pool_priv.h.
> >
> > I would prefer to stick to existing conventions if that's OK, unless
> > there is widespread agreement to the contrary.
> 
> Under which circumstances would you become interested to reduce development risks
> also according to undefined behaviour?
> https://wiki.sei.cmu.edu/confluence/display/c/CC.+Undefined+Behavior#CC.UndefinedBehavior-ub_106

This series is following established practice in kernel networking.

If that conflicts with a C standard, then perhaps that needs to be
resolved project wide.

Forcing an individual feature to diverge just brings inconsistency.
That said, this appears to be inconsistent already.

Main question is whether this is worth respinning a series already at
v17 with no more fundamental feedback.

For reference:

$ grep -nrI '^#ifndef\ _\+NET[_A-Z]\+H' include/  | wc -l
149

$ grep -nrI '^#ifndef\ NET[_A-Z]\+H' include/  | wc -l
4

$ grep -nrI '^#ifndef\ [_]\+[A-Z][_A-Z]\+H' include/  | wc -l
3805

$ grep -nrI '^#ifndef\ [A-Z][_A-Z]\+H' include/  | wc -l
583





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux