From patchwork Wed Apr 1 16:17:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 228356 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C38DBC2D0F0 for ; Wed, 1 Apr 2020 16:49:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 705EA20719 for ; Wed, 1 Apr 2020 16:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585759795; bh=Z1w89FV4JZlPqLk2RgxsoXO5Gc+e9qwNFYqSxgTC6Gs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ghqrxC7AdVDulO1cEbfCZI/GSUu5pfCRlAuA//KvkbvxozBU0+fpYg/pF/f02btSy Deln+bojxwTT81r+O79k8gxsgl+YZDHLQfnOd5lGOaD6PrJQC11nBpyNl3GRD5wKFr hTOdWveHXuK3b7qNfqfSBQtEFjD+n2I3VPHiwpmE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389277AbgDAQl1 (ORCPT ); Wed, 1 Apr 2020 12:41:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:41732 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389417AbgDAQlY (ORCPT ); Wed, 1 Apr 2020 12:41:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87CED20658; Wed, 1 Apr 2020 16:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585759284; bh=Z1w89FV4JZlPqLk2RgxsoXO5Gc+e9qwNFYqSxgTC6Gs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OyzJY+qJwJ43YhTgaxNQC8IUo2YjtkoJfpvbLn8aIlKc8jqZ980R2BwFCPY4AuAcd RyS7SrLGdaSC+FKb7LOnT1XOou9JAhqfyFj2zjwZL3dMY2GODoPyoXELHMHkspagjX jBOpDyJ8omL0iQXPRBmkhaHS5aLXmtZ6M0mOJjVk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Shishkin , Andy Shevchenko Subject: [PATCH 4.14 031/148] intel_th: Fix user-visible error codes Date: Wed, 1 Apr 2020 18:17:03 +0200 Message-Id: <20200401161555.582816530@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161552.245876366@linuxfoundation.org> References: <20200401161552.245876366@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Alexander Shishkin commit ce666be89a8a09c5924ff08fc32e119f974bdab6 upstream. There are a few places in the driver that end up returning ENOTSUPP to the user, replace those with EINVAL. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver") Cc: stable@vger.kernel.org # v4.4+ Link: https://lore.kernel.org/r/20200317062215.15598-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/intel_th/msu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -499,7 +499,7 @@ static int msc_configure(struct msc *msc lockdep_assert_held(&msc->buf_mutex); if (msc->mode > MSC_MODE_MULTI) - return -ENOTSUPP; + return -EINVAL; if (msc->mode == MSC_MODE_MULTI) msc_buffer_clear_hw_header(msc); @@ -950,7 +950,7 @@ static int msc_buffer_alloc(struct msc * } else if (msc->mode == MSC_MODE_MULTI) { ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins); } else { - ret = -ENOTSUPP; + ret = -EINVAL; } if (!ret) { @@ -1173,7 +1173,7 @@ static ssize_t intel_th_msc_read(struct if (ret >= 0) *ppos = iter->offset; } else { - ret = -ENOTSUPP; + ret = -EINVAL; } put_count: