Search Linux Wireless

Re: [PATCH 29/31] staging: wfx: remove useless comments after #endif

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

 



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@xxxxxxxxxx>
> >
> > 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:

[...]
> > 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






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux