Re: [PATCH] staging: bcm: add missing blank lines after declarations

Joe Perches
2014-07-09T16:59:43Z

On Wed, 2014-07-09 at 17:59 +0200, Pawel Lebioda wrote:
> Fix "Missing blank line after declaration" warnings reported by
> checkpatch.pl.

trivial unrelated notes:

> diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
> index 3dbdf0e..adca0ce 100644
> --- a/drivers/staging/bcm/CmHost.c
> +++ b/drivers/staging/bcm/CmHost.c
> @@ -972,6 +972,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
> pstAddIndication->sfAuthorizedSet.bValid = 1;
> for (nIndex = 0; nIndex < nCurClassifierCnt; nIndex++) {
> struct bcm_convergence_types *psfCSType = NULL;
> +
> psfCSType = &pstAddIndication->sfAuthorizedSet.cConvergenceSLTypes[nIndex];

You might consider removing the = NULL; on the declaration
as it's set on the next line.

> diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c
> index cd16067..e013c5a 100644
> --- a/drivers/staging/bcm/IPv6Protocol.c
> +++ b/drivers/staging/bcm/IPv6Protocol.c
> @@ -45,6 +45,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
[]
> BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
> DBG_LVL_ALL, "\nIPv6 Routing Header");

The leading "\n" is unnecessary and could be removed.

> @@ -66,6 +67,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
[]
> BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
> DBG_LVL_ALL,
> "\nIPv6 DestOpts Header Header");

etc.

> @@ -407,6 +411,7 @@ VOID DumpIpv6Address(ULONG *puIpv6Address)
> UINT uiIpv6AddrNoLongWords = 4;
> UINT uiIpv6AddIndex = 0;
> struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
> +
> for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
> BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
> ":%lx", puIpv6Address[uiIpv6AddIndex]);

All of these are effectively broken.

There's no BCM_DEBUG_PRINT that's like a pr_cont.
All of these are emitted on separate lines.