[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3556920.DX4m0svyV5@pc-42>
Date: Fri, 10 Sep 2021 18:49:30 +0200
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
To: Kari Argillander <kari.argillander@...il.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 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:
[...]
> > 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