From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758121AbdJMNO1 (ORCPT ); Fri, 13 Oct 2017 09:14:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:51968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753290AbdJMNOZ (ORCPT ); Fri, 13 Oct 2017 09:14:25 -0400 Date: Fri, 13 Oct 2017 15:14:23 +0200 Message-ID: From: Takashi Iwai To: =?UTF-8?B?SsOpcsOpbXk=?= Lefaure Cc: "Jaroslav Kysela" , , Subject: Re: [PATCH v2] ALSA: hda/ca0132 - use ARRAY_SIZE In-Reply-To: <20171013023631.13158-1-jeremy.lefaure@lse.epita.fr> References: <20171013023631.13158-1-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 Fri, 13 Oct 2017 04:36:31 +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 > --- > Changes since v1: > - keep sound/oss untouched Applied, thanks. Takashi