Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp843186rdb; Fri, 23 Feb 2024 01:26:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUy3zkkxowTmSVc6txBDAzqGd3oYk2OPxrzkTDQDwBo6rh0/H0c7TPGRSRMWlpI4G+hx4DvgjQNcJBe3hw5nqza3/67vl/W7Gs+dDo0uQ== X-Google-Smtp-Source: AGHT+IGzm6IJXZLyANIGyoU9g7W22TKTV+lc7gjorEgrgO8ec21RyF8i4hAu4R+nHKi/h3JQ98gN X-Received: by 2002:a05:620a:4594:b0:787:9302:4bb7 with SMTP id bp20-20020a05620a459400b0078793024bb7mr2195301qkb.76.1708680402925; Fri, 23 Feb 2024 01:26:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708680402; cv=pass; d=google.com; s=arc-20160816; b=ph/8U9SDbkNVpSsdsM6bQ8M1mGtF5BgXLCkq/1phNr9LsRVhWhCnQIoDKen1FXIu1l p706Dtcsp1op+y2u72augulpoeEyw05zO4SpCAOLLatu+b9ZHaFWTU3qCuFV1E9cFFeL /5dAsw1Gg5pXgDgoOEy8md4QME5tHBdfkZud5IC+uQCwa4dnVFViSG2wBDiRcevsS9ED Mg4GIsCdJMPdgbQIUJ7h7Qled08XP7wz5FhdOxsVVhjl4/Qol1VDDBCFpUJ4aFbWbkO3 YzEWNQOkdYGgcMLsdHhPuQx9NhJLJVZXWjK+vrpx11N/gwsbedN2jPz2DEWUZZJLng0t KkTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=w3wSs8YfhmxTb8gou2V9Pt5gbeGf/6qyFAVCFuJPfK4=; fh=Jyzlbcn4wvrtjwixN3iqll/coNL7/3gJTx1MwcYCs4s=; b=CPzQt5InxGG2u2/WN2tKy4TOTy2QcrKqvcG/AB4dBKChyQAAueiqsCIv/WvQHgXeLb DTFGb1iyKmZvH/IkNcKav2pywAnn441QVHMpaAuLkLaRuCN8/wKFiTeYKd3H0xPbWfmA 1J7cYtMlYZDrgJB2MS7JLuqzsrIm0rygcw8hTW9OFMGVeYTup2aI8+t+B3ffKjwNzwKx DwKMgoxx4abBr0kA/pbDKCpSYtaA6Hz+S7TV8QxtmeUXjOnwOYpKtX82QAqD+J/GkvAY XnlzlzqXJiMiGYdio0YmlfakjazJzuzeQKwIDticaqKkRr2DvkbbWWGpJvJc9n1dRnMq +3sA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-78007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dt43-20020a05620a47ab00b00787a74f4888si2268692qkb.165.2024.02.23.01.26.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 01:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-78007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C95B1C20F11 for ; Fri, 23 Feb 2024 09:26:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6E025C8FE; Fri, 23 Feb 2024 09:26:36 +0000 (UTC) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 4A0435B69A; Fri, 23 Feb 2024 09:26:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708680396; cv=none; b=J7W6FoVYItji9FM8Ubb21+IiDEMLrwu0A1arJ7sZ8RQJer0G7yXis+8TQdtnJMYO+OrphFUkfeVONZPHDbdvzNhY2Vm7T6YXowm8TLFtIQe6zrCtFZUo1/myKp5VG9o1fTTV6qAvPu89vr56MsFuGqR9MV4RobTO87NMgx9+4cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708680396; c=relaxed/simple; bh=dxEZ+oD+Ywd4mmuMoO07G5vV6r8sUVuFCthVA6NL5Pc=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=dE5YYOwNpO2QB/yvhHd55iIpe2/VbvqRDUZOKPZHM4W/jWSbgF29DhL7/qvbe9d3n8qiEtVA7NkLtXK+6Bpm+aXIpTgAUdJwa3JJE8pmDsHp418aH54762PlR3MS0TTuUVWa3hJYGHCDmTF+vhP6NNT/2to5Ij7eqTaAXi3+9ZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-512a65cd2c7so959492e87.0; Fri, 23 Feb 2024 01:26:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708680392; x=1709285192; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w3wSs8YfhmxTb8gou2V9Pt5gbeGf/6qyFAVCFuJPfK4=; b=cc4K7SCetGdB0AGSb7CaNkmUkVmOqQfShV0Cnjv41rTtpxVNCmmVV0JoevRaiAZQUT V6FR4hCYdqQF7ZkN/tmBsr3tOdmbXKN72tMZDIFnWiPswCtlA3IjLhiB0Vs7AHqCvD/K 1z7Vl/U3dE7Sbu8X2j2h78mNPYUK9mLEDJCe7gZQ97sOLNC5vyz/uGUrVwHubEQVUezb 76Zf0Rn9lUWeCyIcBXddhnwdxDU6+JWWQuSbWB/58c5927lQkiRcjrI9MatRDB2RbtfU 7FjyfdttInnnNEYIJFxQCXZmk/VaL8CgRPOQucF2WmJs77julJbnsUxN5ivsZBmmr/JJ 4d7Q== X-Forwarded-Encrypted: i=1; AJvYcCWPfd/MZgzCydiNud0ubIInh6r+GG9CaCkRUVZVV9qrspRHzwERwH8TBDvZWGPL3ltMIO+MOoZcaL57E27QIWZz8sSBY+RauSa2A/L6PUN7rCOEKap+u+XzEwFJ3S0zEAOOjwTAwAovTfwP X-Gm-Message-State: AOJu0YzrjAU5N4fuH9G2tKrA50cxWUc7WKnfOkulWsr3vvS6zFTpJFMB wgNqLkRsgs5ZoXrmrPoxiKlr7CBdI8PW9MIne2R4mqL4TS6OLgNUrHnhjoGwFw8= X-Received: by 2002:a19:7701:0:b0:512:e3b4:2955 with SMTP id s1-20020a197701000000b00512e3b42955mr894913lfc.22.1708680392172; Fri, 23 Feb 2024 01:26:32 -0800 (PST) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id bt11-20020a056000080b00b0033d6bc17d0esm2178029wrb.74.2024.02.23.01.26.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 01:26:31 -0800 (PST) Message-ID: <254db026-5f9d-497f-ac44-c81d9d5947cf@kernel.org> Date: Fri, 23 Feb 2024 10:26:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 tty] 8250: microchip: pci1xxxx: Refactor TX Burst code to use pre-existing APIs Content-Language: en-US To: Rengarajan.S@microchip.com, linux-serial@vger.kernel.org, gregkh@linuxfoundation.org, UNGLinuxDriver@microchip.com, Kumaravel.Thiagarajan@microchip.com, linux-kernel@vger.kernel.org, Tharunkumar.Pasumarthi@microchip.com References: <20240222134944.1131952-1-rengarajan.s@microchip.com> <5bf4ba6d-d8e3-4ba6-a889-cfae8c3ddabe@kernel.org> From: Jiri Slaby Autocrypt: addr=jirislaby@kernel.org; keydata= xsFNBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wdKraekbNE0bC4zV+ryvH4j rrcDwGs6tFVrAHvdHeIdI07s1iIx5R/ndcHwt4fvI8CL5PzPmn5J+h0WERR5rFprRh6axhOk rSD5CwQl19fm4AJCS6A9GJtOoiLpWn2/IbogPc71jQVrupZYYx51rAaHZ0D2KYK/uhfc6neJ i0WqPlbtIlIrpvWxckucNu6ZwXjFY0f3qIRg3Vqh5QxPkojGsq9tXVFVLEkSV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rDk+gRNvKnGwFNeTkTKtJ0P8jYd7P1gZb9Fwj9YLx jhn/sVIhNmEBLBoI7PL+9fbILqJPHgAwW35rpnq4f/EYTykbk1sa13Tav6btJ+4QOgbcezWI wZ5w/JVfEJW9JXp3BFAVzRQ5nVrrLDAJZ8Y5ioWcm99JtSIIxXxt9FJaGc1Bgsi5K/+dyTKL wLMJgiBzbVx8G+fCJJ9YtlNOPWhbKPlrQ8+AY52Aagi9WNhe6XfJdh5g6ptiOILm330mkR4g W6nEgZVyIyTq3ekOuruftWL99qpP5zi+eNrMmLRQx9iecDNgFr342R9bTDlb1TLuRb+/tJ98 f/bIWIr0cqQmqQ33FgRhrG1+Xml6UXyJ2jExmlO8JljuOGeXYh6ZkIEyzqzffzBLXZCujlYQ DFXpyMNVJ2ZwPmX2mWEoYuaBU0JN7wM+/zWgOf2zRwhEuD3A2cO2PxoiIfyUEfB9SSmffaK/ S4xXoB6wvGENZ85Hg37C7WDNdaAt6Xh2uQIly5grkgvWppkNy4ZHxE+jeNsU7tg= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 23. 02. 24, 10:21, Rengarajan.S@microchip.com wrote: > On Fri, 2024-02-23 at 07:08 +0100, Jiri Slaby wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you >> know the content is safe >> >> On 22. 02. 24, 14:49, Rengarajan S wrote: >>> Updated the TX Burst implementation by changing the circular buffer >>> processing with the pre-existing APIs in kernel. Also updated >>> conditional >>> statements and alignment issues for better readability. >> >> Hi, >> >> so why are you keeping the nested double loop? >> > > Hi, in order to differentiate Burst mode handling with byte mode had > seperate loops for both. Since, having single while loop also does not > align with rx implementation (where we have seperate handling for burst > and byte) have retained the double loop. So obviously, align RX to a single loop if possible. The current TX code is very hard to follow and sort of unmaintainable (and buggy). And IMO it's unnecessary as I proposed [1]. And even if RX cannot be one loop, you still can make TX easy to read as the two need not be the same. [1] https://lore.kernel.org/all/b8325c3f-bf5b-4c55-8dce-ef395edce251@kernel.org/ thanks, -- js suse labs