Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2626662rwb; Mon, 15 Aug 2022 08:33:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR74De/pG7gbZ2fo7fVm5PAkV75YCgIoGmNYBFKURpa1oKK4IN2TtKgNbmQJor8Dyju1yPc6 X-Received: by 2002:a05:6402:4301:b0:43e:4d31:6ec0 with SMTP id m1-20020a056402430100b0043e4d316ec0mr15398768edc.69.1660577587987; Mon, 15 Aug 2022 08:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660577587; cv=none; d=google.com; s=arc-20160816; b=qwCnA/LyE7s1jVh2rkB1zxc3cbFEyyOju8GkeXzJaVknybR/Kcl3sSacY8/Ogn8+cG 9oNPznkoAeYMn+6RzIQIiTQviUxHXhTg6b7FQRTlXV3cfUpj0zqlP2p+dcEuJvpjeV6M CbpHgcQooqyU2oD/0bORaFpdpE42mIYMKWaNMbVGG6hUJux59eAiRDycJuodgtNKaDL3 OmPAnU91yp7/GqB0QbfCCBRB1DX3ZmlGrhCOH2/ohJ6O+clU4BsAdAR9IBmmacEJdOCy j8qNTmM2gsZ5km/ewf3z2hnfqGAcDRv5KFbTtMRVCTRhdX4edoauUT/Cc2y1SpAnqdvd d9XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=11iOYJYT2e13K8s6XgKD9aJwBI/D1n9/1GA9l3T5EdU=; b=R9cJNzUIqjLBbmGqgcM9J0vq3qy3T/zGlKyqDOS0GXPKU219FQznr8wZxvmkXsu7S5 hQoFsa7sETisvXIEErS3pEGwRNjP1s42QwiZeg9ShfJ4drgUJGMZHgQ9rKUDN5L3BTSd FnmPd/9MRDysXloZ7x8ECBGvNaEZdCSN8dJrGBKXUGuQLGHRZJMWuaTv2iBPF6FADuR3 S1NBiYKyTXd+MAM67+7HGLiPMa6W6m+VFLgDlg9QK2+z5wLOiOOOsdQI7fm6w02/0Nqz AP2gm8Cc+9GkWa+mOqn3KfEExqgMhCPjQET/kEJdlNcsssCPUDTB7hQ+O2WGYU2TeeM7 y7UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=0l0n8J8o; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a0564021e8e00b0043d4a5ee1a8si8854201edf.577.2022.08.15.08.32.42; Mon, 15 Aug 2022 08:33:07 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=0l0n8J8o; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232438AbiHOPEp (ORCPT + 99 others); Mon, 15 Aug 2022 11:04:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbiHOPEn (ORCPT ); Mon, 15 Aug 2022 11:04:43 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF8B81EAF3 for ; Mon, 15 Aug 2022 08:04:41 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id z12so9372240wrs.9 for ; Mon, 15 Aug 2022 08:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=11iOYJYT2e13K8s6XgKD9aJwBI/D1n9/1GA9l3T5EdU=; b=0l0n8J8oLHQpw4KO8ZATjxzBbGtlxSKPh+Zx6UM+b2l1FA0FDzTM/QPWNO1fZBfrUR VBA8H+qC06qDCkiYQ/bmbJ+W8jBscgSQIpgwYr5wQwH6C6ZYLJbz2IsQp/jk7onr+aRZ yYwEywQrDeJ4Z1dxbojsOpUyLhuFjYsPNMEBtRO6dYB4TyMjzlsCOQjHxpBmTkhfrWAo d/KgW8BaVQjCp/ZclzPwng3lKX0/JTrUO3TxG4MuBaqttdIFwHb4sqyqN4NJohD/tnrh VxDH/uetuwZhNWinL+gZYHxHEmeSaTHz8tVsrVdtldSfLZUz8hpGB8V+01//OLrR1i0g YntA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=11iOYJYT2e13K8s6XgKD9aJwBI/D1n9/1GA9l3T5EdU=; b=LqLuMCoEvmyVRyN9iGqM8acp8rZKUsHqsmrZJGG0GJSKBpfBI68Rthx9Pb2kMNdxYX uO3kRN0G/CvusAAshB7XsHtzBVllI5XRYGdvBlXbTYjPXkJeQV0mZRnv+NdObrb/61mB pT58Ez934rVi0eTz2OfACdxxrj91CjbEzyAQm9obSwRX4M8/RA0oKFcMa85Buw16HP37 rm7MEoS8r5KiC9YdkmwZ0lcC4q29AHaGJ7n9AyDiRNLU6bRlcV+XPXXz7vSL5pGIYfGG r329+6EBwHJ0b1zL1EMUbn//ytWGPQ6JB93BVrDyxft9gH6VR1u61VXMK9Jl+ilQ/StQ fNZg== X-Gm-Message-State: ACgBeo2v9HWZXKi5p1xbNv0c4V95fQApOE1dxBHxZEeKN7m43d7LVpOe NtHlU1fEo9BU3KPWOCufQ27oag== X-Received: by 2002:adf:fe4d:0:b0:223:9815:b1e5 with SMTP id m13-20020adffe4d000000b002239815b1e5mr8572076wrs.709.1660575880388; Mon, 15 Aug 2022 08:04:40 -0700 (PDT) Received: from localhost ([109.180.234.208]) by smtp.gmail.com with ESMTPSA id v17-20020a5d43d1000000b0021eed2414c9sm7364535wrr.40.2022.08.15.08.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 08:04:39 -0700 (PDT) From: Punit Agrawal To: Perry Yuan Cc: , , , , , , , , , , , , Subject: Re: [PATCH v5 1/7] cpufreq: amd-pstate: cleanup the unused and duplicated headers declaration References: <20220814163548.326686-1-Perry.Yuan@amd.com> <20220814163548.326686-2-Perry.Yuan@amd.com> Date: Mon, 15 Aug 2022 16:04:38 +0100 In-Reply-To: <20220814163548.326686-2-Perry.Yuan@amd.com> (Perry Yuan's message of "Mon, 15 Aug 2022 00:35:42 +0800") Message-ID: <87fshxim49.fsf@stealth> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 Hi Perry, Perry Yuan writes: > Cleanup the headers declaration which are not used > actually and some duplicated declaration which is declarated in some > other headers already, it will help to simplify the header part. We usually don't get rid of indirectly included headers as long as definitions from header are used in the code. This avoids problems if for some reason the included header gets dropped - it'll leave the code in an uncompilable state. More below. > > Reviewed-by: Huang Rui > Acked-by: Viresh Kumar > Signed-off-by: Perry Yuan > --- > drivers/cpufreq/amd-pstate.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c > index 9ac75c1cde9c..19a078e232dd 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -31,19 +31,14 @@ > #include > #include > #include > -#include > #include > #include > #include > #include > > -#include > #include > > #include > -#include On a quick scan, I noticed that "boot_cpu_data" and "boot_cpu_has()" in the module init function are defined in "asm/processor.h" that is being removed here. It may compile for now but makes the code more fragile as explained above. Please ensure that only the header files that have no definitions used in this file (amd-pstate.c) are dropped. > -#include > -#include > #include "amd-pstate-trace.h" > > #define AMD_PSTATE_TRANSITION_LATENCY 0x20000