Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp907880rwl; Thu, 10 Aug 2023 03:40:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmgX7o36UV2lY8pmjsHQ8q2omwGNNnRoSREjLVnllV0VeKX1bstvpJ+sbhmrSgCwoQCY6p X-Received: by 2002:a2e:9f41:0:b0:2b9:d71c:b491 with SMTP id v1-20020a2e9f41000000b002b9d71cb491mr1343348ljk.16.1691664049059; Thu, 10 Aug 2023 03:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691664049; cv=none; d=google.com; s=arc-20160816; b=q6ADzRrsv4/err+3ijA5MBoQ3ZkZd5vH4YL+s+P0WRUq0M70xNCI5FZ4ePq7XITL5U JMJUHok5ReNWj8SMRDQtkiMTcqxQl/NhshqYHvzPiGAe/VdNwFi6mxfkRKFqYGa7z2BZ 7FSOOjh2SY8Y86n1/ojWx5LJuSp0nVQogU3FvRyNQmaVTUKswMdRgK1c6QZx7flRQlML aJJNcU8bRIsDOxhleGDOoxYxgPzHe1HsaubVkCeO8602w+kGDyEBE9Bk6utQldvqjs22 ivvMcwrPNPpAJ+ENwakl1YJCJg466pd4dqn4n8h6ADbNjX/9/HzQhcSJx6i1raT4TpNL S1LA== 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=orv1kUOxpq/7gCruANECfcFP2gcV7emTkufH2gchghI=; fh=k7XzfpyqnKqnwxpqVF0NftrWa2FIpeAcHVbykF5xarA=; b=PukXWvU03WqxHnacAHnGt+AYDY9hFyZcpB4O/2uwEc3oPYbvYNvtVj4oPpLd0yRZaJ TsH2gT344pbMCE6rAjH30QSNQ5VelOzuS3NaAf+jhmV8eLio3QcrNmeD8sbxSfjyFw/c uqnuiec23SUJLgYTiCxg9YnL1uVl0Zn9PZOWwjHBtZOD/xvkpnLTLKJAbFGEX4RRUiMu ZhFuGBh8nbofLt/KL7AaFevmMJ9e6ZkUa1fKxgFjw6uobfv8BHWqG63qkmOwpGkx7xCN xeuWM2JBW694Exf6lOq2bOsse99gg8SOetYAefdYf66GpgTwPETUtnCwRQBV1PjC5vnS ui2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kQqjRSkf; 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 gu21-20020a170906f29500b0099392706398si1284720ejb.231.2023.08.10.03.40.24; Thu, 10 Aug 2023 03:40:49 -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=kQqjRSkf; 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 S234648AbjHJJRW (ORCPT + 99 others); Thu, 10 Aug 2023 05:17:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234585AbjHJJQm (ORCPT ); Thu, 10 Aug 2023 05:16:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 742122D5D; Thu, 10 Aug 2023 02:16:04 -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 13E68654D7; Thu, 10 Aug 2023 09:16:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6803AC433C7; Thu, 10 Aug 2023 09:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691658963; bh=qhZ+8g/mVeww1/sDpRrBj/HZogkEpBzYC4tIKMW7d8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kQqjRSkffBAhnbZFGqB7ZOsl3VZvb6kihwWvFaB8wjTmp312MrusAY5mlUQy6zGiy tyuHfCmuiD/CInSjngxC/tDDmBOVDWCovm3s+nEurCW8xd1yIhaNV8tcGtY/kW4Zs6 lf5d+1jx3lsAKlTbJubMQZQxaX7Jg7jLTd/O/wZQAYruyc39Z/aFjtss0PCOBCAw9W CaFj8ZRYZQyjtV0ly7faDHT/C9T94ctI5E24ool518IMCczxEkAvhbPHNDdXhwXWh5 ynvslIIhPC/EbRT0MuKtJztLUxy45HuQMrwyMSnJ2SIlyHe9JsjQsfZzMJGRhsSOdj HhLE/o9VsR1oA== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 20/36] tty: tty_buffer: make all offsets unsigned Date: Thu, 10 Aug 2023 11:14:54 +0200 Message-ID: <20230810091510.13006-21-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230810091510.13006-1-jirislaby@kernel.org> References: <20230810091510.13006-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 All these are supposed/expected to be unsigned as they are either counts or offsets. So switch to unsigned for clarity. Signed-off-by: Jiri Slaby (SUSE) --- include/linux/tty_buffer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h index 391a875be20c..e45cba81d0e9 100644 --- a/include/linux/tty_buffer.h +++ b/include/linux/tty_buffer.h @@ -12,11 +12,11 @@ struct tty_buffer { struct tty_buffer *next; struct llist_node free; }; - int used; - int size; - int commit; - int lookahead; /* Lazy update on recv, can become less than "read" */ - int read; + unsigned int used; + unsigned int size; + unsigned int commit; + unsigned int lookahead; /* Lazy update on recv, can become less than "read" */ + unsigned int read; bool flags; /* Data points here */ unsigned long data[]; -- 2.41.0