Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp41407rdh; Tue, 6 Feb 2024 18:33:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBR573SuvSOfAY+hllnMNydVB0XITo/Bw/duV4rnG39/wTQg/Z8LM8sLrZLdrOwqnzu4pA X-Received: by 2002:a05:6358:d390:b0:176:cf18:d0bb with SMTP id mp16-20020a056358d39000b00176cf18d0bbmr1958783rwb.13.1707273207264; Tue, 06 Feb 2024 18:33:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707273207; cv=pass; d=google.com; s=arc-20160816; b=caNIRoZw09732UNGkmDiW7infYVWFViKbrY56yU5tXRzyicsLC93fBNrMI21HqHdWc QIkDIya7/1+Pw4cxJQlkqRvLnezwBGBZUGmwcqOXrFueHYdUUQKbMnQQnbpMc3wWHXLb l76OnIYEuIOYoRZ2KkGziV2UKGhLAuD5KOqxxKpTvXTddb+OK35sf2nGdjevTSzPXdrH wKAepZVkJa4kIwqnDCWV2FN7Iv27x4/c3H4vIwHEq0G5tlQ66XnkSGf9TXUHECgpHSX9 KTUs18mR3QKJ8NrRIA+BLr69gtA5sMpXIzof+GZb3xsBbRE4XDfB2QmEiM5Gr7hFis6A rTUA== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=jdD1MXDoMqo3V8A2lZViaqrEzxo+zYea4m07LqX6QLE=; fh=TBi6mHHhTvUqRM7s1dH+9jyYfp9x59rmPdfgWIBz/nQ=; b=HsiCsDvShefW3FOANOPWK+TNOhdRtYDAS0R7vCmam5vqiYi5o5+T7vUGafdHZbU8ZO sgzyFOBjNB6a2FWLp2aNZ5MvDbttO3qx9EBQl9C5PutCOQGdSD20UJdFU1Q+t8/37u9u Ssijr4MIR9jHzYQyW5hYHLQyjkUeMPJ/u+J8+PbkQzZnaCTcL1TTfHRRS6B2UGKMKafM HpCo286eIvtJvRlRb0Rqb+U8qdQhu0QYqnqlzoJJSKN3Vp+aiwNLXx6+Spmu20mx1OWB zgeqplqsCi1qWhJS+GRoHed2XQWLLnw0t6lAG0AY5kTFzefkhUbqfcgbuO4TJGLmz8YT t3AA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-55853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCXlOleS8Jds1Rvcr5odOZHkd+lYb6rWaAX9viH7Jnm9dt4b+nkCfuCfJun9O5FWICKhB7paduXrLeNHygCbFWZiKeupMx7gi0LW1F3v0g== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mp14-20020a17090b190e00b00296318fc06esi433964pjb.107.2024.02.06.18.33.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 18:33:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-55853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4396628AA00 for ; Wed, 7 Feb 2024 02:29:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A067F10940; Wed, 7 Feb 2024 02:29:30 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D602FBE9 for ; Wed, 7 Feb 2024 02:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707272970; cv=none; b=mtrWCdGzoRJOJQ/f8BcicBAkSSOxc9NtBCPXwmdNhmDBqmRqbI+h2nv/ki4OafvH9XOiXgppw/wBjQhjUNvcr4xufErR0m7ENvUVy8xWOoBA4uPlkrOlw5BoWXyoSJWkbe2GwEMTaVrVR1S6E0t/xOHz6yDo5TsyhpkPm2g8q2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707272970; c=relaxed/simple; bh=rOi8zvoB9tOUzmjdFJPwR62NPAPMifWU7iPDsk7Dt10=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=exRe94DJh5S/G9reVEaxAvy+A3R1M+C7m6hxuscsqY5q6aNclegbB++TnaghEJ1kZEHl2TERDdafJtc44ljOAWu79PNeN67Wq7KpnwCvm0K2sv+CyCbAD/gSJhUGVH48QYCSK8hAi/J74l5A+fSwqD5uvCelU3V9r7i9+wCa6L8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B68BD1FB; Tue, 6 Feb 2024 18:30:08 -0800 (PST) Received: from [10.162.40.23] (a077893.blr.arm.com [10.162.40.23]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 709133F762; Tue, 6 Feb 2024 18:29:24 -0800 (PST) Message-ID: <8fff4340-368f-4e66-8839-1d54eea301f9@arm.com> Date: Wed, 7 Feb 2024 07:59:20 +0530 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] mm/cma: Drop cma_get_name() Content-Language: en-US To: Andrew Morton Cc: linux-mm@kvack.org, Sumit Semwal , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org References: <20240206041518.438801-1-anshuman.khandual@arm.com> <20240206142550.62bed7715692ddc0071da7d0@linux-foundation.org> From: Anshuman Khandual In-Reply-To: <20240206142550.62bed7715692ddc0071da7d0@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/7/24 03:55, Andrew Morton wrote: > On Tue, 6 Feb 2024 09:45:18 +0530 Anshuman Khandual wrote: > >> cma_get_name() just returns cma->name without any additional transformation >> unlike other helpers such as cma_get_base() and cma_get_size(). This helper >> is not worth the additional indirection, and can be dropped after replacing >> directly with cma->name in the sole caller __add_cma_heap(). > > drivers/dma-buf/heaps/cma_heap.c: In function '__add_cma_heap': > drivers/dma-buf/heaps/cma_heap.c:379:28: error: invalid use of undefined type 'struct cma' > 379 | exp_info.name = cma->name; > | ^~ > > Fixing this would require moving the `struct cma' definition into > cma.h. I don't think that's worthwhile. Existing forward declaration e.g 'struct cma' inside include/linux/cma.h does not seem to sufficient for cma->name to be de-referenced. Agreed - moving the definition for 'struct cma' into include/linux/cma.h is not worthwhile. Hence please drop this patch.