From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 1182E171093 for ; Tue, 30 Apr 2024 12:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480892; cv=none; b=D9PlM3bb0EltYt+kUSJIEi+d36ntUC9sykt7yLg0TwJe6ezka/6jlmaTnIiMzLGfbCpLdNidN9l6xh+dKdpQ0CtmC0VFz+35EWo/XIqOQVCMMqeQYobOJE4vMF3qOOcT38xdTfw2+E84rW9Mj956lVJkxktR3DnEJOlcxJOYt1k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714480892; c=relaxed/simple; bh=EAkzlUPf87vK95pHRAftB3pj+wg3xtsMqv6zZ2xItvQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SalIWjZOJDqhMmTqOAhuM9+LCSz4H2rUT9N0ijpI6deHp/jg+61YzW2ENHPXqVYnWjD3s3rv/7CcIJ+GEVO5JptfkP54hUWpeMDU7HEhG8Z63xtdtS9bjq7+8JsWDJbNBTgygnHTJqfQj4dZJejOgne6LPGbb9X9SvP4k6Z9A/s= 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.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rCUkLJkh" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5176f217b7bso9887267e87.0 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=Oi7+PzVQBZUR3+z+dxKPRnVzguHP5b8XdQO4jP3fqemPVcoVoA5ywjHwySLjj14esF YrAqdb6/6NKgCX3i09ScPuudipRGnG5xSEmpqGXOhGF5WoggIJRVZ+Tan7XD2XQei2av 5Y+sx0KhQRGiw9zEzzShXuVa+Sc3KxausZ1d4U5tRsnOLrg3B6h5F98WrPZ0D42rNJRo nN1E0OHzW4Ool1h/IJMu0raCJ1EaWD3KjFXD2eW1RmYlspj+eTMNVrxrFOSJbZqQnuRy 2h6uFbYu7l73q3MnBFru+a5pnY0mZ52nLD+hy3bnr8AmomEZLAaGqxJhggthX+4p4Mis /nhg== X-Forwarded-Encrypted: i=1; AJvYcCWBRPTPvGwCT89uUJPXE7o4bhtlHaKdmu/ZYVwCm+Yt+nZZS1/SEsPmpHeo5YrneMUgaVqhdxrE5bgrmOyM9Z+tyMa00ePiEsysPw== X-Gm-Message-State: AOJu0YyW/0mv++c7D1Iby+CB87GJ9g8p9epVPfhsH3jwLvJgdX2R6JXe lxYOxNbLoGARqOpIiX3X852797RMIU+2Se0YEeLnqmJQUQnhCXgSRlaO4SCgmvo= X-Google-Smtp-Source: AGHT+IE/W9/dkxBso0irV5VrVX3LkNO5o5h+kLfYM+38G90SJ9h02blz/dj31DJFXSXcVMXms6NQew== 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-arch@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é