From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04519C43457 for ; Tue, 13 Oct 2020 05:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A763320872 for ; Tue, 13 Oct 2020 05:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602566517; bh=OwXE0mUrRwYdSzEBDK6eQZjP0OakM/fXBcxny4Xq+7k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=CGlLY9Vi+aUmsi09d1/gZc+ZQtnaWFn5gZ+PIGkEsNNQQ73NXJWzA1NuCjvyEI1vy FI/dyBf1ZBWxkMar6asc3kBw53ctEmNiW1o2YrkWbEpV3AbthvNGzFUWfBnMAXdOKQ 2FuR6RQXWu9fNClH3gWNynidAtl2TCVFf+anLf4w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732391AbgJMFV4 (ORCPT ); Tue, 13 Oct 2020 01:21:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:57530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732320AbgJMFV4 (ORCPT ); Tue, 13 Oct 2020 01:21:56 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C4C4020872; Tue, 13 Oct 2020 05:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602566514; bh=OwXE0mUrRwYdSzEBDK6eQZjP0OakM/fXBcxny4Xq+7k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=deU+CRa4uzH8T+zyXk7acVOs8sL0fHLlYQBijZGWwn5C6mWkwygTdPaqY1h6KEIt4 sYsHg5rqB23ZQ6tL5O1rlczJc+yEOYaDtowSPqG14ZAonH8p6pP3Xx2tWfDukOJsM1 RNt/BV220toadS89VgomzvXmjXQRT/l5bOBS/75g= Date: Tue, 13 Oct 2020 07:21:50 +0200 From: Greg Kroah-Hartman To: Lukas Bulwahn Cc: Alan Stern , Sudip Mukherjee , linux-kernel@vger.kernel.org, linux-safety@lists.elisa.tech, linux-usb@vger.kernel.org Subject: Re: [linux-safety] [PATCH] usb: host: ehci-sched: add comment about find_tt() not returning error Message-ID: <20201013052150.GA330398@kroah.com> References: <20201011205008.24369-1-sudipm.mukherjee@gmail.com> <20201012145710.GA631710@rowland.harvard.edu> <20201012160013.GA632789@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 08:17:34PM +0200, Lukas Bulwahn wrote: > > If you are suggesting some sort of special code annotation that the tool > > would understand, I am open to that. But I'm not aware of any even > > vaguely standard way of marking up a particular function call to > > indicate it will not return an error. > > I cannot yet say if some annotation would work, we, Sudip and me, need to > investigate. It could be that something like, assert(!IS_ERR(tt)), is > sufficient to let the tools know that they can safely assume that the > path they are complaining about is not possible. > > We could make the assert() a nop, so it would not effect the resulting > object code in any way. Things like assert() have been rejected numberous times in the past in the kernel, good luck with that :) greg k-h