Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7202445rwr; Tue, 25 Apr 2023 09:24:45 -0700 (PDT) X-Google-Smtp-Source: AKy350YzfdSmdrMSLDkUUTWnJueUN5sUFAk1rJ/V96mncwwd/ZK22Ervp+SJwWo3bXWU5jS2ZHW/ X-Received: by 2002:a17:90a:7607:b0:23d:4e9d:2eb0 with SMTP id s7-20020a17090a760700b0023d4e9d2eb0mr18513446pjk.36.1682439884650; Tue, 25 Apr 2023 09:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682439884; cv=none; d=google.com; s=arc-20160816; b=F0Lv0lDRZrZ5T3QYVO6IEM6+gTMpTtVYLQjaxFNM3RksV2AmapqBJNf7N9mPC5ikgu ZXUnSLdAcQJi7bt/YPniDdhwBu4CFyQOCOYCzbzvVm74uDs1rZuzEj2eA0uScdjOzLHN 75B9VOVWykCpulLI7cJ3IdiV6BTljGFbTY9iYHRJyCQpkwQhxPShq4VejYxKhgp38cF5 ibUZM7kdZTtfUnh6qOxS3HeA/lnejsuSnH2siuIEZ07bTSxRHXpKOereEZgF3l3CSjFO 4XUd8u6BD2MeRPmjqBGgI1Dubtx+C5TloMYw7wD0gbG5GkShvgFIWCU/NFVnUZJq/349 r/fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wc3sq+wvLOMloVG0PPLLAe5aQ9YXWrAOIEnr/ok0Pnk=; b=umyGMGt5x9302Apx4CdkmOPacn3cfk0J8nFhq7EsTpmGrkCF7vTYmv1odOJSY1gHOv zPlIlQlBRsx1EJ0Enas6AbqOT6xOtvhP0oRni3lJ1EepMeAsyamK4LmqGjdEr3vNc1E1 VUj2dsAZ6eNxSwIo0J6SY4HoK1EtVyun4uzTBr5cOxLjOyW68EiFcyLH8eMWktVNHaLF d5ZyXhSsBuGTsJPfWeWugQBWuxKvArNHh5kddhHFKtRXQPG7KBmd5mZgs5RZmSGQo7ps u7jBmCTLk5g4ofKk3freKCbsxwTkr0ZbODQd2RETr8aDdN2Q/hX/mzJc96nCTKsww17h 8O2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hq9x/7Yo"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a170902ccc200b001a6f3949171si14275026ple.24.2023.04.25.09.24.31; Tue, 25 Apr 2023 09:24:44 -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=@redhat.com header.s=mimecast20190719 header.b="hq9x/7Yo"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234299AbjDYQXB (ORCPT + 99 others); Tue, 25 Apr 2023 12:23:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233893AbjDYQW7 (ORCPT ); Tue, 25 Apr 2023 12:22:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D178F2685 for ; Tue, 25 Apr 2023 09:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682439732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wc3sq+wvLOMloVG0PPLLAe5aQ9YXWrAOIEnr/ok0Pnk=; b=hq9x/7YoUB69nAlzQclERkxFgu1cFWL2Fcr7wV8PFS2qBxregpONPM4KsWcVPnChKijG7V HM1UFSqENDsHRl6AnIQDU7nSwdL+EgqTZwv5QHtcQ/Fqj16pGmKggZkeiJnVn8BeEsfk63 QJ5PdRaYRclpH9nTgb3xEJsi9qasJIQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-209-KpvS1w0JNb2aqi4ZU4GrbA-1; Tue, 25 Apr 2023 12:22:09 -0400 X-MC-Unique: KpvS1w0JNb2aqi4ZU4GrbA-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-95836419a73so403416966b.0 for ; Tue, 25 Apr 2023 09:22:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682439728; x=1685031728; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wc3sq+wvLOMloVG0PPLLAe5aQ9YXWrAOIEnr/ok0Pnk=; b=Dw2eLaSrAybRNg60wSneYmKgNvFfhl4JClw0dwaqWSqy+g0Dd+A2xsE8HvIIhFTBgd yujLjoiEChFgCqCFiFr9SCAHNOVD5YSwz1Pp5simOhOowozZ/mfAsJekg6gemp5F7rdm pDmGjJjkqsV20EQi6wN8p25kJ9JSG8jWcewwpSaKVld60XFzQywsjC6SLOIXG8oMjqM2 FaV9eXoOBIbM/JcjcjW4eFi0tgpLWer4NKKi9J7nl9BqKi7MchMr2rdXfnXhY2uYTdgn 9a9a3LYZIrX27O7nogBWU/b0RUHhPzzT+YC5lm4gSme+dX/eOE+hsf969aXY75/P4j+f pNiA== X-Gm-Message-State: AAQBX9eDZgjQV29JEAystDdU/M6pcaQNKsWyoFj+equbDD0KhbtMJ/L9 gwCkA9V6gzBiL5ErKD3DjdHRru5euX8iQJDRgUsFbOZPaNaFU4ly0EYUCSLMuOMTSZgp4U3GRX5 9pd4IzmSq+JrzDo4I+kNwIaxP X-Received: by 2002:a17:907:3fa7:b0:94a:bd17:fc40 with SMTP id hr39-20020a1709073fa700b0094abd17fc40mr16489454ejc.25.1682439728454; Tue, 25 Apr 2023 09:22:08 -0700 (PDT) X-Received: by 2002:a17:907:3fa7:b0:94a:bd17:fc40 with SMTP id hr39-20020a1709073fa700b0094abd17fc40mr16489354ejc.25.1682439727017; Tue, 25 Apr 2023 09:22:07 -0700 (PDT) Received: from ?IPV6:2001:1c00:2a07:3a01:67e5:daf9:cec0:df6? (2001-1c00-2a07-3a01-67e5-daf9-cec0-0df6.cable.dynamic.v6.ziggo.nl. [2001:1c00:2a07:3a01:67e5:daf9:cec0:df6]) by smtp.gmail.com with ESMTPSA id vc14-20020a170907d08e00b00959c07bdbc8sm2095008ejc.100.2023.04.25.09.22.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 09:22:06 -0700 (PDT) Message-ID: Date: Tue, 25 Apr 2023 18:22:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] platform/x86/intel-uncore-freq: Return error on write frequency Content-Language: en-US To: Srinivas Pandruvada , markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Rui , Wendy Wang References: <20230418153230.679094-1-srinivas.pandruvada@linux.intel.com> From: Hans de Goede In-Reply-To: <20230418153230.679094-1-srinivas.pandruvada@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, On 4/18/23 17:32, Srinivas Pandruvada wrote: > Currently when the uncore_write() returns error, it is silently > ignored. Return error to user space when uncore_write() fails. > > Signed-off-by: Srinivas Pandruvada > Reviewed-by: Zhang Rui > Tested-by: Wendy Wang Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Patches which are added to review-hans now are intended for the next rc1. This branch will get rebased to the next rc1 when it is out and after the rebasing the contents of review-hans will be pushed to the platform-drivers-x86/for-next branch. Regards, Hans > --- > This patch has no dependency on TPMI patches for uncore support. > > .../x86/intel/uncore-frequency/uncore-frequency-common.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c > index cb24de9e97dc..fa8f14c925ec 100644 > --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c > +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c > @@ -44,14 +44,18 @@ static ssize_t store_min_max_freq_khz(struct uncore_data *data, > int min_max) > { > unsigned int input; > + int ret; > > if (kstrtouint(buf, 10, &input)) > return -EINVAL; > > mutex_lock(&uncore_lock); > - uncore_write(data, input, min_max); > + ret = uncore_write(data, input, min_max); > mutex_unlock(&uncore_lock); > > + if (ret) > + return ret; > + > return count; > } >