From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.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 05067386423 for ; Fri, 10 Jul 2026 08:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783673373; cv=none; b=AIkzjnaoyM6rIDRCGPJqv/PhrwsmLAK+bqC51Euu2zt5dx+m4CkPLM0uXAN3n7P+CkzsZh8evG5Pv0R6e0qN66kcC9O5i02/J/tHVUIn8RILlBHZeVpR6u3D/3y9/Xz51PUyuYM5eizdC9/CHJix+VIzhign8fExnav/6TvCPkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783673373; c=relaxed/simple; bh=vk3L6CjVb4k6Towa7TMZfKZLg9CLHT4UZOFuMeqp7DU=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kxo/4aSSyj5XlUVce80/in5oFCP4fG6OvhjSlPLM8Ux48LkuYzDjBi6HHwV/c+/U0TDQ1bKIVJxvmeqQFKWZgv9vJ7m0Sq1MDk/FHmEXhY9AJH54K15cWvBZvYWQ2XzKNF1vpjNdeO8dVebeAWIxupKYfK1c9+IipxICtWiQem8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ks2s3FvX; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ks2s3FvX" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-47dec32798aso724478f8f.1 for ; Fri, 10 Jul 2026 01:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783673370; x=1784278170; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:subject:cc:to:from:date:message-id:from:to:cc:subject :date:message-id:reply-to:content-type; bh=CBpdXNjx5aPhmwL55Ue3+3hjUTkf4aoi2KLiHWPmg7c=; b=Ks2s3FvXlQCLv5yPeAROKx1JaAURwRMS1T0sQxL/Pc8SS/heWmaqbX8CwXcCsmUrac 9FCNwqBCMQcopNmoC5MpTb8Nw0uO2iVtvN0pRqF5oL5upRRh4yjP2RoXZNKwQEDzcsME kvfHmxNEDoboU36TlGt/ov/bF0g5PAHsPCdvEdibl9k+jI0As5Ww0MfMCb0ttBIBG6pl YOuGmEtx6NyKmcHMn1LZc1RAdALLPrUom5HRDc7FqV/ExggppGfghVik9F/GHqXrpy9v WiyyOHe1dfJyT01Ag4b3y9p6zi3sJPLUlSS4RUeFyZDsX//cqf92iS5eosLkCDju1042 hdNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783673370; x=1784278170; h=in-reply-to:content-disposition:content-type:mime-version :references:subject:cc:to:from:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=CBpdXNjx5aPhmwL55Ue3+3hjUTkf4aoi2KLiHWPmg7c=; b=deb6Su/WEVlk3IoIMHEQmMM8PLK4Cf2m4QihEfVVphq/31Ld3zdZWhBhZ7+1LGf4NW kXJf+18Y99dXAz1MAPRN0+e4+Gkxk7nVcxbavDgGcwaJ/xIoJ6FW+Nrpskz6QQsgbFgV b1FdMxc3267tW1JgLDGNuWHRIOA7qPUvb8H+jflSiMPv3Pcuc6CWuCNGuGMEt+RpWnKy fQqCcMpFVFUOeklMrTxPn3oIEBUf43R0AW/GETmEq8xBblMvapM8PJ1bFBQGGeBmRZjF m9tLb9QNSAQW+fUAKD9Ql6YwkWTxgmBzq0tJzKtxt/EHrmE5WsQEtHJ56KWlb7kX91u8 wrsw== X-Forwarded-Encrypted: i=1; AHgh+RpcQURheeoMFEm3arqydQnt/yuLGJBPMC6BWlhTADqdNKX9PcW9lWbdZ8aX1Lox9Jtw7CWYT0wA+z8HzCI=@vger.kernel.org X-Gm-Message-State: AOJu0YwBIbzujrg+kfpbMyOdt8o1w/Kk20nQswHT94rBHaMAVINS79pB VW0uJzpC3RIB80MIXHI8KZ/9l/rDl08YP7CZDi1/GDhnpyDkeFsNRtCP X-Gm-Gg: AfdE7ckXE+eqtrXXw1n4Mesn6WsWY4RwGwt3jKK+RgWJrPAmrT6pMuzUrb/SqyePzUi APiJe9v03gmsBzsQB4CkQtposs/WoiPtDY3LOqPTPveWv85z4RMah9zSmIYrcbdoU9AfcWy+6nX 0vwAyEQQ8NnhmeaDgdZ7kW/G0aPFz7JqzQrcmMjcTDZ6cPGgpkePRSbh55ETa828hoj8iYiy6py uY/HIn4ppmTJuPn60cfDhpBAZCysUYKsmLW0qcbxTuviS1hniMKGY/O7jhCKDvZyqiaqUtvtLkC fTK5XA5eJRbn6Oija5Gu2Yjs/JgLO5m0ar11rmvPEBUxYlNMtQGiG/5zjfyqSCZLqpmzf6jlCF6 S4ZwvWjxDQac6raAdqnOlvd9/xLvxd653g1bvhCDENpKwn/DGBLCx8cRjx4MJ4TOdAOAh2ddRCn qsJJtUuQ9ABhJgWlnBUmBeNAwAUiRIRK92vjPJZ3rxYLiVF2PdnNh6xFP6oNwtjjE= X-Received: by 2002:a5d:64c9:0:b0:47d:ee9d:90ce with SMTP id ffacd0b85a97d-47df074d3d5mr12379184f8f.4.1783673370055; Fri, 10 Jul 2026 01:49:30 -0700 (PDT) Received: from Ansuel-XPS. (host-95-248-227-210.retail.telecomitalia.it. [95.248.227.210]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa0f214d2sm57234697f8f.33.2026.07.10.01.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 01:49:29 -0700 (PDT) Message-ID: <6a50b219.359f6b3d.bc30a.da0b@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 10 Jul 2026 10:49:27 +0200 From: Christian Marangi To: Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Benjamin Larsson , John Ogness , Marco Felsch , Gerhard Engleder , Jiaxun Yang , Randy Dunlap , Binbin Zhou , Rong Zhang , Lukas Wunner , Lubomir Rintel , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH 2/4] serial: 8250: export serial8250_get_baud_rate() References: <20260709205656.319531-1-ansuelsmth@gmail.com> <20260709205656.319531-3-ansuelsmth@gmail.com> <6a501516.a1b3dc3f.1e550b.96ea@mx.google.com> 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: On Fri, Jul 10, 2026 at 11:20:48AM +0300, Andy Shevchenko wrote: > On Thu, Jul 09, 2026 at 11:39:32PM +0200, Christian Marangi wrote: > > On Fri, Jul 10, 2026 at 12:35:02AM +0300, Andy Shevchenko wrote: > > > On Thu, Jul 09, 2026 at 10:56:50PM +0200, Christian Marangi wrote: > > > > Some driver might need to access the current baud rate to correctly > > > > configure it. > > > > > > > > Export the serial8250_get_baud_rate() function to limit code duplication. > > > > > > Why? > > > > > > We have _get_divisor() / _set_divisor() for exactly that purpose, no? > > > > I can only see set and I'm not following how that helps with any driver > > that needs to get the baud_rate? > > You operate on the divisor settings instead of baud rate. Otherwise, can > you elaborate why no other (out of dozens!) driver needs this? What do > you try to achieve with the baud rate settings exactly? > Ok it wasn't easy to find but you were referring to the .set_divisor and .get_divisor. Now it's clear. Yes I guess I can use them instead of exporting this function. Sorry for the noise and thanks for the suggestion! -- Ansuel