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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 437B9C4332E for ; Fri, 20 Mar 2020 14:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1400C20777 for ; Fri, 20 Mar 2020 14:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584716356; bh=Hd3zAvAezuFSVlozOz44ullhVT1eSajSxemMLbZxlBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=obuUakSJswXCsZ6S/NIbMum8vgMzNZiExatmohj16KS/Z8zZhTgl8fAsrzqdpCVe3 o8PSfc8or7r/dBSrxkXaiZAxEYuKCS8J+x26NHzoFqEfmgZ97/kulHSMlGTQMK+L8g usJsdQShCSHrZMcO6fTwQm6QouUKUR2CXcEafXDM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726783AbgCTO7P (ORCPT ); Fri, 20 Mar 2020 10:59:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgCTO7P (ORCPT ); Fri, 20 Mar 2020 10:59:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 99F7A2072D; Fri, 20 Mar 2020 14:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584716354; bh=Hd3zAvAezuFSVlozOz44ullhVT1eSajSxemMLbZxlBE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ff33wKiw1HbXy93zCGoh1lWvVOk00lgxJdeoknvNzKnVdJSPvefa0ML3LysbJ4nTO 6rAp6ASm4qt4uUIq2mtTpgvdRMDHrrSeBb59UaWhHjcJKEKHYeRpe3xmrMj7LtAtPD nmjVJ+xUohzhMq/MhLV3uoj+bRi4FVjkP6UigI8o= Date: Fri, 20 Mar 2020 15:59:06 +0100 From: Greg Kroah-Hartman To: Thomas Gleixner Cc: LKML , x86@kernel.org, Mark Gross , Tony Luck , Paolo Bonzini , Darren Hart , Andy Shevchenko , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org, Viresh Kumar , linux-pm@vger.kernel.org, Srinivas Pandruvada , linux-edac@vger.kernel.org, platform-driver-x86@vger.kernel.org, Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, Zhang Rui , Daniel Lezcano , Amit Kucheria , Chanwoo Choi , Jacob Pan , Adrian Hunter , Ulf Hansson , linux-mmc@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Takashi Iwai , alsa-devel@alsa-project.org, Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org Subject: Re: [patch 00/22] x86/treewide: Consolidate CPU match macro maze and get rid of C89 (sic!) initializers Message-ID: <20200320145906.GA762057@kroah.com> References: <20200320131345.635023594@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200320131345.635023594@linutronix.de> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Fri, Mar 20, 2020 at 02:13:45PM +0100, Thomas Gleixner wrote: > The x86 CPU matching based on struct x86_cpu_id: > > - is using an inconsistent macro mess with pointlessly duplicated and > slightly different local macros. Finding the places is an art as there > is no consistent name space at all. > > - is still mostly based on C89 struct initializers which rely on the > ordering of the struct members. That's proliferated forever as every > new driver just copies the mess from some exising one. > > A recent offlist conversation about adding more match criteria to the CPU > matching logic instead of creating yet another set of horrors, reminded me > of a pile of scripts and patches which I hacked on a few years ago when I > tried to add something to struct x86_cpu_id. > > That stuff was finally not needed and ended up in my ever growing todo list > and collected dust and cobwebs, but (un)surprisingly enough most of it > still worked out of the box. The copy & paste machinery still works as it > did years ago. > > There are a few places which needed extra care due to new creative macros, > new check combinations etc. and surprisingly ONE open coded proper C99 > initializer. > > It was reasonably simple to make it at least compile and pass a quick > binary equivalence check. > > The result is a X86_MATCH prefix based set of macros which are reflecting > the needs of the usage sites and shorten the base macro which takes all > possible parameters (vendor, family, model, feature, data) and uses proper > C99 initializers. > > So extensions of the match logic are trivial after that. > > The patch set is against Linus tree and has trivial conflicts against > linux-next. > > The diffstat is: > 71 files changed, 525 insertions(+), 472 deletions(-) > > but the extra lines are pretty much kernel-doc documentation which I added > to each of the new macros. The usage sites diffstat is: > > 70 files changed, 393 insertions(+), 471 deletions(-) > > Thoughts? Much nicer looking, thanks for cleaning up this mess: Reviewed-by: Greg Kroah-Hartman