From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com [209.85.167.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EBDE35C19F for ; Tue, 26 May 2026 19:53:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779825211; cv=none; b=KTu8YtzGiJo/J9MPHToftGcoOMPYGAmux4uN0Ah1r/Xv/0vkRQ8iZKdQQQE7A2fztcI6FJ2uTwOx7XEYG2te8tggLxoVljt5vhqbMyypK0g/+uEU5L5X3YhU+rB7Z1VN7437g2p4tOWMLYd7HEoRoJk2vz5BabXbdTqEqkoC8QU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779825211; c=relaxed/simple; bh=dE7J76x8aAqJ9HesULfopGFkeUPQNruPhKBvN5ZHlsA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bifi4jTt9yu6o08oxuBxla0lM4t1TkwsaNd6vE2p8qrGIkECunXK0HcAPz0DrhX59srsjkoK7O96x0QzGtypPWYDUh6c+7G/2Kcov8sx54LhlSmfFza0yCQ9XTR5RG9hLgh6wanvOA1y6b/xYjyXXk2XtmdxPSu8cA+c5n41/rs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=c3fyby8S; arc=none smtp.client-ip=209.85.167.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="c3fyby8S" Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-47cba53479aso7188390b6e.0 for ; Tue, 26 May 2026 12:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1779825209; x=1780430009; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QAdocN/MUNa3IV9ySx+A6X6CoKTNG4dpoXhYgNKtmVU=; b=c3fyby8SSdkQmA/LWTO++LWSRUWXL6yV+s8IBqXokCL6Ub2+tGXPV+MQNEE9g19Ie2 9gIg9fLt0mx7lH2GpsyR/8RuDYXe5ULlCwoF0DIoxKgJnc4K7K3uCvlhBi/uHS7EDrje Hr2QADxMadmJKHh+pI533Xv8Yg7GU6JxZ2CSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779825209; x=1780430009; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QAdocN/MUNa3IV9ySx+A6X6CoKTNG4dpoXhYgNKtmVU=; b=G+VSlLDMCfNq+D3rcPaPDEmnQZe+wWEVq8JOOfbrQlLYSnb2rAbzFomEldaBJbGu4u v7+Mla6pUeIBkD1MmD1AtPqd8BGGqB6cd+C7yAglkls43qaJUP4k6QiqvQ1xyIU/bc3h 47tJmM9621HsveMAtonAhjI9jVJSI/Ul1UuSqbM7xEogTLHI8Z7yPX0m/URLwt3ruMop 0jDbB53C23BkUcrmuP4i3YrSeyoHgASfSXnE9RSCynNEux6SOjKEXJxuMvho/r+4MgLV DxXvLxlzraYcZntxjWtD2YWu7xOPzrebwtDkiK8eyTnlB+l3TNX4fw+KOGkkxaX24IDH lsbw== X-Forwarded-Encrypted: i=1; AFNElJ/JRjWljx/yRMDVDRLZhVU1HPB1dmFZBij28m9QANuduf8LoL02dfiEm4DloL2Q1njFC5wbqMwqpu+n8XI=@vger.kernel.org X-Gm-Message-State: AOJu0YwwouSoLvLfF8DfaFeOHsVcpexrqLX7Tq9mZ55jS7JbaIL+jhWJ L0yqsl5QqsutD0M2/RiRC9Vwzz0uBpcIjfAVgoG65XOUSBWdyymXr5Ika1I40HL1lGo= X-Gm-Gg: Acq92OGJ58MfgTsFtoWvaIAKRailbD9XC4JCqNKDxU/Jrp44z8wGRlr6ecvyQbNYTo6 rxHRP2W8ziBV4J/T/Ct0Oz7oT5xV00bDz4KcqR2Jh7BORFBybFjO/P3RcUqqKgCNn5YCFNbYlJd 3S7TxlGMEt0HriBaswnb1iQ9Sg2dCM7Vlp6cCg+aBbV/jMeREUga5In8UxlH+FQdltgkgZQn+Gj i/7BLuG90/upbxC7JaIn61dPL3UdnFSklmTVRh+H1xqgzFPVBv/UBgKfK33GmMd3anuHna55lBO 4iYRHpk/RmW4rPH8wcbDkZlYv1xb8Fek82T5UsdJSLlcd4t2gZr14vLsYGaDXYlCzNRPcM5qgfK EM2HsfeJ5I/gWERmcyYlE3m9tshd1bnLnjpX+aD8i2gXr6sFvR1BYWeh5szu32MnLTi3BrC+U69 PZ3g6d5QOMXkMAYCJESOrtfXqR3Q5yEk2ChSjFSMLpIQ== X-Received: by 2002:a05:6808:144a:b0:484:b678:6c55 with SMTP id 5614622812f47-4854a2ae856mr11699492b6e.38.1779825209252; Tue, 26 May 2026 12:53:29 -0700 (PDT) Received: from [192.168.1.14] ([38.15.57.99]) by smtp.gmail.com with ESMTPSA id 5614622812f47-485b5f0661bsm497316b6e.13.2026.05.26.12.53.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 May 2026 12:53:28 -0700 (PDT) Message-ID: Date: Tue, 26 May 2026 13:53:27 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cpupower: Implement powercap enabled setters To: =?UTF-8?Q?Mateusz_Ja=C5=9Bkiewicz?= Cc: Thomas Renninger , Shuah Khan , "John B. Wyatt IV" , John Kacur , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <60d4f650-84fc-4697-8390-98d9e9ebed31@linuxfoundation.org> <20260512161101.2993280-1-jaskiewiczteo@gmail.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20260512161101.2993280-1-jaskiewiczteo@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/12/26 10:11, Mateusz Jaśkiewicz wrote: > powercap_set_enabled() and powercap_zone_set_enabled() are part of the > public libcpupower API, but both currently return success without > updating sysfs. > > Write the requested value to the matching enabled attribute so callers > can actually enable or disable the powercap control type or zone, and > report write failures back to the caller. > > --- Everything after the the 3 dots gets thrown away when patch is applied. Patch version changes should be added after the Signed-off-by s > Changes in v2: > - Check current enabled value before writing. > - Use fd < 0 style for open() failures. > - Print sysfs open/write failures with perror(). > - Drop the sizeof(path) typecast. > > Signed-off-by: Mateusz Jaśkiewicz > --- Here > tools/power/cpupower/lib/powercap.c | 58 +++++++++++++++++++++++------ > 1 file changed, 47 insertions(+), 11 deletions(-) > Please fix this and send me v3. thanks, -- Shuah