From patchwork Wed Apr 20 04:27:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12819731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD8F7C4332F for ; Wed, 20 Apr 2022 04:27:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 035386B007D; Wed, 20 Apr 2022 00:27:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EDAC56B007E; Wed, 20 Apr 2022 00:27:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6D446B0081; Wed, 20 Apr 2022 00:27:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id A874A6B007D for ; Wed, 20 Apr 2022 00:27:42 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5A2FA1831A9E3 for ; Wed, 20 Apr 2022 04:27:42 +0000 (UTC) X-FDA: 79375973964.31.01F47EB Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf06.hostedemail.com (Postfix) with ESMTP id 3245F18001B for ; Wed, 20 Apr 2022 04:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=y/ovE2zEN2kLE1A2FRhhKOcbowUkSDsa75PAEbmLpG0=; b=DOLgdQusEBimK3YMZin66R/BjH KIRbmuSDM431VciG1e+sHRmUmEJugXKLLuYU0opQ6vCOSlhXMD61pZTijh1pLp2D6HqCYHj4dOoVA 1aSheLwYo2wRPaY7OoXnoXSvxO+f+8BaosjWBlbP2S/I9iIbRmm8BYezQCvXuutIxIvA+TnsrRVCG ErhmbmsIu0ylBSu6HsHJkDbf/VkBmNN3fGWgy1ycMqiil+m2ICbNMhlgUcElPyS9085V54ijOiU1J uVzgoOvSXJMRoLHMkkMM6lLG7F8SFLajpZZyyamt4pij31J78UapbHHe+WJOueO34ANbLEvC76q4E BI4fq2xg==; Received: from 089144220023.atnat0029.highway.webapn.at ([89.144.220.23] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nh1wH-007FFj-Jr; Wed, 20 Apr 2022 04:27:38 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Paolo Valente , Tejun Heo , James Smart , Dick Kennedy , linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-nvme@lists.infradead.org, linux-mm@kvack.org Subject: [PATCH 03/15] nvme-fc: fold t fc_update_appid into fc_appid_store Date: Wed, 20 Apr 2022 06:27:11 +0200 Message-Id: <20220420042723.1010598-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220420042723.1010598-1-hch@lst.de> References: <20220420042723.1010598-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspam-User: X-Rspamd-Queue-Id: 3245F18001B X-Stat-Signature: kwgt8j59mu4714mhs64b1jq9eu6u37bc Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=DOLgdQus; spf=none (imf06.hostedemail.com: domain of BATV+4b42fcde86a6810335df+6814+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+4b42fcde86a6810335df+6814+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none X-Rspamd-Server: rspam01 X-HE-Tag: 1650428861-953617 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: No need for this wrapper. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/fc.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index caa0fff7bf1f5..7ae72c7a211b9 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -3857,12 +3857,10 @@ static int fc_parse_cgrpid(const char *buf, u64 *id) } /* - * fc_update_appid: Parse and update the appid in the blkcg associated with - * cgroupid. - * @buf: buf contains both cgrpid and appid info - * @count: size of the buffer + * Parse and update the appid in the blkcg associated with the cgroupid. */ -static int fc_update_appid(const char *buf, size_t count) +static ssize_t fc_appid_store(struct device *dev, + struct device_attribute *attr, const char *buf, size_t count) { u64 cgrp_id; int appid_len = 0; @@ -3890,17 +3888,6 @@ static int fc_update_appid(const char *buf, size_t count) return ret; return count; } - -static ssize_t fc_appid_store(struct device *dev, - struct device_attribute *attr, const char *buf, size_t count) -{ - int ret = 0; - - ret = fc_update_appid(buf, count); - if (ret < 0) - return -EINVAL; - return count; -} static DEVICE_ATTR(appid_store, 0200, NULL, fc_appid_store); #endif /* CONFIG_BLK_CGROUP_FC_APPID */