From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EE2EC43441 for ; Wed, 21 Nov 2018 22:17:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F27B0206BA for ; Wed, 21 Nov 2018 22:17:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F27B0206BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390031AbeKVIx7 (ORCPT ); Thu, 22 Nov 2018 03:53:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:56250 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731864AbeKVIx6 (ORCPT ); Thu, 22 Nov 2018 03:53:58 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 22C38AE14; Wed, 21 Nov 2018 22:17:42 +0000 (UTC) Date: Wed, 21 Nov 2018 23:17:41 +0100 Message-ID: From: Takashi Iwai To: Andy Shevchenko Cc: Pierre-Louis Bossart , alsa-devel@alsa-project.org, broonie@kernel.org, vkoul@kernel.org, liam.r.girdwood@linux.intel.com, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/6] ASoC: Intel: Skylake: Add CFL-S support In-Reply-To: <20181121173841.GS10650@smile.fi.intel.com> References: <20181120213644.19103-1-pierre-louis.bossart@linux.intel.com> <20181120213644.19103-2-pierre-louis.bossart@linux.intel.com> <20181121142721.GO10650@smile.fi.intel.com> <414b4c3a-7e04-2775-7d87-16a236b5b4e8@linux.intel.com> <20181121173841.GS10650@smile.fi.intel.com> 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/26 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2018 18:38:41 +0100, Andy Shevchenko wrote: > > On Wed, Nov 21, 2018 at 11:16:50AM -0600, Pierre-Louis Bossart wrote: > > On 11/21/18 8:27 AM, Andy Shevchenko wrote: > > > > May you consider to switch to PCI_DEVICE_DATA() first? > > > > Is this really the recommended path? > > > > The macro generates PCI_DEVICE_ID_##vend##_##dev, and I don't have a turn > > key #define PCI_DEVICE_ID_INTEL_AUDIO_CFL 0xa348 I can use. In a number of > > cases we have multiple variants of the same hardware, and it starts being > > painful to use a 20-letter macro to differentiate between INTEL_AUDIO_CFL_Y > > and INTEL_AUDIO_CFL_H. The explicit code and a short comment are more > > readable really. > > > > git grep PCI_DEVICE_ID_INTEL gives me hundreds of definitions, some global, > > some local to specific drivers, doesn't seem like there is a well-agreed > > usage of this macro, is there? I don't mind making the change but I don't > > sense an strong argument for it? > > Compare: > > /* CFL */ > { PCI_DEVICE(0x8086, 0xa348), > .driver_data = (unsigned long)&snd_soc_acpi_intel_cnl_machines}, > > to something like: > > #define PCI_DEVICE_ID_INTEL_AUDIO_CFL 0xa348 > ... > > {PCI_DEVICE_DATA(INTEL, AUDIO_CFL, &snd_soc_acpi_intel_cnl_machines)}, The former gives a better grep-ability, though. I have no big preference over two, just want to mention that both have merits and demerits. thanks, Takashi