Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp449248imu; Tue, 22 Jan 2019 22:57:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN5zymUhTUDOzxLXJk69bFcvWrfHpXfsCA760rK5W5KAg0MuYLzcup2Ichi/alaYuD84VvlJ X-Received: by 2002:a17:902:2ac3:: with SMTP id j61mr1079592plb.185.1548226652664; Tue, 22 Jan 2019 22:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548226652; cv=none; d=google.com; s=arc-20160816; b=YEVazG2pehgpOccdHmtjTuXKenYB3IACKyuD/h8xTaajgkuonOCY0NKbRCzscta3Hp 5nQcqBr1Nw9at1Ox0wJNOMsNagPFF8w3elIOK0nhmlzbzwheizuSChR0V6RnDapGDMZT 7V6D9G7kZuEjzXEhYgk66WRhnloveh4smCac7ISRfL37skrg08w48vVVbIRh5/3jeyt8 6nTOc3Mmu0Hdndol+w5dxPCam3Np/Ssi2SrQnezsXn/BoIm/ZrSi6eBq52G+cbgiXOlJ OeoGneUzhpEUus2v9VeBQzCG3KpU909bEXExHg5Jn7BgWmUJ0Gpm6UGB3RPYqhYdqq9m yZiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=J4I4GtbGnq0iQo7oKgVXO0ChbSr6zar0U5M1jZfwmiw=; b=oRvJVOg3N28dKMqZw3UJHl/4xhsFAVWncBwaRkXoE53xwVWoVVIHot6Z4RyOSHrOLj L3/yiLzgNFnTIIUeN0nAXs81XrhuZxbkJSVswESFx9O/lNzSQtzVkDncoPd8y3jlywKv 3WOqcJJtDQtbwDp++ksGKbEfpbU0Nr6ePFWSwvIz7qdp+dUjoL6iyU3MMDzgchwpuKge whic/KF2ywiasU1tH8+A+Dpsm1PiQBQ8dvkC8NQfn3m8MMIH09pk4j3L1pA6WU63EM7K 0X36FDOX2buMxBolIy3+0uLSZMKFD2sFdWAlv/kFFBMwDCx7F59OcmCKxykmniqsKmPn MpwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BD9ZPS0G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si17955410pgl.122.2019.01.22.22.57.17; Tue, 22 Jan 2019 22:57:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BD9ZPS0G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfAWGz7 (ORCPT + 99 others); Wed, 23 Jan 2019 01:55:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:57636 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbfAWGz7 (ORCPT ); Wed, 23 Jan 2019 01:55:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 25D4D21726; Wed, 23 Jan 2019 06:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548226558; bh=Tkc7rDSg0QL9HPWws+CpjjP/yX9Rh5dgxYMvX3gFKcM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BD9ZPS0GCmz2ebBY5F5QXoOaL6L0rB/hPQynCnJO88TeuQR7cvjAS3DiKqUlTfAOp gMve2T0zfJ1gcE2nmDxO9lcVDGWqs5sh1hIgTnDQg0eDly0FiWNugG5m4GkJ+rQWpx HxCERsV9y7I8IVkg54qYUGQVaEtIpGIkD1JjYX6s= Date: Wed, 23 Jan 2019 07:55:56 +0100 From: Greg Kroah-Hartman To: Gary R Hook Cc: Herbert Xu , David Miller , "linux-kernel@vger.kernel.org" , "linux-crypto@vger.kernel.org" , "Lendacky, Thomas" , "Hook, Gary" Subject: Re: [PATCH 6/7] crypto: ccp: no need to check return value of debugfs_create functions Message-ID: <20190123065556.GB27466@kroah.com> References: <20190122151422.14204-1-gregkh@linuxfoundation.org> <20190122151422.14204-7-gregkh@linuxfoundation.org> <1330d284-560a-5e09-6d15-50da354d0da2@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1330d284-560a-5e09-6d15-50da354d0da2@amd.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 22, 2019 at 10:06:54PM +0000, Gary R Hook wrote: > On 1/22/19 9:14 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. > > Stupid question(s) time. > > If we don't care about failures (because the subsystem handles them > without our involvement) why do these functions even have return values? > Why haven't they been changed to void so that they reflect the current > style of intended use? Because on "normal" operations, you use the return value for something (i.e. a parent directory to pass to other functions, or a value so you can remove the file later). > I realize I'm old fashioned, but if a failure occurs, I've always been > of a mind to kick out and not try to do any further work. But debugfs is > to be treated as an exception to that paradigm? Carry on, ignore errors, > don't worry about it? Yes, that is the case here, it goes against what everyone normally thinks about kernel development :) thanks, greg k-h