Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6874529ybc; Thu, 28 Nov 2019 07:00:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwi1B/llychKYVTXl2OcD4RGcdizFWJXajP9Tglir0ra5a/lRcr4ivlKWRffBgeenIzTnPP X-Received: by 2002:a05:6402:602:: with SMTP id n2mr39749611edv.23.1574953210761; Thu, 28 Nov 2019 07:00:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953210; cv=none; d=google.com; s=arc-20160816; b=EwQO7eb+J4/qFtIbQ41IZacfEv5gKkIGV4I9+DotpL/JdU0uD7SxnVAZwMI4HxkA77 q7xg0OQqiLWNFZaIZ3KaeR+sTuk3gqjIWwSn7DU5tsvhnonNgsRQli4IWu118L8bVC4O PSUmTGq/LljHcVxL/kwk7KF0ZszauEAAqNuC6YIsYDup7TtXIEzQhI+R/bXAwy3mAlH1 z6vWi3hfOoVLeVn2HSd1o6kPlNIOvWpMHu3WlR6amqPaIZvNbBYEZ4qzUAr5QdsYG4Br aYsrqlRPn1XFTufwyS0TR7IM5M1dSjI6iw4C+eTIwn/xQU7nkgc3YkD55Sa9jv8a4vJF bA7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L4hA4zEJWHs66Lwy24heYdX9pI+8KbPTU8eYDZ/QqTY=; b=V1wBJGF1OZ0y1SdbJpY5qaq8kx/sRdbZ21czPydonWI4MeeBxwrNglHLJmfR7YCaC/ D74wUBxn4RcmawCRTE69sjB+7gxjjMQF5efoOMS9lsORBKYO/mGHm3aIgQfl42N0AGFf pSvixsZDjnS7300RGVIY92NlsOzD5IZQTscHtFD9mPkdJdoiX+P79ClXlK1T9y/W4sK/ PwA8uPjY0eYjdRJJgMg+zrY886gZZLGwVXJ57T+mmzcqMMG/6fm28/gXyI3Krdta3UcK 9qW58RvuK7YB2U5PXxZJ3bo0UKbSOeudIGXM0C3tPtrZzlA5Uw9DCJlVMjCkOTNXvwNt XxxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=da4NAHVb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz10si11598900ejb.163.2019.11.28.06.59.46; Thu, 28 Nov 2019 07:00:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=da4NAHVb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727545AbfK1O6A (ORCPT + 99 others); Thu, 28 Nov 2019 09:58:00 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46831 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727482AbfK1O5z (ORCPT ); Thu, 28 Nov 2019 09:57:55 -0500 Received: by mail-lj1-f194.google.com with SMTP id e9so28812198ljp.13 for ; Thu, 28 Nov 2019 06:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L4hA4zEJWHs66Lwy24heYdX9pI+8KbPTU8eYDZ/QqTY=; b=da4NAHVb4/ZNRDjdsIzpZ6eBC190ajJKLA6grEN7ZG5F7RsAa84POPBq4Y87Q7auQm xRGGWr7p+8MbKeInnDDiu3EQ3GpQftYCTE4bdeQYkVNsMzUes1Xtm6O1Ec6zmFv7bnSN 0yOz/L6VHetbifeISQ2w0sf4c+jZoGTDGlfoI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L4hA4zEJWHs66Lwy24heYdX9pI+8KbPTU8eYDZ/QqTY=; b=NFT0yuXyTqg1pyI747rpBEV3gSfcJq+aHOk6NSNXBnCdx7249ZyM1Fzr83ygOoXxgt /J0pZTq1AOU+ihjDWWNRpRg25Jsg6ixWi4yidppEQbPWhIpnJJT71LkolpyRVWEv2PqM XrmvA3eZG0WuFgiIDyFSt4HdWP9/yMUm3v657zhiOZrPkIpcmx/56sSLywNySzCr6CiT 5WL2i1nGp0Yu8FTbPSDvOgRYtsc1HGjdNRkOeXqN9fcGMVngB/r+nVLGkJ+7i16sXtt8 +oBT84MRvZKiVBoOMFS/HeneW+2UTQRkIN1vEJ3iNd65ttQOs0XOEyYw2HtE/3RsHIF2 zaDw== X-Gm-Message-State: APjAAAUeVNLZ7ELoxWf52BCoNQGLbmg5sXoWSpCOWupo3V72hB+IEulK /GcV7b01KxHdLOOn4cmYH+nj9g== X-Received: by 2002:a05:651c:32a:: with SMTP id b10mr7947026ljp.132.1574953073001; Thu, 28 Nov 2019 06:57:53 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id u2sm2456803lfl.18.2019.11.28.06.57.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 06:57:52 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Timur Tabi , Rasmus Villemoes Subject: [PATCH v6 36/49] soc: fsl: qe: make cpm_muram_free() return void Date: Thu, 28 Nov 2019 15:55:41 +0100 Message-Id: <20191128145554.1297-37-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191128145554.1297-1-linux@rasmusvillemoes.dk> References: <20191128145554.1297-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nobody uses the return value from cpm_muram_free, and functions that free resources usually return void. One could imagine a use for a "how much have I allocated" a la ksize(), but knowing how much one had access to after the fact is useless. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_common.c | 3 +-- include/soc/fsl/qe/qe.h | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index 84c90105e588..962835488f66 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -170,7 +170,7 @@ EXPORT_SYMBOL(cpm_muram_alloc); * cpm_muram_free - free a chunk of multi-user ram * @offset: The beginning of the chunk as returned by cpm_muram_alloc(). */ -int cpm_muram_free(s32 offset) +void cpm_muram_free(s32 offset) { unsigned long flags; int size; @@ -188,7 +188,6 @@ int cpm_muram_free(s32 offset) } gen_pool_free(muram_pool, offset + GENPOOL_OFFSET, size); spin_unlock_irqrestore(&cpm_muram_lock, flags); - return size; } EXPORT_SYMBOL(cpm_muram_free); diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h index f589ae3f1216..e282ac01ec08 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h @@ -99,7 +99,7 @@ int cpm_muram_init(void); #if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE) s32 cpm_muram_alloc(unsigned long size, unsigned long align); -int cpm_muram_free(s32 offset); +void cpm_muram_free(s32 offset); s32 cpm_muram_alloc_fixed(unsigned long offset, unsigned long size); void __iomem *cpm_muram_addr(unsigned long offset); unsigned long cpm_muram_offset(void __iomem *addr); @@ -111,9 +111,8 @@ static inline s32 cpm_muram_alloc(unsigned long size, return -ENOSYS; } -static inline int cpm_muram_free(s32 offset) +static inline void cpm_muram_free(s32 offset) { - return -ENOSYS; } static inline s32 cpm_muram_alloc_fixed(unsigned long offset, -- 2.23.0