Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4499957pxu; Mon, 12 Oct 2020 22:57:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcN376gqjxcTg2muaQLFc+7oepp6zW5rSXwYT/noq8he7Zc/WPUkPVnYjvd5qMPwhumtFf X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr17726622edv.155.1602568625073; Mon, 12 Oct 2020 22:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602568625; cv=none; d=google.com; s=arc-20160816; b=E7gb0VxMkrsb19RdXqPiS9gPrhfLa2sr47s47Cv1WBAgRoglOYXO6JPiCbSwANPzOS sNxBV0yS49D+dtXmUtgPlGF6HL6GbYGEyrsvnpbQDv8C+9T4To3sWyQixavGfucDcYA/ 31B1WaZT/7S1SAuydoTxmE0IYq42SA23MT7qNKL/zyCbOlSQNwrcBFk3ddJ00dP1pLTo clGDFNqOn1c3xDk3BO8Um9Lh3zZDA4fIgRKAZD01rS16qu0XRi0DFKLRndDWNbClaILB R/MF3s9+7t0RXGQ6+inJCjBB8dIFyDuTy2PdGbxnB7Km29Mi3RnIqg5p5rR4xc9B7doF nLlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=iPv7827Nls0k4D3zdHYccFHp2qugyVVdkpLdlibXylE=; b=icuLTfqE/qfyXARO7IBDVOgAhY7G/3mH4LRG+BraON4Y1/1Jo4ulWH+XdqsETgJ5jM z2l8oJVqbAxMwCP2oJk0gHjJ7vAq9ld4qBWQlCw3tu2xih5DsjISmm0sDuRn98WOQ/BE kKbRSjjqQuvf+gXzloActEyoT4YBvl4yHAzmppwExB460w/Zu+uxH9+81+te0e0qW6Mg pcBwxud8EN2GQU553L77DjYZ/ZXsoC2lb5V056abNXi5vAnZrHOifdKzIMaGC//UC8TX pRCfI/vQPvFY4d7AsiMm7d4vatRZKDhzOCumYEcVkaUK4aARSIntnZPGYFxY0HIS6RYg avtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jhTqLk8z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si8521009edt.72.2020.10.12.22.56.43; Mon, 12 Oct 2020 22:57:05 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jhTqLk8z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389669AbgJLPYy (ORCPT + 99 others); Mon, 12 Oct 2020 11:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388984AbgJLPYy (ORCPT ); Mon, 12 Oct 2020 11:24:54 -0400 Received: from mail-yb1-xb42.google.com (mail-yb1-xb42.google.com [IPv6:2607:f8b0:4864:20::b42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB7DAC0613D0; Mon, 12 Oct 2020 08:24:53 -0700 (PDT) Received: by mail-yb1-xb42.google.com with SMTP id n65so9949763ybg.10; Mon, 12 Oct 2020 08:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iPv7827Nls0k4D3zdHYccFHp2qugyVVdkpLdlibXylE=; b=jhTqLk8ziijLvUmU9B6FFv5qWVvghvIypTAAz4yDCb9Tsi07ce4ra6Lli4ckhNWrbA EDa+N9c5x2h9k4XpELr+JUw7zrtC6/HKjyfsYBKxiel+fSM+iDuFaswXd53hTourKfUp ZF69WNsQgr07CooGA4khxMVxCJFStjve1Jhw0I6T35ExN/wINwszRJ2AcDqrmaUsYA/9 MDoIw7DuOQmKE5G4heILz7Sqhy0DeLMTmAmzOj6pebb6Y7WzUBIF2xFEh++TrYse8cK9 +UPxQYwAClmqUW0SApmurYJ9osCJOZnWrz+t0aqH6ZFSYO/4JEfUAI3iUJsTsBfdB4GV ICVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iPv7827Nls0k4D3zdHYccFHp2qugyVVdkpLdlibXylE=; b=g7iChwzBHL/e1B1QlfnxSd0U6iWG6cJ0iL8oR8NPsegS40nHV3a4bvYNz3tUk2HxJL QBMOJuxR8GF2wdsxqmms4nLUYBbenboZmX1PSkIfam/kQ8gnqPQjbTy6UhoY8dfquCIL O7WbdU5b3CWQPBOgV2HK0lySjS+iNeZvkDbgfkbogfY/SsoeKQcSvFUgGkiu/4R2dBL6 xclrMbCI3aGBSZF/ChvkhcOI9SHlfTTrF1oksk2GC5TF3+xTP7hVUS3bSgn3bd4jAdWw Ak2wrrickgPxlohw7DfKWN2KpbjH19vLbe8sz3Oe/025I0Z8sAXAceSsjAsepItCqHIl fe9A== X-Gm-Message-State: AOAM531DucJWz371GIh5IFiRhl4SB6Awv8yRK7gisPbEoaYEjLPwDyy7 n4BcDadrhYAdbkgGwFPS+GiWKgTp8QnXEaQRzOU= X-Received: by 2002:a25:e046:: with SMTP id x67mr31850217ybg.342.1602516293133; Mon, 12 Oct 2020 08:24:53 -0700 (PDT) MIME-Version: 1.0 References: <20201011205008.24369-1-sudipm.mukherjee@gmail.com> In-Reply-To: From: Sudip Mukherjee Date: Mon, 12 Oct 2020 16:24:16 +0100 Message-ID: Subject: Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error To: Lukas Bulwahn Cc: Alan Stern , Greg Kroah-Hartman , linux-kernel , linux-safety@lists.elisa.tech, linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lukas, On Mon, Oct 12, 2020 at 3:11 PM Lukas Bulwahn wrote: > > > > On Sun, 11 Oct 2020, Sudip Mukherjee wrote: > > > Add a comment explaining why find_tt() will not return error even though > > find_tt() is checking for NULL and other errors. > > > > Signed-off-by: Sudip Mukherjee > > I get the intent of the comment but there is a large risk that somebody > could remove the find_tt() call before the calling the function and there > is no chance to then see later that the comment is actually wrong. Removing the find_tt() will mean a major rework of the code. > > I guess you want to link this comment here to a code line above and > request anyone touching the line above to reconsider the comment then. > > But there is no 'concept' for such kind of requests to changes and > comments. > > So, the comment is true now, but might be true or wrong later. If it is wrong later due to some code change then I guess someone will need to send a patch to correct the comment. > > I am wondering if such comment deserves to be included if we cannot check > its validity later... I am failing to understand why will you not be able to check its validity later. You just need to read the code to check it. > > I would prefer a simple tool that could check that your basic assumption > on the code is valid and if it the basic assumption is still valid, > just shut up any stupid tool that simply does not get that these calls > here cannot return any error. > > We encountered this issue because of clang analyzer complaining, but it is > clear that it is a false positive of that (smart but) incomplete tool. I dont think it is a false positive. The error return value is not checked and that is true. Only that it is not applicable because of the way the coding is done. > > Do you intend to add comment for all false positives from all tools or are > we going to find a better solution than that? I think tools will always give you some false positives and you will need to read the code to know if its false positive or not. I dont think there is any tool yet which will only give true positives. -- Regards Sudip