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 1912745D17; Sat, 16 Nov 2024 01:55:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D7EE402BB; Sat, 16 Nov 2024 01:55:46 +0100 (CET) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id E7496402A7 for ; Sat, 16 Nov 2024 01:55:44 +0100 (CET) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71e681bc315so1752853b3a.0 for ; Fri, 15 Nov 2024 16:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731718544; x=1732323344; 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=sVLD8/B9B6jUt55zjPResbcaO20CYwBs7eewSbqNu0U=; b=ebmI3HP4IeOT5oFtpk1b0XCwxkTyYpHP3A8uONR8q3Vtuaq/VB1ef/VYbVBtvyY3Lb XvYu9xtlPeu8jM/ZmvaIrP0b6HEmMyO+/FXwlWXopE7xcSFUzl7zOwKIVneMt5YgJPrf 9WA+cVGGJZZxijntQJZ3EnploW6FxxLrOmOkwlVFpg7HkJZlG0q0zQjHNEgIdup81brd /pL8IOvNHR7MRnZMzec6PImjhGwr2aMBvEjhTFUVHzABZXDNawMzvUjNSLjjZe3if+3z W8Okl79SAMuY4HmUK4L+PPRTQCJWeeUYAxK/wiEEdaOhGUC05qhH1LEEcmkI1d27CaA2 FMtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731718544; x=1732323344; 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=sVLD8/B9B6jUt55zjPResbcaO20CYwBs7eewSbqNu0U=; b=DFetx8IpLjMPVQD7l/QCzfSgdVprGUTm8C4ZoKaH1prAawkHR8yIuMsZ1tXc7PeFKt C7pJwL3iFn3cqECu7dDtSDhii/kjDcHn+rw8VV3DKMGuk8aWlD+QsgpuPdoK2q8TSt7v u8mENQ/7wXcD/aVKgxZ7gBbA5v9JSjFouk7Lv3swD68SWnNXIDF7m0RSp9GpyI/Jng+D 0FM4VKQTqTt5UWrdQVodxMedxupDkH6FgEc8jMMxd7pKkhb8GECuli3SY29Q4QiF1I55 Il4F3M5UucJ3N67OMoJkd3XtBJPr90Lrik2Zyf588pl4Q6rrNbi9woUGyrmqt7BA2fvq zWFw== X-Forwarded-Encrypted: i=1; AJvYcCWDc1IhgszUM8oeC5E9/5jUcYMzTDBAXUZsoHL/FzriXCyW922cOJR+ikSu7XqqX5tg614=@dpdk.org X-Gm-Message-State: AOJu0YwkaHxadQg9KM2TUQ/+pQFdkYLqfDenjFc+nuCSN+AkjiK5DaEK iOKyqumAL0qDBriQXNJQS2IfthztKirh+5h3WL2QGhPPbaQv1Tz1ZLgmt6OtUUk= X-Google-Smtp-Source: AGHT+IF2wZISmcAWJ/g4ZRJgy2L0JeZDaY/Y0fRYdMWakGyxo7fsy1ZkRozUwgGQJfslWtxwGAbNUQ== X-Received: by 2002:a05:6a00:179e:b0:724:6c21:f0c with SMTP id d2e1a72fcca58-72475fbc463mr8664193b3a.4.1731718543833; Fri, 15 Nov 2024 16:55:43 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7247720044asm2023551b3a.179.2024.11.15.16.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 16:55:43 -0800 (PST) Date: Fri, 15 Nov 2024 16:55:41 -0800 From: Stephen Hemminger To: Sivaprasad Tummala Cc: , , , , , , , , , Subject: Re: [PATCH v10 2/6] power: refactor uncore power management library Message-ID: <20241115165541.0297c09f@hermes.local> In-Reply-To: <20241028195556.450033-3-sivaprasad.tummala@amd.com> References: <20241023051139.1066426-1-sivaprasad.tummala@amd.com> <20241028195556.450033-1-sivaprasad.tummala@amd.com> <20241028195556.450033-3-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, 28 Oct 2024 19:55:52 +0000 Sivaprasad Tummala wrote: > + /* Auto Detect Environment */ > + RTE_TAILQ_FOREACH(ops, &uncore_ops_list, next) > + if (ops) { > + POWER_LOG(INFO, > + "Attempting to initialise %s power management...", > + ops->name); > + ret = ops->init(pkg, die); > + if (ret == 0) { > + for (env = 0; env < RTE_DIM(uncore_env_str); env++) > + if (strncmp(ops->name, uncore_env_str[env], > + RTE_POWER_UNCORE_DRIVER_NAMESZ) == 0) { > + rte_power_set_uncore_env(env); > + goto out; > + } > + } > + } > out: Static analyzer complains: lib/power/rte_power_uncore.c:113:1: warning: V547 Expression 'ops' is always true. Since the macro RTE_TAILQ_FOREACH() iterates until ops is NULL, that whole if() part can be removed.