From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752340AbaEVPsS (ORCPT ); Thu, 22 May 2014 11:48:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:43861 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbaEVPsR (ORCPT ); Thu, 22 May 2014 11:48:17 -0400 Date: Thu, 22 May 2014 17:48:15 +0200 Message-ID: From: Takashi Iwai To: Benoit Taine Cc: Jaroslav Kysela , kernel-janitors@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: Replace DEFINE_PCI_DEVICE_TABLE macro use In-Reply-To: <1400771334-25112-1-git-send-email-benoit.taine@lip6.fr> References: <1400771334-25112-1-git-send-email-benoit.taine@lip6.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/24.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=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Thu, 22 May 2014 17:08:54 +0200, Benoit Taine wrote: > > We should prefer `const struct pci_device_id` over > `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. > This issue was reported by checkpatch. > > A simplified version of the semantic patch that makes this change is as > follows (http://coccinelle.lip6.fr/): > > // > > @@ > identifier i; > declarer name DEFINE_PCI_DEVICE_TABLE; > initializer z; > @@ > > - DEFINE_PCI_DEVICE_TABLE(i) > + const struct pci_device_id i[] > = z; > > // > > It has been tested by compilation. > > Signed-off-by: Benoit Taine Thanks, applied. Takashi > --- > sound/pci/hda/hda_intel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c > index 2c54629..ab0fd6d 100644 > --- a/sound/pci/hda/hda_intel.c > +++ b/sound/pci/hda/hda_intel.c > @@ -1730,7 +1730,7 @@ static void azx_remove(struct pci_dev *pci) > } > > /* PCI IDs */ > -static DEFINE_PCI_DEVICE_TABLE(azx_ids) = { > +static const struct pci_device_id azx_ids[] = { > /* CPT */ > { PCI_DEVICE(0x8086, 0x1c20), > .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, >