Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp297928rwr; Wed, 19 Apr 2023 06:44:56 -0700 (PDT) X-Google-Smtp-Source: AKy350Y3hEM59rHS8gLRik92xiM91Fl7W2++AOj/TUm31GqVOYzQzIxaYCSaxZ4emZ7qutMt51rn X-Received: by 2002:a05:6a21:169b:b0:f0:322a:d84e with SMTP id np27-20020a056a21169b00b000f0322ad84emr3687444pzb.36.1681911896485; Wed, 19 Apr 2023 06:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681911896; cv=none; d=google.com; s=arc-20160816; b=LWS/YVZiEUlR8FTIkhMS64F5Pj3VRJf7rCD9B0+OApL07B9lMc/fm5EdwIKvOm3h/3 FQYWaCnyuujBD7LGxPxMHvNDKhZgRGBXr7gmePHpSBbGIte6qhsGtxgnhmcYNm79XYU8 7BL6WtN2AoLlytw4zl+xX2+o/Lg33JIUBNNqxfh1y/7UKw7S44k8rRxlzpz5B48IVgm3 kInXb/fqTpTwIgNGdLNW1zgRbFqiOUOPl/tVrZrvVUTzt7c787vk+EQ2eXakjMv35TpA MugQ9jfQhDxYX7mQI6lgBHStAHi0SefBLp+1XHxG++sq8vYKethuk/BLwZqWceM10OUC 0VHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=+eOveygy67zvBWlsrRdNavWMUzuubNMpF1olYFIN9cU=; b=NVKjDLAdaiYBB6xuptJhgjVQzZZpDMnIUcnzvTs3DcrGWCK7iGTfHHuZVXLQTCl/eX qzBO9FnT0e4EhcRxrr6BQqPl6F1NE0a7mvqC+bjngEUs7e0JZcVEdF1E8XWQocs8z+DK RSJjwzFae3u3ed9c6TpRz3bsFm1otHPXKLpT1stajTJz/E8kVEET6KPjbpA1hEJ3wzGM +YPfwozWc5DEUvKiMyNY4iPdR5SJHGGhSwaAUxpuHg4SpQ7pfcv24k1BVGXGb2hRvl2p rTGSZ/ReR4la30VAinQ120Fyc5DSk6TeTxmExD0caUnGLueom+1zBczNaWmvkrrAp4eH rPmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Qu0JKMh2; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g16-20020a635650000000b004fb98290dbdsi16656108pgm.50.2023.04.19.06.44.42; Wed, 19 Apr 2023 06:44:56 -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=@intel.com header.s=Intel header.b=Qu0JKMh2; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233471AbjDSNgX (ORCPT + 99 others); Wed, 19 Apr 2023 09:36:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjDSNgV (ORCPT ); Wed, 19 Apr 2023 09:36:21 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85BA115A2A; Wed, 19 Apr 2023 06:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681911343; x=1713447343; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=JTI6bmzuEQ/Nj1Rb7tcpT49wOi4YnttQtFOpUCB/+LA=; b=Qu0JKMh2omqsP1ggO9TT103d+KMbc473hOaMxQuJ3rkPfmkuSPXTMShg cWDmEP/Tc5BVygFHIzfPtUgPfFr+n7P7Th486mInVkANk6WgGSITR6sTE jY9DrwPzKICZ+X8UGAvoEUfd9DtYfSxhpc7/UY+fJpyMldOWXV4VN0Evl eYQoJY2jc4gxPmU3D+KZjWTAmobJMiGrgavMKE5PsW1YZfnwYc58SL++w XBSdbAJMbpHS+w0yTiV5/kyR/SMFMCGWyC7zM9ZhN+XjcQdIUQCAAN9eZ EVY3VHR6kkW/BG4TO9sMRI5Rrr2gWXfIyi5FDPkDR/BIImT0NHOurFEyW Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="345449326" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="345449326" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 06:35:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="721932512" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="721932512" Received: from hbourgeo-mobl2.ger.corp.intel.com ([10.249.34.207]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 06:35:13 -0700 Date: Wed, 19 Apr 2023 16:35:11 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Srinivas Pandruvada cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, LKML , Zhang Rui , Wendy Wang Subject: Re: [PATCH] platform/x86/intel-uncore-freq: Return error on write frequency In-Reply-To: <20230418153230.679094-1-srinivas.pandruvada@linux.intel.com> Message-ID: <64e98df-1663-1630-e2bf-5472aced5cac@linux.intel.com> References: <20230418153230.679094-1-srinivas.pandruvada@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-986072932-1681911315=:1986" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-986072932-1681911315=:1986 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Tue, 18 Apr 2023, 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 > --- > 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; > } Shouldn't this have Fixes tag? Other than that, Reviewed-by: Ilpo J?rvinen -- i. --8323329-986072932-1681911315=:1986--