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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5f968a498c3d9848389ce5c6e04d98fc59c6438a.camel@perches.com>
Date:   Mon, 08 Oct 2018 21:38:41 -0700
From:   Joe Perches <joe@...ches.com>
To:     Michael Ellerman <mpe@...erman.id.au>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/xmon/ppc-opc: Use ARRAY_SIZE macro

On Tue, 2018-10-09 at 14:43 +1100, Michael Ellerman wrote:
> Joe Perches <joe@...ches.com> writes:
> 
> > On Thu, 2018-10-04 at 19:10 +0200, Gustavo A. R. Silva wrote:
> > > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element.
> > []
> > > diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch/powerpc/xmon/ppc-opc.c
> > []
> > > @@ -966,8 +966,7 @@ const struct powerpc_operand powerpc_operands[] =
> > >    { 0xff, 11, NULL, NULL, PPC_OPERAND_SIGNOPT },
> > >  };
> > >  
> > > -const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
> > > -					   / sizeof (powerpc_operands[0]));
> > > +const unsigned int num_powerpc_operands = ARRAY_SIZE(powerpc_operands);
> > 
> > It seems this is unused and could be deleted.
> 
> The code in this file is copied from binutils.
> 
> We don't want to needlessly diverge it.
> 
> I've said this before:
> 
>   https://lore.kernel.org/linuxppc-dev/874lfxjnzl.fsf@concordia.ellerman.id.au/

Don't expect people to remember this.

> Is there some way we can blacklist this file from checkpatch, Coccinelle
> etc?

Modify both to look for some specific tag
in a file and then update the scripts to
read the file when looking at patches too.

Otherwise, no.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ