Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp280833pxb; Wed, 27 Oct 2021 02:59:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzANyJ/3HqPbdKYSCH2yU1DmCMGnSUc1ZulAEVMPQhrrmAciZIs0sIPgZ25vSQJO6L+x3/q X-Received: by 2002:aa7:c497:: with SMTP id m23mr3929287edq.183.1635328791201; Wed, 27 Oct 2021 02:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635328791; cv=none; d=google.com; s=arc-20160816; b=ujQ3OVeZNB1ptSiMT5WKcBeUoTAMeRKyu0WIQk9JSUF+MEDH8O8xrUn3miuKCgxLJB JQXdS4qiiMg6t1Q9mzms6zi6PbpMzkRmpW7dnoEhdA6x60KsZ5PpaiTwn53cf7WqSd3n Z90z38Yv1svMBVFMpy8m8S6GyfZYFWgI+dbAx2A3O3zCxEwvBYmYqNo6KGC6fVRlS0J/ lmxBYfkw7FJAnpIuhSkQ528E8rKgEO5a3oBL1I/JPniBRy0dwmtrSlIOSVg/ZaYrjMuM GSH8Z+H4yoLaPNbFMSYlCWZyMP36178D5yLF9n6m8RjwEXIXmOIL6VW1fOGtsbMi4ZJR 1dig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=NCD6EFyxKiXCsYyF+Z9w45YC1E/+nrtrkW3uUFjUyBA=; b=y5LWr1TN5MJf5Rc0UnX8vZgXazY463aRZA7B280/2b86zw0nWDGXVqWNuxEzUL1WY7 ZXb42PBQXf/nlHmSG81LmvQVXqmHOrd8YgbOXB/wVJ8QKMKGq0szAaTpnX4HmW6jZxdA jIshF33J+T6fxGw6ZdXXYbIsSz0uTUBrq66OPZN0o95XUi09vZ+/ooYjU+z+f3vq5GWo nU01Qhw56rvqxqL/+Tz+WakDhL86F6HWjx3eFcks8twqYr9tSoCzbtD/46i4oU0+oZes hY2vxWGUGGrG7xx8uvrxw+/QwiJ9YWg3jV8Zxq3hx2dRZZl5M6xWoB7BR5dMr72pn+Y1 SpzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gt43si21022832ejc.459.2021.10.27.02.58.53; Wed, 27 Oct 2021 02:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237154AbhJZTsR (ORCPT + 99 others); Tue, 26 Oct 2021 15:48:17 -0400 Received: from gateway32.websitewelcome.com ([192.185.145.108]:23505 "EHLO gateway32.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237048AbhJZTsQ (ORCPT ); Tue, 26 Oct 2021 15:48:16 -0400 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway32.websitewelcome.com (Postfix) with ESMTP id DEEA626A4AD for ; Tue, 26 Oct 2021 14:45:50 -0500 (CDT) Received: from gator4132.hostgator.com ([192.185.4.144]) by cmsmtp with SMTP id fSOMm9oiIOnCIfSOMmokEd; Tue, 26 Oct 2021 14:45:50 -0500 X-Authority-Reason: nr=8 Received: from host-79-18-63-114.retail.telecomitalia.it ([79.18.63.114]:60830 helo=[10.0.0.35]) by gator4132.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mfSOL-001w8I-1k; Tue, 26 Oct 2021 14:45:49 -0500 Message-ID: <435460f4-7e69-dc39-109b-a6a777da69d7@kernel.org> Date: Tue, 26 Oct 2021 21:45:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V5 08/20] rtla: Helper functions for rtla Content-Language: en-US To: Steven Rostedt , Tao Zhou Cc: Ingo Molnar , Tom Zanussi , Masami Hiramatsu , Juri Lelli , Clark Williams , John Kacur , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , linux-rt-users@vger.kernel.org, linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org References: <20211026122614.017844da@gandalf.local.home> From: Daniel Bristot de Oliveira In-Reply-To: <20211026122614.017844da@gandalf.local.home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4132.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - kernel.org X-BWhitelist: no X-Source-IP: 79.18.63.114 X-Source-L: No X-Exim-ID: 1mfSOL-001w8I-1k X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: host-79-18-63-114.retail.telecomitalia.it ([10.0.0.35]) [79.18.63.114]:60830 X-Source-Auth: kernel@bristot.me X-Email-Count: 15 X-Source-Cap: YnJpc3RvdG1lO2JyaXN0b3RtZTtnYXRvcjQxMzIuaG9zdGdhdG9yLmNvbQ== X-Local-Domain: no Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/21 18:26, Steven Rostedt wrote: > On Wed, 27 Oct 2021 00:22:04 +0800 > Tao Zhou wrote: > >>> + do { >>> + retval = read(in_fd, buffer, sizeof(buffer)); >>> + if (read <= 0) >> check "retval" not read. Like: >> >> if (retval <= 0) > OUCH! Good check. > > Daniel, did that not produce any warnings?? OUCH OUCH! No warnings, no nothing. The code actually "works" because errors are not common and the next if stops the loop. -- Daniel > -- Steve > >