Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753156AbeAFLu2 (ORCPT + 1 other); Sat, 6 Jan 2018 06:50:28 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41028 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122AbeAFLuY (ORCPT ); Sat, 6 Jan 2018 06:50:24 -0500 X-Google-Smtp-Source: ACJfBovW34d6CSG2I/wqBlwpr94TuZeBTlkANLhh3XaiCFovWyuEYeb+Auw0m5ln4Q0TrTpl+jstTQ== Date: Sat, 6 Jan 2018 12:50:20 +0100 From: Ingo Molnar To: Andy Shevchenko Cc: Saidgani Musaev , "H. Peter Anvin" , Thomas Gleixner , x86@kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] arch/x86/boot: sizeof macro Message-ID: <20180106115020.abragiirty5edis5@gmail.com> References: <20171229183015.7772-1-cpu808694@gmail.com> <20171229194614.3iku5zg5oglrd2cl@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: * Andy Shevchenko wrote: > On Fri, Dec 29, 2017 at 9:46 PM, Ingo Molnar wrote: > > * Andy Shevchenko wrote: > > >> > - ireg.cx = sizeof buf; > >> > + ireg.cx = sizeof(buf); > >> > >> sizeof is operator, not a function. > >> So, what are you trying to achieve? > > > > That's true, but in the kernel coding style we use it as a function: > > Yeah, the question is do we need to change all those 177 occurrences at all? > Or perhaps it might be an opportunity during some other changes to > certain users... We probably don't want to change then, and my point was that 99.8% of the current usage is as a 'function': triton:~/tip> git grep 'sizeof(' | wc -l 116570 triton:~/tip> git grep 'sizeof [:alnum:]' | wc -l 177 i.e. your patch moves it in the exact wrong direction. Thanks, Ingo