Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp1881137rdb; Sun, 27 Aug 2023 00:59:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG5wuVCQWnlKiOFwxbTVpvUBhhfqFBP/jT975dVdH4TTv2i/CZiUb/dWv50qIae/yA7Y5s X-Received: by 2002:aa7:c3c3:0:b0:523:47b0:9077 with SMTP id l3-20020aa7c3c3000000b0052347b09077mr15965908edr.38.1693123174257; Sun, 27 Aug 2023 00:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693123174; cv=none; d=google.com; s=arc-20160816; b=bEjefpVjQqhShW8eNbYyJjsjpNa5eX0lBy6tMp9DsAPAiXdmkEgZbiaOtZ5vtO5Umx M15d7TGQzIg4P7oRGaitfql+9Cw8Tecp9fLiu6gDGhUJiJ3BLokWo36IzarzoGT304cF YIQFMwqiauz26dAdRJ3xgDu/DgQ70t+eQdcT+i6fFql5oo1H3fGq681Ueqk9H7VYvhcQ FeEJswI6nSY8WG7MPvjLKyiByCA3mVI/v4+cr6yoJrKVSTiUEa3VnNjv7JPYYrO/NAZY 2UQRGNUe4ktrr2Mc7IvZ+vEipbBDQpI2oGWAQ2k3Hs2QtisNPgAbz+DY8WvuS1z5bzdR v1pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lgQPdQh8YdcZ7PXuLbbXwjvE2ReNMQTwlP91O4VF5Ik=; fh=1YNwm5KBWetjB3qGkhgLqh/dZnCTsWuqRk83JW6hjgE=; b=PzoWpupWgpAnJ4dwFxLfaXOa6yF3kP+KJ+CFqArmdNYoSck7M6lFc2pjBg1KY1VmGY 41rj57NckAvswbDIgO2kSuonSON0dZkRuxqurQETRojTvqewHtjTP4yqlOMb3JncFfHT x55mbMeMC1mYMn9EOS4/V7vHd6AJjWwTXY0WHEPFF0itRUtIQj55leOcwZRFUH6oHrbk 8Jx2JOwPCgnvdUZGEQrZ1gLj3/26rqIcASRqrrCSxzPP4Y26TVKCu1xSTUseyYMnNHin Nn2sjlvKNlkgQaTok58N6wZIqQcHuGMdRJAiX30/UwdgclD9PDy/OClGkiXW8G14od0Y /kAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lfNJRbqE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020aa7d048000000b005232e02b60bsi3192795edo.39.2023.08.27.00.58.49; Sun, 27 Aug 2023 00:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lfNJRbqE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbjH0HmE (ORCPT + 99 others); Sun, 27 Aug 2023 03:42:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjH0Hlz (ORCPT ); Sun, 27 Aug 2023 03:41:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C59EFA; Sun, 27 Aug 2023 00:41:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C451A61CA0; Sun, 27 Aug 2023 07:41:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28A0CC433C9; Sun, 27 Aug 2023 07:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693122112; bh=T95JctfHZT39SXOoo11AV+Afx+roE8vO9hygVf6nGyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lfNJRbqEhcCCHz1WnG96JbW+mSpZ+hnBypRe6xfHjn14cNeqL7RstDIKTQR1CW/x+ ZqyCkomk68xLtQHKXMCirEcqgxjKXM01m1GDDrBxugKYzAJarJPnwoYKMoFwWqq3Sl JRJLNOGpBhyprAY2krphD1mRg975sM8VKWWYBKDxalMyHBaJQ6lJrjvZnvesuuGHbS UpitkuYzDzgZfdrtyVgip7AiHBN7zYIqujmxQqmE8LL/hJ0IYhkd7leaTNDJf6T26R 1Zxn9O4sFaYsCiifL+gPgnR47cIlNEMNyugXd6B22LdLfw+OV7dDEGT109gMIwTMXI 30BxEfDaLFPwA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH v2 01/14] tty: n_tty: make flow of n_tty_receive_buf_common() a bool Date: Sun, 27 Aug 2023 09:41:34 +0200 Message-ID: <20230827074147.2287-2-jirislaby@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230827074147.2287-1-jirislaby@kernel.org> References: <20230827074147.2287-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'flow' parameter of n_tty_receive_buf_common() is meant to be a boolean value. So use bool and alter call sites accordingly. Signed-off-by: Jiri Slaby (SUSE) --- drivers/tty/n_tty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index f44f38bb412e..8b2bacb3e40d 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -1665,7 +1665,7 @@ static void __receive_buf(struct tty_struct *tty, const u8 *cp, const u8 *fp, */ static size_t n_tty_receive_buf_common(struct tty_struct *tty, const u8 *cp, const u8 *fp, - int count, int flow) + int count, bool flow) { struct n_tty_data *ldata = tty->disc_data; size_t rcvd = 0; @@ -1748,13 +1748,13 @@ n_tty_receive_buf_common(struct tty_struct *tty, const u8 *cp, const u8 *fp, static void n_tty_receive_buf(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count) { - n_tty_receive_buf_common(tty, cp, fp, count, 0); + n_tty_receive_buf_common(tty, cp, fp, count, false); } static size_t n_tty_receive_buf2(struct tty_struct *tty, const u8 *cp, const u8 *fp, size_t count) { - return n_tty_receive_buf_common(tty, cp, fp, count, 1); + return n_tty_receive_buf_common(tty, cp, fp, count, true); } /** -- 2.42.0