Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp1335695rdb; Wed, 16 Aug 2023 08:36:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHu1YrgN7ijkHT7Dq/j6Mi5kzsY2YEEOwKVyC4vUcRtpXZMJm1w3aAoq0MvQiOuT5U6yEiz X-Received: by 2002:a05:6a21:3b4a:b0:138:60e:9ba with SMTP id zy10-20020a056a213b4a00b00138060e09bamr2682714pzb.29.1692200163212; Wed, 16 Aug 2023 08:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692200163; cv=none; d=google.com; s=arc-20160816; b=MfbRip7h7B5wsN40U3bzvs0KwQYkag8lJZjNlF6VdjpcloDC0dNYmpKhikxbSfyOVP N3LN/2RGClpNe3cGDHHPyF9bWDGL2m5rwJheNMrmcXDvKWLsF1s79FbcNuWpnlF9nOQD jYTjk1fsV+xk1593Rm8P6TEO70u/C5K19XwYT/NWp4QiIcoZnSUrIfmST/N6bTj/EIOk oE2HYu1Ytfj77oty3kN9weVxfL6Kv0Z40BkuKzvNHXDt3k3vcBDobTAj9iiNUChmCEFy bualnxD5Kpp8WU9tpppDC+XcS5G8sO+Z4cuNybI9wBQGW2Id9WJ6QJ4AMDnZEjxtID2d fAnw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3tOTCQIzhrWhYoT0qotv9unk+5xfObZUDzN/E2PzFYs=; fh=k7XzfpyqnKqnwxpqVF0NftrWa2FIpeAcHVbykF5xarA=; b=Cv49yR7Tg5Irn66PZLZrNWTPW2XMhGbyyVp9gPSigRX06EMPc3FT9kZRQuhXFgC4X8 3k5AHB2/auG6E1gYs+E39ldjM44P1aOAKUiC94yb6POGN1UVMLnWmxN+2AQdqro7S39L e9wtq3ndnMbbHhN6RYlla8qSntxjd5eUxODuQ0co4EfKvJNWlIYR7JFLzNeCYT9dj15H S2BNakiaV2BxEHY2S0CS9D2i/T9PLKweBavE+TabHXRHS4frtlla8DFXg6GGbgF1KAIQ sTkNDrFLztnqTmgc7BMICTHUFfZHit8FP5sUcqbjBae69lNH1o2Mf/XCoCYbMSM8M1KT TwxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DquIEfCm; 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 d15-20020a63734f000000b005578c6a7672si12202605pgn.90.2023.08.16.08.35.49; Wed, 16 Aug 2023 08:36:03 -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=DquIEfCm; 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 S243613AbjHPK4H (ORCPT + 99 others); Wed, 16 Aug 2023 06:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232470AbjHPKzf (ORCPT ); Wed, 16 Aug 2023 06:55:35 -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 7886A1985; Wed, 16 Aug 2023 03:55:34 -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 0AC5E63FBB; Wed, 16 Aug 2023 10:55:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 552ADC433C7; Wed, 16 Aug 2023 10:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692183333; bh=lBmJFR9M91wfxaDPJazty0XSheTV8bspCpNfjNPkkTM=; h=From:To:Cc:Subject:Date:From; b=DquIEfCm4Jd3ngGUqDmln57RQgyDEer1IAtPW0YWFz6L+z/q7g/A9Rm9eq0QAM1Jx gcrqKvUYBo5b6p/C3orCPSbIWkdfDhspXuStx+1HDDAtcNEZv68rX96CPn9IQSY0xi J23E+ypfKrzLU6G1JPUE4A8gJomyQe6ulfnWy8MMPRLs/R1sZF4WUanP+43fFRYO6H /j0zs6A78QAFfu5m5oNh9CFc+FPi7462B7LZnt7dKoo1hncLPEXveAWTbF4+GsahTg sMsf4Nxj9j8c17yR2uRseW3CFiUsbilxw0TJvNmA5IanQ+2cHwHQVYCwqMsvQPkX0U Zp94KIR4BbqHw== From: "Jiri Slaby (SUSE)" To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Jiri Slaby (SUSE)" Subject: [PATCH 00/10] tty: tty_buffer: cleanup Date: Wed, 16 Aug 2023 12:55:20 +0200 Message-ID: <20230816105530.3335-1-jirislaby@kernel.org> X-Mailer: git-send-email 2.41.0 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 This is another part (say part II.) of the previous type unification across the tty layer[1]. This time, in tty_buffer. Apart from type changes, this series contains a larger set of refactoring of the code. Namely, unification of byte stuffing into the tty buffers into a single function. [1] https://lore.kernel.org/all/20230810091510.13006-1-jirislaby@kernel.org/ Jiri Slaby (SUSE) (10): tty: tty_buffer: switch data type to u8 tty: tty_buffer: use struct_size() in tty_buffer_alloc() tty: tty_buffer: unify tty_insert_flip_string_{fixed_flag,flags}() tty: tty_buffer: warn if losing flags in __tty_insert_flip_string_flags() tty: tty_buffer: switch insert functions to size_t tty: tty_buffer: let tty_prepare_flip_string() return size_t tty: tty_buffer: use __tty_insert_flip_string_flags() in tty_insert_flip_char() tty: tty_buffer: better types in __tty_buffer_request_room() tty: tty_buffer: initialize variables in initializers already tty: tty_buffer: invert conditions in __tty_buffer_request_room() Documentation/driver-api/tty/tty_buffer.rst | 7 +- drivers/tty/tty_buffer.c | 169 ++++++-------------- include/linux/tty_buffer.h | 4 +- include/linux/tty_flip.h | 64 ++++++-- 4 files changed, 111 insertions(+), 133 deletions(-) -- 2.41.0