From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CBB6A45B97; Tue, 22 Oct 2024 03:34:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B3BF402BC; Tue, 22 Oct 2024 03:34:54 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 9F9E040295 for ; Tue, 22 Oct 2024 03:34:53 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20cbcd71012so45536365ad.3 for ; Mon, 21 Oct 2024 18:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1729560893; x=1730165693; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=hEU7lcXLD+85yjiG4AuAanfhY7R+rsCue6ImY0fF0zU=; b=zc+DaKmZGVO6R6FBAym5tShhVt6XlvIDO5La3rHbx7eai72Dyv0rXoGYPXZ84VTafs 34yLcA7YnZNEChxZAS3MZbw+4owQF3OvYUG0PT0kbOgc6gF+hQ8zUexebIMQQoxLt1Se LWQLpEPVHbxBpfjW1YpyY05hNLd7JaxhzowUOrDzvN/UlhY4yJZCmb+JS3As86CNPtdD Le6qzfypvn549FWl1MnLCjEQhcnNSHUKKxp526WuwVLb9gNWTmh1MFyYKF4kQC8CUUt+ PQPhyJyYFNdHTYdTMvsJYBRAAkuqKpMzcSmJAuMlQN4QnkaYrVXj9QkYmBilQK8+l0jG SMZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729560893; x=1730165693; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hEU7lcXLD+85yjiG4AuAanfhY7R+rsCue6ImY0fF0zU=; b=iiM9VReeOMopbLY27viWhQTFlR9ylQsJzkK0rL8CEFK4wSNkO73npDcE+XIn5PPIpz YRxRjIrRqF7U2Fp4grxV5juh4P8CdNsUDwiBzbVoA7AVYf7X7mf4Gi6FhWzEeTEBu0p+ OKXw4/4g0np9kdSyQwoXffyAjXKvPiU/xv6YhkPuR6HH0XdvleGlc0Awe+3PEnMcWajE vciLLRw9gHYKH9YmW4WaeXYl2hI2UHylVJIFyhBLiWMHTWT8laoQ2kPI26Bk0zvbxoKO glAeQbzGIjDme1JmluX2pKNkPfev4O/4E2k8MkfNKPVPAzOekvQgAFlEbHe2zkHqwyTT jhiA== X-Forwarded-Encrypted: i=1; AJvYcCUmL7oKRg8ojB4IGKCRGhkoYXtnKJupfpnFvwEW2QE7h9XCG0rZZtv+Z9f183eAgxCJLvI=@dpdk.org X-Gm-Message-State: AOJu0YwRk7duWJ+yEZkSxje4ZCiC4tS02f41Dw8rqedcu8KyCVW1Pa5A 89rTiiCkwLBManNKDYTtcDxXeUqE2Q/CjPVS4zJxUYAI6wCx+HWithf7QvxB2pg= X-Google-Smtp-Source: AGHT+IFQU4X7k9RnAVm49rnZXqSDCPcfsSJtgJExpuP43l2DoSnDh6pfUJ/bQ0G4WKOG6atdPNc6pg== X-Received: by 2002:a17:902:e544:b0:20c:ef81:db with SMTP id d9443c01a7336-20e5a8a103bmr172348715ad.28.1729560892628; Mon, 21 Oct 2024 18:34:52 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e7ef0cbe5sm32300075ad.96.2024.10.21.18.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 18:34:52 -0700 (PDT) Date: Mon, 21 Oct 2024 18:34:50 -0700 From: Stephen Hemminger To: Sivaprasad Tummala Cc: , , , , , , , , , Subject: Re: [PATCH v7 0/5] power: refactor power management library Message-ID: <20241021183450.0d0428f2@hermes.local> In-Reply-To: <20241021040724.3325876-1-sivaprasad.tummala@amd.com> References: <20241020092233.2906612-1-sivaprasad.tummala@amd.com> <20241021040724.3325876-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, 21 Oct 2024 04:07:18 +0000 Sivaprasad Tummala wrote: > This patchset refactors the power management library, addressing both > core and uncore power management. The primary changes involve the > creation of dedicated directories for each driver within > 'drivers/power/core/*' and 'drivers/power/uncore/*'. > > This refactor significantly improves code organization, enhances > clarity, and boosts maintainability. It lays the foundation for more > focused development on individual drivers and facilitates seamless > integration of future enhancements, particularly the AMD uncore driver. > > Furthermore, this effort aims to streamline code maintenance by > consolidating common functions for cpufreq and cppc across various > core drivers, thus reducing code duplication. Looks good, a couple of minor things you could address later in other comments. One other thing in the power internals would be to change: int open_core_sysfs_file(FILE **f, const char *mode, const char *format, ...) __rte_format_printf(3, 4); to be similar to existing fopen() FILE *fopen_sysfs_file(const char *mode, const char *format, ...) __rte_format_printf(2, 3) __rte_malloc __rte_dealloc(fclose, 1) That would catch if the file pointer was not handled correctly. Series-Acked-by: Stephen Hemminger