From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751104AbdJCHDi (ORCPT ); Tue, 3 Oct 2017 03:03:38 -0400 Received: from mx2.suse.de ([195.135.220.15]:34540 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750812AbdJCHDh (ORCPT ); Tue, 3 Oct 2017 03:03:37 -0400 Date: Tue, 03 Oct 2017 09:03:35 +0200 Message-ID: From: Takashi Iwai To: =?UTF-8?B?SsOpcsOpbXk=?= Lefaure Cc: "Jaroslav Kysela" , , Subject: Re: [PATCH 01/18] sound: use ARRAY_SIZE In-Reply-To: <20171001193101.8898-2-jeremy.lefaure@lse.epita.fr> References: <20171001193101.8898-1-jeremy.lefaure@lse.epita.fr> <20171001193101.8898-2-jeremy.lefaure@lse.epita.fr> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 01 Oct 2017 21:30:39 +0200, Jérémy Lefaure wrote: > > Using the ARRAY_SIZE macro improves the readability of the code. > > Found with Coccinelle with the following semantic patch: > @r depends on (org || report)@ > type T; > T[] E; > position p; > @@ > ( > (sizeof(E)@p /sizeof(*E)) > | > (sizeof(E)@p /sizeof(E[...])) > | > (sizeof(E)@p /sizeof(T)) > ) > > Signed-off-by: Jérémy Lefaure > --- > sound/oss/ad1848.c | 7 ++++--- > sound/pci/hda/patch_ca0132.c | 8 +++----- > 2 files changed, 7 insertions(+), 8 deletions(-) sound/oss is already dead and will be removed likely in the next release. So just keep it untouched. thanks, Takashi