Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1991318lqa; Tue, 30 Apr 2024 05:41:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLvWkkwh4CRl8uIdeUKONrdNdE4/ksKvmhq/lVlyzjFdBxcOcVa4KaZTsm47kKOWGp3oTeMx5r0UcQS5Wi9Ndz3yBFS044sdnS11Mg9Q== X-Google-Smtp-Source: AGHT+IFH5OPECQ7TwJbWTOblAYxjj1NNZSEuJbDcoDE7x0lT7ttrFcrw6oQY2MnPy3UZqFYpV7v8 X-Received: by 2002:a5d:5686:0:b0:34c:54c8:3f2d with SMTP id f6-20020a5d5686000000b0034c54c83f2dmr11222223wrv.69.1714480901673; Tue, 30 Apr 2024 05:41:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714480901; cv=pass; d=google.com; s=arc-20160816; b=KPjVmoN9ulazdonenqygSNjcydDAUdA+KGQGH6+UnYqr/Lf3bkbn+4E2DqcvkJhiwm 0Hfz+mKPN/iKeyaiGZU4f2CTbT6WaSVXljC3nLp9j66xl7RJS3VhBCxnK4856nQgYcS3 XEaeCtht4h24p0+5DslpXQxzpECzs5w87VhRtuGYsi3xH/mNUWm9ojj7mLHniPAXT5wn HQiKinLaKkxuOf8tqaQakMdbzzpAI4FNQ7vMjrs2h6I8oy/yNmH5aFlK/Qzss6CO0ILE PsoFqtIixhrX8DnU4Wmk2Ufsf3E1szi8lpXVfQt/KZFjDuw4pOBW64nqCsalnhUXyuc5 j7eg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Z1zoRl9JNX91wxTFZ95WC2aOVdcvQqQ9ebO1YgbX9Wg=; fh=+7ozxzkJM9A97d37YPYGk88BaZT3wBqrs+EyNW1whnk=; b=M7DIQANapvMLfFvBWkrV4H7zTU3QWAZC5JgmssYaxUl+jmwYq0zFH5MU24LiCEffve DzBiG/Yo6ykL0lcvSInWkXCcyLhPAQYCr2m6ebeDLp50Sh3bt0gd/AIQbe2qNkbZRMRD QQuCKSP4tFrfGdZnrJTOGxLDYLbHuJhlAj5EO7PEeVlHreMYSQuAUBOhFEAFFbJO0EBH inaWdzMDhfOUaz0D7gJJ36kAybD/d9mszyeMiIIGGjKd2T4u7fSZK6mcsWhKNLplSsGE I/p0tFYF18lxFYbg9WlEDKzdaYLO0TKt81JMilxLL3XKM2HAzvJfv94hei3xr6tpAf// T07w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rCUkLJkh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163925-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hh15-20020a170906a94f00b00a55a8a66b8dsi12032322ejb.932.2024.04.30.05.41.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:41:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rCUkLJkh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163925-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1DFAD1F22A79 for ; Tue, 30 Apr 2024 12:41:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C70B0171098; Tue, 30 Apr 2024 12:41:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rCUkLJkh" Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 111F817107D for ; Tue, 30 Apr 2024 12:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480891; cv=none; b=rqmYU2mj1n5Mh2qlc0vodHnD0iFjjzJRZQYgONDHU7HuaP7p4L9HyJt9XmyNh5+wNP8TQg/Ur/FcalLdFarp/cbZUT0IhJm+iGFtIdCuwZYAGKOT8fJ9nYDwwuenMNku5eBP27OWVvVDfNwoP0BKSil8kIJYfRH3ARd5Ywd7GDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480891; c=relaxed/simple; bh=EAkzlUPf87vK95pHRAftB3pj+wg3xtsMqv6zZ2xItvQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gGn20xYNfz8oTK/1XBTKgp1Un4RwVH04uh+46B7cmiOD9GalZDllN0zLk8QY3Jq3Qpo12M53vWRhL5CoSc2DN3Cr7oAcJtiSpI29pGEtY/4dnsakfp5MiKRVaStjRGi9SKu0XNB8tutTZT3AijItAYkFTaIPNAMMMZRjQu4G+XY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rCUkLJkh; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-51d62b0ecb7so4351918e87.3 for ; Tue, 30 Apr 2024 05:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714480887; x=1715085687; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Z1zoRl9JNX91wxTFZ95WC2aOVdcvQqQ9ebO1YgbX9Wg=; b=rCUkLJkhLTkgj0vZihEKMMlayMlyQ0cFd5TjQa4r0Jddy9PM8aCO1E3l7kk3Jz+SUF GTxeTJy6Av4km5bpOTg+yOSdPvXLSxOOjQOnHQ2TvI4NWTmDRXUzyCtCI6w4n7BCRqGX v4+oj/UExjkdmINHO5kKztJkDTG3sBR9dELu5NYmlYuEYKnM0rCgpyyvYeDrL9ZYplzq iS3G0yI2yJVRGCkMXuuwWC4nn+VzEi5zzi8/pE6CeziV9EPrz4BvedgrUJ9mrXQ5Csgr 13a2BhyUlVwR/HKh44guz0Y+9aQRhc91cb/h1t+FvIAqWHgb/xjcLN8z5V0kus9g72LW 4QRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714480887; x=1715085687; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z1zoRl9JNX91wxTFZ95WC2aOVdcvQqQ9ebO1YgbX9Wg=; b=VifFfzon+Yc7bZepPLtverQVV4WKGw62nBrme/An10Ra/E1De42thJwMxbynGT1EuX cLElEPfE/VeSv/xkf/L5ztlx+6NYILz/DqKmz7mBKnRcPRjHVVGVw/yONK3KJI21iHuN cI6sHuHpKMv7WMo+mJ+Uh6LnO6kEfVYtimR7mWlgmqCzHV58m0G3PvNBdNwUysRl4O5M gfQImQHADDfmdiwvQpmgTFe/bL1yGJZgr/BbrFiLQCQ5GWlR+zv9UQZwJuF/IuOMbfl2 nzhMlB1eMWLx4OqfCBXyVNy9YAo/+YWcNxlDzC1TEhJ3X1tWOHVqC+RDjaEmsKqu9WD2 z9ww== X-Forwarded-Encrypted: i=1; AJvYcCXYZRp/7SzmJGgmQ0eIz4dAVZWymhtTSjsKjfoGmgWhk9TenmChGOuXMCgiNyYfhdxpyh6IalZjK9Mqtr1NvNc8XAH+ILldrTL5GY7E X-Gm-Message-State: AOJu0Yww+Q+DcLC835lK3xcGha2vGgjZ5+68YdGmb7qm8+NEZMZLtFPL SyX0TMhDSe5rLCMUsYxl5YuJyLMAURR4KtttM2QuQLuiH0rcwXNPmnURo/m2uE0= X-Received: by 2002:a05:6512:45c:b0:51c:2c7e:ac92 with SMTP id y28-20020a056512045c00b0051c2c7eac92mr11527071lfk.23.1714480887229; Tue, 30 Apr 2024 05:41:27 -0700 (PDT) Received: from [192.168.69.100] (mab78-h01-176-184-55-179.dsl.sta.abo.bbox.fr. [176.184.55.179]) by smtp.gmail.com with ESMTPSA id i27-20020a17090639db00b00a58eab2bf0fsm3928326eje.179.2024.04.30.05.41.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 05:41:26 -0700 (PDT) Message-ID: Date: Tue, 30 Apr 2024 14:41:22 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 05/16] module: make module_memory_{alloc,free} more self-contained To: Mike Rapoport , linux-kernel@vger.kernel.org Cc: Alexandre Ghiti , Andrew Morton , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Donald Dutile , Eric Chanudet , Heiko Carstens , Helge Deller , Huacai Chen , Kent Overstreet , Luis Chamberlain , Mark Rutland , Masami Hiramatsu , Michael Ellerman , Nadav Amit , Palmer Dabbelt , Peter Zijlstra , Rick Edgecombe , Russell King , Sam Ravnborg , Song Liu , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org References: <20240429121620.1186447-1-rppt@kernel.org> <20240429121620.1186447-6-rppt@kernel.org> Content-Language: en-US From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <20240429121620.1186447-6-rppt@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29/4/24 14:16, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Move the logic related to the memory allocation and freeing into > module_memory_alloc() and module_memory_free(). > > Signed-off-by: Mike Rapoport (IBM) > --- > kernel/module/main.c | 64 +++++++++++++++++++++++++++----------------- > 1 file changed, 39 insertions(+), 25 deletions(-) Nice code simplification. Reviewed-by: Philippe Mathieu-Daudé