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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 BC0E9C352A3 for ; Thu, 13 Feb 2020 23:31:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77C9C2168B for ; Thu, 13 Feb 2020 23:31:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="KQ3NdJU2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77C9C2168B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE97E6E435; Thu, 13 Feb 2020 23:31:01 +0000 (UTC) Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id D465B6E435 for ; Thu, 13 Feb 2020 23:31:00 +0000 (UTC) Received: by mail-oi1-x243.google.com with SMTP id q84so7661220oic.4 for ; Thu, 13 Feb 2020 15:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1ut+2rvXwl7BR7vsCTTvgdnkkBILXLMDEZzQhdWPdjI=; b=KQ3NdJU2QDHHOl9p0+M33PV1wMgwZA/1HxVLBpribieMwumoe0ZJTM42+FGGMpJxB5 fgpmBQ8i6tirAD++gaJl0CHVDTJduQ81TOd8cjrCwoOTMbkRu6Awa+B2iUbd6Ts25Chk /sQi1aTsYV5PkMneNvdlj+YN+ZV9LZ5Jbf+S0= 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=1ut+2rvXwl7BR7vsCTTvgdnkkBILXLMDEZzQhdWPdjI=; b=KYx9KUNeuzEYEksc7PjhGTFpu+7UgInvAjAbfxffu0iCRa4JTxYeOsb36Rw8e3Y8DR ulFMoxsRzt6IKkMlo+apMPnG7mjHKgJw0C9kuLzQozh43zrF+6eDgLsr0WFLtd9OqrNe i/zVdgafbGFev0AnPRfOi5uliWcUfHOxwUI/XcDmXu3I4UGBWLWQes7RWKu+7V18o49b JoSq7ZxoPLE2XK/JB1VrCqglTX+YzC49AEFZehFzA2+rFSi78x7OuyFJ0RZLAsr+gA+C L2bG+VYLOx7Bi2+TpLZZS8Vp0gCMWBZDMdPJGbI8lxCwW6ZgjwSZKMvZKSsL5+t0rqVb bKJA== X-Gm-Message-State: APjAAAWB4erY6sAMQ0EFZgXIbzFC34RE4q35ElRB1OP7OUYHeV4ncfra rax4/R4521fZ32HaZc+7OgTw0H1OnDnOWjI3QMKyUw== X-Google-Smtp-Source: APXvYqx1nTcAjLMMkysVcmh1dWd9DsvevHBFUCVWieYNbxpzYJs1oKEWwI8r5hXKOn2wGgekzrJEpQniILwUm9QXC1k= X-Received: by 2002:aca:af09:: with SMTP id y9mr15379oie.101.1581636660117; Thu, 13 Feb 2020 15:31:00 -0800 (PST) MIME-Version: 1.0 References: <20200209105525.GA1620170@kroah.com> <20200213223931.GA3877216@kroah.com> In-Reply-To: <20200213223931.GA3877216@kroah.com> From: Daniel Vetter Date: Fri, 14 Feb 2020 00:30:48 +0100 Message-ID: Subject: Re: [Nouveau] [PATCH] nouveau: no need to check return value of debugfs_create functions To: Greg Kroah-Hartman , Wambui Karuga X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , John Hubbard , Ben Skeggs , dri-devel , Nouveau Dev Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Feb 13, 2020 at 11:39 PM Greg Kroah-Hartman wrote: > > On Thu, Feb 13, 2020 at 02:30:09PM -0800, John Hubbard wrote: > > On 2/9/20 2:55 AM, Greg Kroah-Hartman wrote: > > > When calling debugfs functions, there is no need to ever check the > > > return value. The function can work or not, but the code logic should > > > never do something different based on this. > > > > > > > Should we follow that line of reasoning further, and simply return void > > from the debugfs functions--rather than playing whack-a-mole with this > > indefinitely? > > That is what we (well I) have been doing. Look at all of the changes > that have happened to include/linux/debugfs.h over the past few > releases. I'm slowly winnowing down the api to make it impossible to > get wrong for this type of thing, and am almost there. > > DRM is the big fish left to tackle, I have submitted some patches in the > past, but lots more cleanup needs to be done to get them into mergable > shape. I just need to find the time... Just to avoid duplication, Wambui (cc'ed) just started working on this. Expect a lot more void return values and a pile of deleted code rsn. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel