Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1928249rdb; Tue, 3 Oct 2023 05:39:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGt4i3c/4sM8noNdhh2VdgwAkC6eHVYpfDl6xY7TBC98v7hREPq0j64eh9o8cAOL/WbGKK X-Received: by 2002:a92:c26f:0:b0:351:5a77:f169 with SMTP id h15-20020a92c26f000000b003515a77f169mr17622502ild.29.1696336796033; Tue, 03 Oct 2023 05:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696336795; cv=none; d=google.com; s=arc-20160816; b=r3DweAPWZRSr4qQTDoqelS0STA6mmp2iP6fjPQP8uakl6twVjiS9I0ncIlSsQvUvJU vRVir1JU4ZcDi0oqkee8YnF8s6XahjLrmuA2NdwhyXYsFQoKwgTLATFtHxjMgWsgTvmJ Xm204lIMzFjfrgJLUOjMoKQHGM6q5AiUDjmItxOLDgWQKmZVvrnMXviD6ILxp7YPr1aL 9YajphogbjGVLtHsxGbgWV4hy5YwnFjk+gxYOFqFrPOip6rgD3X1uFLgKy01Ee5H4AGN ejgHics3K48fcEdrrgIIvf3yWNmXz4cmBgaP6JjaGl+F2upyLw8e1w0NbAkmVtiGVCyz KOyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ECR/7x6lqKutCE21tMiDm+DwzncvCbKErAMvXLYb+2M=; fh=CnQBB6Ftqk9bebJVVTwS0omEriTocO3IqLY7kUEn/jY=; b=l091EHwKjYr5NV9xSQ2GBxk8LbijpsFnPJWosa3dXd6PAP9JKhWoBG9hHAVZdWTmkP 6grQgVT+Yfv7kXd8/CoA4viA+F6Fppkq3imo1gQ7Ucu5NnaCs9CqCUV+Nrfj1kXJN2QU RtSrmdA+lmMJ11e/zvN+9x4Q4yXNtHJs+QSN0/cs82wdNujgliJ1w9qKgMrp6mYeffqz JyWcs252Yj4keA/FtwJcUHfz9y746Fd91cN3yGPm0iPG5WAixp+2XI1rGXZJ+dNI+cQ8 Aa0askGxJh6ArGFT8IFYHyuPStbGKnnjdgxS/XMScBu7UB/enEdRGNhq965OOhs4x8X5 PH9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YHaZUXRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bs190-20020a6328c7000000b005641315d956si1402131pgb.147.2023.10.03.05.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 05:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YHaZUXRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CE35B801B383; Tue, 3 Oct 2023 05:39:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232124AbjJCMjl (ORCPT + 99 others); Tue, 3 Oct 2023 08:39:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbjJCMjk (ORCPT ); Tue, 3 Oct 2023 08:39:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D039B83; Tue, 3 Oct 2023 05:39:37 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20EE1C433C7; Tue, 3 Oct 2023 12:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1696336777; bh=ECR/7x6lqKutCE21tMiDm+DwzncvCbKErAMvXLYb+2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YHaZUXRoRH9Vl0HrtucLND8/yKXBcIxTpnk4vjfktbwkrc03Or7eFVhPieeWFLOIA hxA8FTCYrtRVQT6wt9EOEbOAOw55YRujZrJT9MfX8Yg3wIRdBkiAt/F59kNfUtCmr6 75tR7xCcakG65rDs8mBITWb1WWktuIVgWfpRlbYs= Date: Tue, 3 Oct 2023 14:39:34 +0200 From: Greg Kroah-Hartman To: Max Filippov Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ilpo =?iso-8859-1?Q?J=E4rvinen?= Subject: Re: [PATCH v4 1/5] serial: core: tidy invalid baudrate handling in uart_get_baud_rate Message-ID: <2023100322-roamer-dab-b96a@gregkh> References: <20230928151631.149333-1-jcmvbkbc@gmail.com> <20230928151631.149333-2-jcmvbkbc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230928151631.149333-2-jcmvbkbc@gmail.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 05:39:53 -0700 (PDT) On Thu, Sep 28, 2023 at 08:16:27AM -0700, Max Filippov wrote: > uart_get_baud_rate has input parameters 'min' and 'max' limiting the > range of acceptable baud rates from the caller's perspective. If neither > current or old termios structures have acceptable baud rate setting and > 9600 is not in the min/max range either the function returns 0 and > issues a warning. > However for a UART that does not support speed of 9600 baud this is > expected behavior. > Clarify that 0 can be (and always could be) returned from the > uart_get_baud_rate. Don't issue a warning in that case. > Move the warinng to the uart_get_divisor instead, which is often called > with the uart_get_baud_rate return value. This doesn't match up with the patch contents anymore :(