Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2399347rdb; Mon, 12 Feb 2024 03:50:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEugZeRT57u6K1wRrsfXsoXQiiLxjFYKlWGiLtwtHqQT+eGyZWawFp1DlVL8SsriEw+KzM X-Received: by 2002:a05:6808:201f:b0:3c0:34de:423a with SMTP id q31-20020a056808201f00b003c034de423amr4365471oiw.11.1707738631227; Mon, 12 Feb 2024 03:50:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707738631; cv=pass; d=google.com; s=arc-20160816; b=04HHC1oUx7Ng4stiTLhZW/G/7C7s4jF6C8uN2fCT77+18KdVKBq9SH8xG/7r+rBnMc OOFeTiD8K9i/bhFkMYpvBm+q8I3OXAfzuV4Fq0Zwy815DB2eGGINdXS1w2nuVkJ97cFr a5Kmv6Kd3A/IAPTo6yBk+UIEdqDNERyqYeW6fTtHW9i/P55ehr3RqOt9Xo3XxL1eQDCW mhwOv8WEzglIuxl2rM9MzTbSuuFFRssvu8ligfpl9IZW6SZXFFQdRQXgsezLe7UnQBEI T2gb9o7/GUyzzQJB91A/pbObOk24vEl0dsc4e9y5rFaTIvIsYqjbHDKzkFLVHyKmNaU7 r5Fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=organization:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=+t8MdPp07eq9CqKL6LNPYr8LqSTvY4C+C75dZY8HNmg=; fh=k2F7nErn2JNOpbh1mXmHQ6eLnMWodp1lHOrry2edk6Q=; b=JSAJLhO/xcOfyFc7S5MZXiRmTGMs0hIMj5xiyFBRFRDc1eskc1U6SmCtiJyPF0dZzG g6jT/VpUbOZ8TwHPIXqI1ZKbeLsIWjisa8sEpmHsXxml51lzflexetSOwYfdLQvxWWB6 +QAtIU77MM2BIlkFXY7ErEgyDbXO52oMkhb0Czu1BwF/U0cN7y8IK1EMKTYJ836JasvL bPulAoLSyXwv7E+ROZJU6CJJpfjBI85z+VQybdnDuod/ORMrqL1eR0ZsD93uYPXnEfLO DRu2Fxv58ECrMjuOeXh79y1Xf2LEdOc7C6qz/FfJNtogdijoz9I3BeBj67mJSLBHyG+x uP1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q3lQSYuu; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXC63QyJ/3d1Q3Z569mowsXhA+yQ8lHBht9M4LQD5Rs5PmlzOc768X33GAlKlehe4kWRaJyR62fwJj/5dFvh7Npqn8JL0526pSIgIzGpQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a23-20020a637057000000b005d8c57281dfsi132459pgn.410.2024.02.12.03.50.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 03:50:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61454-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; dkim=pass header.i=@intel.com header.s=Intel header.b=Q3lQSYuu; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 D989D283726 for ; Mon, 12 Feb 2024 11:50:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFFDC39ACB; Mon, 12 Feb 2024 11:50:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Q3lQSYuu" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96F7039FC0; Mon, 12 Feb 2024 11:50:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738622; cv=none; b=jf2/RX6i46vdERRwZ1AOsfG7gor6mvjPKSOLFPMyuq0+tncS4ZTYwYmRc0qO3c/nRahOjLw2S0jwgMyVxziRI2HTTVtEU7/ajTuQI7aMvgIJKUFDer6xfybmiAjOm2+ODiic88ETbs97TcViGbRaPoHe3vqRB4aCwuknXe8OtrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707738622; c=relaxed/simple; bh=zJ060dchQ2Wc2UN/j+Vrc5RN6W12O560DY3JiXNzlew=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fyz+lVDW9R9nghSW+1ziq+K0wIbhpF0KX++Jsar5uW1QlG2t8T7aJUOU5ZLL2eS04X1SLUdaviUOVe8PDPSsa21Ciseb9JncsNLG3CkcZyGxnN6VgxAm6d6tDweLj3oidmMgzx6b8hMR+DutbmM6WxQJlaKgBD0bL3sHPtfnduM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Q3lQSYuu; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707738620; x=1739274620; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=zJ060dchQ2Wc2UN/j+Vrc5RN6W12O560DY3JiXNzlew=; b=Q3lQSYuuZltu8AFAbQz2LrouHm9aawJX2JMjpVh+ucl7C6ZySWAuGPlB GMwFMnVbGsaiGVoP3JVWAWgOW5MJWK15GtbfAQOhal7gvOC4hQkMmqVYk UwsFbbXsuhU2Sf0F8iQ4Nb313eFMmCf2rxoa86HeIB33Xx7MnCH9KmVCV XitcK1QXQJzbLMybCc5g5JG8pjkG5Q0DoDLOojUaQ2Z+3wxtMglD03Z3s DNXya3AelXGipYByPsiQhYKl+nTPF8/DUoZCLINwpO9GuvY8+DeGDmIeC +NssTpXbS2zoltQWHC41D+8ZPY3vBku5mmGcq3J8w+k203RMJrlVtrJNf Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="2055106" X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="2055106" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 03:50:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="911459839" X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="911459839" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 03:50:16 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rZUpB-00000003suL-3EH2; Mon, 12 Feb 2024 13:50:13 +0200 Date: Mon, 12 Feb 2024 13:50:13 +0200 From: Andy Shevchenko To: Robin van der Gracht Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Miguel Ojeda , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Burton , Geert Uytterhoeven Subject: Re: [PATCH v1 10/15] auxdisplay: linedisp: Provide a small buffer in the struct linedisp Message-ID: References: <20240208184919.2224986-1-andriy.shevchenko@linux.intel.com> <20240208184919.2224986-11-andriy.shevchenko@linux.intel.com> <20240212092500.62f006cc@ERD993> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240212092500.62f006cc@ERD993> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, Feb 12, 2024 at 09:25:00AM +0100, Robin van der Gracht wrote: > On Thu, 8 Feb 2024 20:48:08 +0200 > Andy Shevchenko wrote: > > + linedisp->num_chars = buf ? num_chars : min(num_chars, LINEDISP_DEFAULT_BUF_SZ); > > It's not a big buffer, but now it's always there even if it's not used. > And even if it's used, it might be only partially used. > Why not used a malloc instead? malloc() infra takes more than this IIRC (something like up to 32 bytes on 64-bit platforms) or comparable sizes. Yes, the malloc() along with the linedisp structure might make sense, but will require more invasive change. Do you want me to drop this one from the set? (I have no hard feelings about it, as I see better way and just having no time for taking care about, as it's not the main point of the series.) -- With Best Regards, Andy Shevchenko