Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp410388rwr; Wed, 19 Apr 2023 08:06:37 -0700 (PDT) X-Google-Smtp-Source: AKy350YkPD68toSsGonC2BkJPx6qNkSLIoig6YgKom8HDiVowQsoKxCM6LMWfs2Q/hBi3qLPk3n2 X-Received: by 2002:a05:6a00:1402:b0:63d:3f74:9df7 with SMTP id l2-20020a056a00140200b0063d3f749df7mr4220577pfu.34.1681916797201; Wed, 19 Apr 2023 08:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681916797; cv=none; d=google.com; s=arc-20160816; b=L7SFl2fUdnpPRgi95ZJaS3g0WCXmcqmuWP4xQYtsA3V8sssZT0o8ndVd4Ng3JtDUX7 c2mMTWvF1WUjc8Y47WAJv7BDd0xVPd4HCdbI+gj2HRaxt3WtMNbEpa/VyPxSVHKH0vZp SoiS9saBIl5cXrGx6PU29VSD5spo0ItGWursFhJdufteaGV67VlLWZERVWgetXDPO4ql UmhoMm4rZdI2X76PXxOO+Me4EcPcklXR+qSZCaCsSI5lRithYchwdhmxR30OirNcm3G8 7tqwRG9XOPIQF7vXgpHUQNWKJz5h6CTzQL0jFcfQVsxUG1aHXOjZSJUJ3/AC9m4yOY/O SmUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=yhBWE9kipgyyIphIrarFmZOed4nXbeDObDRgO7GVTNk=; b=Ea4rthYx3Si+hcUetKBumjmwI2XiVOjKn333mJclT42Kb0Qmt13zJsftODN4UHx4md r/kME1W/oT82dEO8//2yvjV14TuCDQtBUU+RQUXmFENKjA+sR5nblns9DDBnAJJNhQzK 3SFWVey5ohodkgTZgM+tfSbVNA+9RW2PeUIcg6rR9A1zj4nD7RVSzUJ0188nz8bFvx0b 3p44xapbu8+YglxHK+i9SLPfN0XfzFdADo45E4czfOAE6jYOevXmdzJ2qRuhKznXCx6V x60ug6umLI1OlJ4cRhffkuTp/2nqBCSRCLQVWQugiHoMFlAfgETl6s34X5PeTvPGdXC6 A8vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NsNUXQOU; 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 d19-20020aa797b3000000b0063b74b436a9si12440500pfq.237.2023.04.19.08.06.19; Wed, 19 Apr 2023 08:06:37 -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=NsNUXQOU; 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 S231895AbjDSPA6 (ORCPT + 99 others); Wed, 19 Apr 2023 11:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbjDSPA5 (ORCPT ); Wed, 19 Apr 2023 11:00:57 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6992B4228; Wed, 19 Apr 2023 08:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681916453; x=1713452453; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=cADiMmosj/SSWkrrDxhXKGvOxbsEnjIHtsEpI7voHlM=; b=NsNUXQOUt/ZwNbvmx2/o35vumDPHziFq6eH99HoadqJQu/CxLdpXHj96 kFqwuND7r5zJ5ri7jYmH5TFM4XvsDbCChzbe909Fkb1KOYYhrL79DS/5L SubcPpSAFAmQJrmVPscMSRk9F9qlfy7+xahgwIHP4DZSO6qRJKYYJjMOH wHf58mntoNHWtay8t9AdPd1pppft0iF4G77Xq9IH27YChSAeEuRMPFsTK qH7tVIP2wKM1O4cdP0UxGJ2+nzbzoIg2TnymvDUGIxrzzAlBTYSCSzNE/ ml6XfkqexeaZASdUHxf+6HoSk9xHF8WoByE5kdhk/YM9h9MrlwTtUFt7I w==; X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="342951222" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="342951222" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 08:00:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10685"; a="835335866" X-IronPort-AV: E=Sophos;i="5.99,208,1677571200"; d="scan'208";a="835335866" Received: from ravishan-mobl.amr.corp.intel.com (HELO spandruv-desk1.amr.corp.intel.com) ([10.212.244.185]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2023 08:00:48 -0700 Message-ID: <2d1e5bd2c3725faf8892f30d3b4a980ed594ad85.camel@linux.intel.com> Subject: Re: [PATCH] platform/x86/intel-uncore-freq: Return error on write frequency From: srinivas pandruvada To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, LKML , Zhang Rui , Wendy Wang Date: Wed, 19 Apr 2023 08:00:36 -0700 In-Reply-To: <64e98df-1663-1630-e2bf-5472aced5cac@linux.intel.com> References: <20230418153230.679094-1-srinivas.pandruvada@linux.intel.com> <64e98df-1663-1630-e2bf-5472aced5cac@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 On Wed, 2023-04-19 at 16:35 +0300, Ilpo Järvinen wrote: > 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? With the reorg of the directories, the blame commit is not what which will be shown by "git blame". The original one is: Fixes: 49a474c7ba51 ("platform/x86: Add support for Uncore frequency control") Didn't mark to stable that the current MSR write can't fail on production systems. > > Other than that, > > Reviewed-by: Ilpo Järvinen > > Thanks, Srinivas