Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2484106ybx; Fri, 8 Nov 2019 05:05:18 -0800 (PST) X-Google-Smtp-Source: APXvYqw053w9DhD4PDrWMb4r4+8KrC2sC+lzVci2M3KImg2ZQLqFrWUNQS4AzR8WTn6JN234OxMc X-Received: by 2002:a17:906:394c:: with SMTP id g12mr8334189eje.233.1573218317907; Fri, 08 Nov 2019 05:05:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573218317; cv=none; d=google.com; s=arc-20160816; b=QPGQAITUgHCdCsnI4A+NVFylb/4R5gdPopGOf/qgbdQCTqqOSQCJWZJel8j90fB4cL EYCVKwNuzUikphyFfAfs2o14oCMverokzAEBPbxGRMhouiKs33zAptP3XDBquSusRFZX xSz3QGdIrmvXO9+aZA0AqU+5dLrpAv0sOBlY5fV7gVP2NvGA5huIR6f2//UTp67A09ra JU7hGAxX6/VTSR0KDFxt4ngD5PY/rOtzQb5ky87Wo8LTtZaNhYthDgfURB3cBdxMtmtN PWsYfg47eJQhbuz5oyAaO9CFV4kcRrhD56KP8ejocsBMnYj1bCti40N2Hu7lYwXnfxD0 FEJA== 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=SSxgB5KIjK5mxonoS/fefEEoV3TflMkJtsEIHhJIAiQ=; b=BvW4cXBzFZ3ySuirC3FEOObjluUUYXv7H3H3dCOT8RQRQClxJvtq82iCKN0R464FvM hZimzvede2L2dSyAiu2FOjN9egAC52Ha2j6/xjMzx1k9flC6TSdHM+3AsGDgH0VramU0 KoKqOGiUPNaD4YS7rbUduQ9sJbuTSREopCqj37gPICGFP4Bm8wEWlIeJZCBzsdEepj61 VnGSfMfPa+U79Ef98LZzCjII0v/lRczDGeGdBFleVU1OCpp8RxVOAz1yY81vYErvyxiY iJ5ri1vkc3qC+jmWgJVFz8q1+vNwqjH6ZmlfAsn0yEtIpYlD0o/UywciBgvRVNfVbE4i D7iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=fk496dIk; 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 c13si4500926edk.4.2019.11.08.05.04.53; Fri, 08 Nov 2019 05:05:17 -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=fk496dIk; 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 S1730562AbfKHNCT (ORCPT + 99 others); Fri, 8 Nov 2019 08:02:19 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44310 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730260AbfKHNCP (ORCPT ); Fri, 8 Nov 2019 08:02:15 -0500 Received: by mail-lj1-f193.google.com with SMTP id g3so6104829ljl.11 for ; Fri, 08 Nov 2019 05:02:13 -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=SSxgB5KIjK5mxonoS/fefEEoV3TflMkJtsEIHhJIAiQ=; b=fk496dIkjJfWH0puX1BW4RjJCK7c9+JJhG6U1/TBsTulBpHSVx/cGc7sFqAR1iTMdP 3zAZ/TuYQluQEe1pVxIJkHHxw9OOzJCOlbYv+gbMR/iAwaLh7N8FW415kYYBe+C4WJ5A /Kx/gFiuFB5pPYGCEIG3XIPCX/uSVcJG6J9u4= 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=SSxgB5KIjK5mxonoS/fefEEoV3TflMkJtsEIHhJIAiQ=; b=b7ueBRLwvJo6WfgbsAVeqKqAb+ZJGws08DjtGCGoVunD1BHp/wzCxY5mVgZRoZ+V6n eg8J1wR3yPm+BriwnzBzQAAqWFTS75ypoAxnRYUH37vWhfoeCAlCwElf9xmaR7B+zYyf qb46hLqkgoqkEuuAOM7FhGdWyKhTJl2KX0+QxINrtqatlir1OnIqyUSmeE/hCzlQbEjj HxFHoITaGmTxZ2jqurHp5EfqFnHqem1svP8wMPArNJaACeVvTh0LdlYqevvslmnh5WIj ObInYcLVKF9jFGN8RVWgTWpvCSdMFJbRuOpp+F48PsPovj6sZD9jE9OF3VF1/HJFYsJs 0JYQ== X-Gm-Message-State: APjAAAVPvPYYvuRvJWvzC9ZQ4y7r5b+KN1WqzkuZuJEq3fg9rxaOnx7/ uU7t4XM8HabcdXtPa300pnw30g== X-Received: by 2002:a2e:98c6:: with SMTP id s6mr6115616ljj.235.1573218132535; Fri, 08 Nov 2019 05:02:12 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.02.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:02:11 -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 , Rasmus Villemoes Subject: [PATCH v4 35/47] soc: fsl: qe: make cpm_muram_free() return void Date: Fri, 8 Nov 2019 14:01:11 +0100 Message-Id: <20191108130123.6839-36-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-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. 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 50be59678903..ea9bef1d2c77 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