lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210910170503.cnc2eri32v3bgo65@kari-VirtualBox>
Date:   Fri, 10 Sep 2021 20:05:03 +0300
From:   Kari Argillander <kari.argillander@...il.com>
To:     Jérôme Pouiller <jerome.pouiller@...abs.com>
Cc:     devel@...verdev.osuosl.org, linux-wireless@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Kalle Valo <kvalo@...eaurora.org>,
        "David S . Miller" <davem@...emloft.net>
Subject: Re: [PATCH 29/31] staging: wfx: remove useless comments after #endif

On Fri, Sep 10, 2021 at 06:49:30PM +0200, Jérôme Pouiller wrote:
> On Friday 10 September 2021 18:27:18 CEST Kari Argillander wrote:
> > On Fri, Sep 10, 2021 at 06:05:02PM +0200, Jerome Pouiller wrote:
> > > From: Jérôme Pouiller <jerome.pouiller@...abs.com>
> > >
> > > Comments after the last #endif of header files don't bring any
> > > information and are redundant with the name of the file. Drop them.
> > 
> > How so? You see right away that this indeed is header guard and not some
> > other random thing. Also kernel coding standard says:
> > 
> >         At the end of any non-trivial #if or #ifdef block (more than a
> >         few line), place a comment after the #endif on the same line,
> >         noting the conditional expression used.
> > 
> > There is no point dropping them imo. If you think about space saving
> > this patch will take more space. Because it will be in version history.
> > So nack from me unless some one can trun my head around.
> 
> IMHO, the #endif on the last line of an header file terminates a trivial
> #ifdef block.
> Moreover, they are often out-of-sync with the #ifndef statement, like here:

That one is of course true. 

> 
> [...]
> > > diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h
> > > index dd189788acf1..2d135eff7af2 100644
> > > --- a/drivers/staging/wfx/key.h
> > > +++ b/drivers/staging/wfx/key.h
> > > @@ -17,4 +17,4 @@ int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
> > >               struct ieee80211_vif *vif, struct ieee80211_sta *sta,
> > >               struct ieee80211_key_conf *key);
> > >
> > > -#endif /* WFX_STA_H */
> > > +#endif
> [...]
> 
> -- 
> Jérôme Pouiller
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ