Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp182670lqb; Tue, 16 Apr 2024 12:18:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDpEEBbOgOpG/FkQFxA72qeOrtFGbQ8cf8ppOivn+KeiehCHowxCstgdL6OoP68LD3Tuq6woItDOP3oobpuylc/C+NUPz9QKp8imV8CQ== X-Google-Smtp-Source: AGHT+IHz7qD6Tt97GNajkx4CdCav2HT7H2/w4fnfk/U4KE7YixQHod2u/gg95AIhQ5ST21AL8ZMj X-Received: by 2002:a05:6808:298b:b0:3c3:c94c:bbbc with SMTP id ex11-20020a056808298b00b003c3c94cbbbcmr14378834oib.45.1713295138258; Tue, 16 Apr 2024 12:18:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713295138; cv=pass; d=google.com; s=arc-20160816; b=CxnqHT2zvx7MYJxH+h+XZqmk4bVMQMbOzRnsrM8urZ9IGx2w1hqA3P9IrUP7Wmgs87 i/iL/Q1TPEQHvQZ/s0DqgRoqiI/sfbcL++CEMG/lwPoeUnXitjnY5JCp95Aqfqz76KuG e5hkBotLUSTiVfsm1zR3sm9f8LSgUF/WxsFCD2+gA0ynJXUuagy7rHfoqKJFpQEE3BVA TKuUtBH/h+t0/GxTVjNMrZLCuU+bhIFm7bimA3was/OT7FOvPWlh3oHYvZis17wl3G7m NaKebWEcHEhvGs8dbBNcK0wE6+IgJcaERHG5u2v7NqZaaQpjvbQQXun5By1lGDS5MIMk cZ6g== 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=AaFN8FOwIC5LRyiu5qbYesbSI+J9Y04PX3O32H22lYY=; fh=BQXfQT2oHMe2ElyoGbMHQno8K7ZmIROaTbDFkCWstHE=; b=0NphG86SmDg6vWYuzAPhSq5uIUCsvA8XLAK3sZHF2TSt5L7QYGs5wOIX5+0ds0M/xV zIwtiz806CVzomRCMVc4zQvmEL8jNrSb7t7fCDt/K5Dijd6ueK5r1f63hpAyW6QtBJLi xd+KcORrjR1iOpxW6yxbhWKzYB92o963PWEe0tygiHmSqi2AK3Ot4D5IfncnvWKEDjrD 1fUcMig87YfUIlRpThR1rnqg6OQHmiDW6pspLQpLXF37zsmi9XSvbNaNT3hcF124sq3t ktzl62dd3Fsnf1synctgt3SZqu650SCPGr7DlA9gU8S7j6UPg+75BsUsZvA22G9L6mNo na4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BxFY9opg; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-147459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f8-20020ac84708000000b0043492d175d3si12105702qtp.439.2024.04.16.12.18.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 12:18:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BxFY9opg; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-147459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147459-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 00A7C1C20D97 for ; Tue, 16 Apr 2024 19:18:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3AC81384A8; Tue, 16 Apr 2024 19:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BxFY9opg" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 8E39D137C2A; Tue, 16 Apr 2024 19:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713295119; cv=none; b=DAcXRDqmwfG2l09ZcsVW0tUzsFXENcs//5j9JeyqFtAiz1k5wedbg7VOiE5d3XLv+2KnHQGH0/qmyLJoDB49TMsRAO6dRSjAUdx422NypxNs0YzW8KA6bRAXhaD9EWj8OgCIZAEuqgjh6xtzo9brgGIu+iWNjF/9ktLWsnFmtN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713295119; c=relaxed/simple; bh=yqAl2l6rQBoY1qZSGTS9h32f0FNm91n/xwPxkRH8eyQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CAVdcszL8RpfDi5jwVUbYU7EDVAiClr5iWNTm3XHiHCUO6xGCj0DWHDLMULROHKL7gN8FTd1OYqGRl696MYC+V+vNx1QUk7xaIyik6pv9Z231eVEPcEbjK+FQjBwPEXivi1UkJFPxs/dJfhCZIXvNGwtXddua4yJEs6Wei01Tuk= 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=BxFY9opg; arc=none smtp.client-ip=192.198.163.14 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=1713295117; x=1744831117; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=yqAl2l6rQBoY1qZSGTS9h32f0FNm91n/xwPxkRH8eyQ=; b=BxFY9opgSoNHqYtxxNEOqh2S6y5/sCj2JcXEeGy+t+sm2AxwU2W50QQh DGaRJTGpCmcFLavSuky1MuvihOCsxnn6TLjhHaFiFyqj5pn1ZAdxVO7Ib 2chd+tF1mIkVnOQ6nvVcpTtzElUMDDRI284viIlDP9XHAt0FaAI8YEEo7 GvzRMu9t/CHfAFR7AhBNxYL2/r7qjLy+4okStvdyzhW54JfCBvvx8nK9q VstxWPwi+/1JMDGi/jeyiJ9LfI8B5eGbAzAJL11BFaDedDus9v3XtR0Rx xFtqf9DQUYfTFRFTTB1EO81F+bekz5S7i+KtJDZ3LWRRAIDZeZrrB41Lv g==; X-CSE-ConnectionGUID: yzVOgKC5QK+bXLFtEmvoEA== X-CSE-MsgGUID: nABbMqbSSmKhh1v/eom6pA== X-IronPort-AV: E=McAfee;i="6600,9927,11046"; a="8979719" X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="8979719" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 12:18:36 -0700 X-CSE-ConnectionGUID: 5SCBKKUiQVC5wYPGjMeeuw== X-CSE-MsgGUID: pHQBlPSNT7OY4lXdmvGmyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,206,1708416000"; d="scan'208";a="22429255" Received: from smile.fi.intel.com ([10.237.72.54]) by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Apr 2024 12:18:34 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rwoK7-00000004nky-3gby; Tue, 16 Apr 2024 22:18:31 +0300 Date: Tue, 16 Apr 2024 22:18:31 +0300 From: Andy Shevchenko To: Michael Pratt Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , Wander Lairson Costa , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Vamshi Gajjela Subject: Re: [PATCH v2 2/3] serial: 8250: Store whether fifo device is enabled Message-ID: References: <20240416182741.22514-1-mcpratt@pm.me> <20240416182741.22514-3-mcpratt@pm.me> 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: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Tue, Apr 16, 2024 at 07:09:52PM +0000, Michael Pratt wrote: > On Tuesday, April 16th, 2024 at 14:55, Andy Shevchenko wrote: > > > @@ -3392,6 +3392,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, > > > > > + up->fifo_enable = use_fifo; > > > > This seems incorrect / not the only one place to assign this. What if the > > console not enabled at compile time? What if it's not enabled at boot time? > > This is 8250 specific, and currently, it's the only place there > where it's decided whether or not to use the fifo device > by checking a bunch of flags and values. Exactly, as initial commit is related to the kernel console _only_. While your code, IIUC (correct me, if I'm wrong) is for any use of the port. > If you're suggesting that these checks are moved out of this function somewhere else, > I would probably agree with that, but let's save that idea for the future... Not really (again, IIUC above), as console can be not enabled, and hence serial8250_console_write() never been called and you will have false impression that there is no FIFO in use. > If you're suggesting that there could be a null pointer, I don't think that's possible > in this function... (the name of the pointer being "up" might be confusing?) > > Sorry if I'm misunderstanding what you mean. -- With Best Regards, Andy Shevchenko