Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2807401ybg; Sun, 20 Oct 2019 00:32:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHJlPFGASVXDd+j4ykinrbvUQImE3m17bzrJdoCxj8RsL31aTosOvNgfQqH+gKjP8EK0z7 X-Received: by 2002:a17:906:19d9:: with SMTP id h25mr16036770ejd.297.1571556768925; Sun, 20 Oct 2019 00:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571556768; cv=none; d=google.com; s=arc-20160816; b=IMj+VHrfHmOqBCj1avOoCfS9o2m8FSscH914Ah6KXVrkC1Rm+luWVUeh05AHpBm0Lv Fbqc/6wMRwywJsSTOwmBQM9gwvKKpBC4AIn4B15ARYJROp6k//insfEQDo4GSvrN+4Lw 4XgXxwUb4Yu19CaUG8TjMtdQZKMlYbw/hX4LQxF5Xfy0FoC625YQ4K3jgZDjiwnjinRa u4kckdnNzaQcxmYaeJDkeKqEa5t7Fybpdelpuf6TWZMny40gPzIHG40U5PaO8v6IrO9N zKeDeUxuWsmQliKIcD0jx5sPv5A/8zgngKHVItquYMM5biAjGCnYZ/fV2m6oCx6B1VLO 6WYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=xIEpU0tkDVwXDBE078M49Pd4kGLB+/b7BLvzvh1elZc=; b=Ckpbk57gP4LS2WOQjo1vG2rwJq1B3Q9lQWhO/plH3hzMOUBgQn60OEjN5FKK2PauRv 1FfglXF8twCKX6t0z6C+G+U6JmD36S4aA+LUJvfb3euu1j5OpnuqeKtJCbfajcGEuj5f sz1sR2DtR06YGbsNXYeloRo4F3u/us7GAAPyG4qSeeJu4p657qiuNgSbBmYjYpUOXbIr 4ZqLJXnJvNZMc2JyTmm+hsNZ7Iiz68sUROlDuSDhEtry7uRxH1SiMrknBLWhQS9Gjew0 /jEKPYKu+SKXE7En7ygM16Vjp/gTap8ddeESk2p2EeT0DTrfB9KpqAhJ/eHMt++wEVj/ BToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k23FWgob; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si7841561edj.354.2019.10.20.00.31.44; Sun, 20 Oct 2019 00:32:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=k23FWgob; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726233AbfJTHaX (ORCPT + 99 others); Sun, 20 Oct 2019 03:30:23 -0400 Received: from mail-pl1-f182.google.com ([209.85.214.182]:38735 "EHLO mail-pl1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbfJTHaW (ORCPT ); Sun, 20 Oct 2019 03:30:22 -0400 Received: by mail-pl1-f182.google.com with SMTP id w8so4971037plq.5 for ; Sun, 20 Oct 2019 00:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xIEpU0tkDVwXDBE078M49Pd4kGLB+/b7BLvzvh1elZc=; b=k23FWgobVV1aG26lmU6fCW/9wkGn/FAte/1L5bxZf9QXSAj6cTg1EmvrTFzcDcSfeJ FgLRBMsVrXsoGg8Pi/yvTcE+jc/SCimqUVY0h3v7C2sLX0JyQSj5SE7BOQgjDMJN+XXl OOyUAJo1zQbTwsbhpNwtodrpl1z5CQQ6+5hEBfdivmKPyn4UrVx+SX4s4R3o3IzNGw6a Ov4aRvaqqruYxXjGHd6hrnffD6Wy5NSjz/08HnG1yLEUJiJUYgRmkd7NfTue7UznW+WJ 5gJ06ipPlgmK2SwQ4N5t5fakl6kk9CVDmlm0ptz0h4JYj6VISBG7Vgi0EzQkH6yLVDin tTCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xIEpU0tkDVwXDBE078M49Pd4kGLB+/b7BLvzvh1elZc=; b=LMne4gKj8gNKG/gtQqrdyoCvqh5BCCAL1+CjkVEO4ar956d8z+j+i1hsUw2IUSRfee WG5kHyMw3pC1cJqgv10DokMqhTzExSEdSA5oKRYfcrTuR4NlEJCaLTcJaJdSnDWw2tbh uPKgi8jceCpd3OQnGJS7Xv/9Y22CkmgeaUbHUkxWK+vFk0e3d66hBBFmgTPPn1s0alrQ Rxa1v9/eufOTsN/l1ObtoMZZyTSNplQ6RS+Bf8zLMThApLv8nDIurRPkggZ3Cv5ldhoR 4NU/crBqJ906k/k/bAcXxrzx6Q00FmGN8XVZkP5+3QgYM649R2J+yxnNURTFlwAO4iBy rsLw== X-Gm-Message-State: APjAAAWJ4rQSqCEECZ0NzIKlC1YKazEejEP19rtIF5JNVEowi5hrzfXB GYj2xlcl/Mh8E4J86kPAQTk= X-Received: by 2002:a17:902:8e86:: with SMTP id bg6mr18578322plb.240.1571556620184; Sun, 20 Oct 2019 00:30:20 -0700 (PDT) Received: from localhost (221x242x255x113.ap221.ftth.ucom.ne.jp. [221.242.255.113]) by smtp.gmail.com with ESMTPSA id r24sm12025626pfh.69.2019.10.20.00.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2019 00:30:19 -0700 (PDT) From: Sergey Senozhatsky X-Google-Original-From: Sergey Senozhatsky Date: Sun, 20 Oct 2019 16:30:17 +0900 To: Joe Perches Cc: Sergey Senozhatsky , Sergey Senozhatsky , linux-kernel@vger.kernel.org Subject: Re: checkpatch: comparisons with a constant on the left Message-ID: <20191020073017.GA247560@tigerII.localdomain> References: <20191011015225.GA27495@jagdpanzerIV> <8720b5d432ca5ba5e128c241efee22674e012af8.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8720b5d432ca5ba5e128c241efee22674e012af8.camel@perches.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (10/10/19 20:23), Joe Perches wrote: > On Fri, 2019-10-11 at 10:52 +0900, Sergey Senozhatsky wrote: > > Hi Joe, > > Hi Sergey. Hi Joe, For some reason your reply triggered gmail spam filter; took me a while to notice and "recover" it from spam folder. [..] > > Both LINUX_VERSION_CODE and KERNEL_VERSION are constants, so > > I'm wondering if it's worth it to improve that check a tiny > > bit. > > Probably not. > > My preference is for people to ignore checkpatch > message bleats when they don't make overall sense. > > checkpatch thinks anything that uses a form like > "name()" is a function. For example, DMA_BIT_MASK(xxx) can look like a function call yet still be a compile time constant. Another example could be ARRAY_SIZE(xxx), I guess. [..] > but then again just using LINUX_VERSION_CODE emits a > warning message, so it's better to remove whatever is > in the block anyway... That's certainly right. LINUX_VERSION_CODE should not be in the code, I agree. I was thinking more about 'const vs const' comparison in general, less about particular LINUX_VERSION_CODE case. -ss