Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8306597rwn; Wed, 14 Sep 2022 12:11:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR6G0PsD/O0vMPk7a7uGfBjXMZEZT0olxCHFan5Zu+iECtFlmIR6tmhOhM8g7skgCPJ+qVQp X-Received: by 2002:a63:6b49:0:b0:42a:910f:b4cf with SMTP id g70-20020a636b49000000b0042a910fb4cfmr32949384pgc.48.1663182692154; Wed, 14 Sep 2022 12:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663182692; cv=none; d=google.com; s=arc-20160816; b=d0WNBnKz8o26RKDh0UNhAgpIfXE11MJp7VRmzAvC6Z9rVVFnhwgKU/ELpnoUzvFki6 CpQij+Q2zuN0pZg8ysejamhMEcrVzgfft83CseJ8+fL91mBdw6w0GNvuy/OUACyIKSYn f5uTjPlUhBWW6J2xpnbU868rBzb7BuZxXXhCoy15D+l9bbbVgJGTmn3AW4fNbJPqFhk2 Ycqh5U9PRG0WOGcwd1FEYxIz0tVHj4Rsc6k2tM2ywye4rtNP+2Sdpb8KqNGMIYrNsBIU V+0C28z+Wp2fcDeXN7LAjvWeRIapIKv6Lb+m+zp8lsUe7y0zYl1hgVVh2+zTBxLzDmXF 42ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=cYREYR0840hv0KrmHqEX8Y3SXszjLS+55C9ZbBx+L7c=; b=LqOkI/HJno6XbrYCJfDP3WYKBxSBdIoJQMntErQPRk1Gyy1Wv+8YAv5cLlEclOKwwV 3bxwR5NX2Duqey7D9WxBGHdnokvw7ivEAVYCZelkQY1LWFbYzn//Nj6WBqHydq+ZhOgV HNKIfMemiCadgTY9CYlc2w4TkOQDli+Z2NOEsvNKZAppy6vXUhnPnliwp9HA1hvCeYw7 iI9Ncdt0bJD9MA4mCtCApHFUSfJesnyBOsUXZboUA3Ozk39jMcxFmxuqxY+mSpk5C0Nz sYZIm9f/X4YnpCffchSdMWa+Up3dI5kZk7mJdqlNXIuaGzaMVOQVdcZCr1ijubFoDiv4 wg3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Fh3Utvox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a170902ef4400b001768b832a41si15238086plx.584.2022.09.14.12.11.20; Wed, 14 Sep 2022 12:11:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Fh3Utvox; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229552AbiINStW (ORCPT + 99 others); Wed, 14 Sep 2022 14:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbiINStV (ORCPT ); Wed, 14 Sep 2022 14:49:21 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50E647C304; Wed, 14 Sep 2022 11:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663181360; x=1694717360; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=wKdkMK97QvN1TsEP3F9ViaVJj7ucJDq4Hjzmntz6m2c=; b=Fh3UtvoxU1spmzbIPrSWppRmZpmkUFZ+B90LH5RNlU588MW+WGKnG7Lr 8fLeg3tjw5+VQDuV+5aETlRQEyuScdrS3DEUVOY/5X/TbCtrWPhbDiVMj 3KJ2Cg9m1fIrmQFXMhhp9ag9jg5PicocMWSP7S+Zj136IxarKHCSRWoUi gjHK3lGuQsB8Aln4MsaxYcnxKvfT5c+bBLyHUm7R/9+Blzb39WaexLHsi z2GN5OkwlNwmhBtPJliYx1+Ts1RCv4cDLdCyLQOnqikjydlBj4UT1Ic9J 8TdhPgvmaKepd4VpgPbW4U/FJ210ZeIa1QpIGDziy1zLWG7/6p6LzWGAg A==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="299873381" X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="299873381" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 11:49:19 -0700 X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="720687930" Received: from msmurdoc-mobl1.amr.corp.intel.com (HELO spandruv-desk1.amr.corp.intel.com) ([10.209.88.211]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 11:49:19 -0700 Message-ID: <6768bf65227ac1da28255e192464bfe15b0403d4.camel@linux.intel.com> Subject: Re: [PATCH] tools/power/x86/intel-speed-select: Remove duplicate macro From: srinivas pandruvada To: Risheng1128 Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 14 Sep 2022 11:49:18 -0700 In-Reply-To: <20220610172714.27772-1-hi4u29ck02@gmail.com> References: <20220610172714.27772-1-hi4u29ck02@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2022-06-11 at 01:27 +0800, Risheng1128 wrote: > There are some macros such as `GENMASK` and `GENMASK_ULL` are > redefined in > `include/linux/bits.h`. Simultaneously, the `GENMASK` in > `include/linux/bits.h` is more secure and prevents the following > situation. > 1. [net: stmmac: Fix misuses of GENMASK > macro](https://reurl.cc/loMWvl) > 2. [clocksource/drivers/npcm: Fix misuse of GENMASK macro]( > https://reurl.cc/b2yr96) > > Therefore, I think these macro could be removed. > Sorry missed this one. > Signed-off-by: Risheng1128 Please follow https://www.kernel.org/doc/html/v4.17/process/submitting-patches.html Developer’s Certificate of Origin 1.1 It says "using your real name (sorry, no pseudonyms or anonymous contributions.)" Thanks, Srinivas > --- >  tools/power/x86/intel-speed-select/Makefile | 1 + >  tools/power/x86/intel-speed-select/isst.h   | 7 +------ >  2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/tools/power/x86/intel-speed-select/Makefile > b/tools/power/x86/intel-speed-select/Makefile > index 7221f2f55e8b..760d49d61955 100644 > --- a/tools/power/x86/intel-speed-select/Makefile > +++ b/tools/power/x86/intel-speed-select/Makefile > @@ -14,6 +14,7 @@ endif >  # (this improves performance and avoids hard-to-debug behaviour); >  MAKEFLAGS += -r >  override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include - > I/usr/include/libnl3 > +override CFLAGS += -I../../../include >  override LDFLAGS += -lnl-genl-3 -lnl-3 >   >  ALL_TARGETS := intel-speed-select > diff --git a/tools/power/x86/intel-speed-select/isst.h > b/tools/power/x86/intel-speed-select/isst.h > index 0796d8c6a882..44de990d182e 100644 > --- a/tools/power/x86/intel-speed-select/isst.h > +++ b/tools/power/x86/intel-speed-select/isst.h > @@ -27,12 +27,7 @@ >   >  #include >  #include > - > -#define BIT(x) (1 << (x)) > -#define BIT_ULL(nr) (1ULL << (nr)) > -#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (sizeof(long) * 8 > - 1 - (h)))) > -#define GENMASK_ULL(h, > l)                                                      \ > -       (((~0ULL) << (l)) & (~0ULL >> (sizeof(long long) * 8 - 1 - > (h)))) > +#include >   >  #define CONFIG_TDP                             0x7f >  #define CONFIG_TDP_GET_LEVELS_INFO             0x00