Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2398709imb; Mon, 4 Mar 2019 04:16:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzx09kr+7WkrfGk4vT9Lz7AlWI2iMMC53zKKHs1h9HzKDdtpFEkRIQQcW5nkca98NGSKEWB X-Received: by 2002:a62:64c6:: with SMTP id y189mr19980764pfb.103.1551701801962; Mon, 04 Mar 2019 04:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551701801; cv=none; d=google.com; s=arc-20160816; b=AIK8iLJw9WhpLk2NEqj9DdX29FDClsrq+oGJKFwSgk6IXhdoupNi1kYgqfq9b3H+fM ucJuGXmrMpV1DqIRWwLqj2Gs4RJNWc7JifoI+rJHOwkv9s5myGzXx/KvJ9XOVsyugI3e VFj8k6egbh7a+LGcp4zuE0B8heCMyeQibfaD7J39d585Ol/5QJclukDGNWfuOgazg7/3 9+xd7hBp1Fmxq1jPia5qaxXVFMnPxhoLAXACBOVwMBaplT3mYdeeQayAYXqgk0trR0+r e8X48nq1no2xvi6JPiaqkqBon7s9OEeMhEgU/tQWKVUZ4PBIDM1ISD4dDuwrtwCtimj5 gCig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=GR2T5rIPLlkK8I75c51CpfSvS8MvwWmZWnr7JL9VU9M=; b=mC1l8xZEI2syYwVVqZ1w0mTtZ5+OouwjQI19283k3/xIRzmeZHkvwM4QNsyJ1I8GEp 1AZYwlhZQ9YXyimFSqi+NsPIVBLZf2XU8KiMgqJgA9eWkgKutm5uILlSOZKqJDmjN+cJ TD6jSH0znAcLOd2QvRhdavJgHT/qcrMaCr0Q7X2rRPYH+SBHcidppro4rMEKpDK6u8Ib /PrMI99cJXmgvAGI7Jb+zuPAxpN84GZY1OfLlH8CpZoP40HFN0K23JzWO4+73kIrgdUx 1U0k1ejOV60hGVNe01NX238hSlGuY3ALjUUmsNDO/4MmgvkumkRszWee77yEvpIqA1zV uzpQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si5209014pgi.422.2019.03.04.04.16.26; Mon, 04 Mar 2019 04:16:41 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbfCDLpV (ORCPT + 99 others); Mon, 4 Mar 2019 06:45:21 -0500 Received: from mga11.intel.com ([192.55.52.93]:16060 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbfCDLpV (ORCPT ); Mon, 4 Mar 2019 06:45:21 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2019 03:45:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,439,1544515200"; d="scan'208";a="151851798" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.172]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2019 03:45:19 -0800 From: Jani Nikula To: kbuild test robot Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org, Andrew Morton , Chris Wilson Subject: Re: [PATCH] log2: make is_power_of_2() integer constant expression when possible In-Reply-To: <201903041956.eLAFVhUK%fengguang.wu@intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20190301125207.30973-1-jani.nikula@intel.com> <201903041956.eLAFVhUK%fengguang.wu@intel.com> Date: Mon, 04 Mar 2019 13:47:17 +0200 Message-ID: <87o96qn9oa.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 Mar 2019, kbuild test robot wrote: > Hi Jani, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v5.0 next-20190301] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Jani-Nikula/log2-make-is_power_of_2-integer-constant-expression-when-possible/20190304-153529 > config: microblaze-mmu_defconfig (attached as .config) > compiler: microblaze-linux-gcc (GCC) 8.2.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=8.2.0 make.cross ARCH=microblaze > > All warnings (new ones prefixed by >>): > >>> arch/microblaze/mm/pgtable.c:185: warning: "is_power_of_2" redefined > #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) Oh wow, a copy of is_power_of_2() introduced 10 years ago, apparently unused since its introduction. BR, Jani. > > In file included from include/linux/kernel.h:12, > from arch/microblaze/mm/pgtable.c:30: > include/linux/log2.h:56: note: this is the location of the previous definition > #define is_power_of_2(n) \ > > > vim +/is_power_of_2 +185 arch/microblaze/mm/pgtable.c > > 15902bf6 Michal Simek 2009-05-26 183 > 15902bf6 Michal Simek 2009-05-26 184 /* is x a power of 2? */ > 15902bf6 Michal Simek 2009-05-26 @185 #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) > 15902bf6 Michal Simek 2009-05-26 186 > > :::::: The code at line 185 was first introduced by commit > :::::: 15902bf63c8332946e5a1f48a72e3ae22874b11b microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section update > > :::::: TO: Michal Simek > :::::: CC: Michal Simek > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation -- Jani Nikula, Intel Open Source Graphics Center