Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7597899imu; Tue, 22 Jan 2019 08:27:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN75ShvdI5QJf2UWgPRuCfjuHvoQX/7Ad+VU4ZfLw0eqtkYuNeeh/7Vvee1P8zPWEEgznmU2 X-Received: by 2002:a17:902:f20d:: with SMTP id gn13mr33725384plb.11.1548174463849; Tue, 22 Jan 2019 08:27:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548174463; cv=none; d=google.com; s=arc-20160816; b=VWsBp3zIDkbWuYDzUxhN4WOoR3T2uPj8+rszHfZ085BcHbhsOiBaietVCSWUb4fqXZ cRzdt8UtJFPOpTNE+Qyi2dSsGbF9Ih9MUE0I/4FMVrNekonCKYETFz9dWi0wrm5Fx1nM qYa2uoqpwymgcWYE6ITXTCGw5PAqkVbtcwKxbbSjskNYVwxrX19ck4fVHaG6NPEwKFVj TK8w0ir++AogrsD8DVvk2k/ltjSTjEbDbNGqFElsW0bbKaHXfhmNtZ1wXr+6r3sSW7Wg 2hLLG7jUQqmnGdXoSrg2CHNYaUYus9yxLM2N01hmePlNt5hbpwhO0Ih22Lnf6SwZ9cwR SVzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:message-id:in-reply-to:mime-version :references:subject:cc:to:from:date; bh=1JARUPpOXRlMP84hEl13ykIrFIOX2Aya6pwIQ6vzrOs=; b=ElZ0bKTvx6P2/NoLQOXQDS2Gs5DzqtzCCUohlWzkOl17CtNOSQPx90/tGzUXOu9aAQ qD6LrL6CRpdFm+lIcCLPODQuy8jx7ltOIrHED69OUvK1WsXtBGJHaAemNzSQSi64hrCY aF2p9v/qKUjS/lYS/IUb7xlXwkSdtayo+9d6JH0SBXYizPfYKqlxWnjXzpQRwtgu2s+O p3HQjFuj/Q6Evt+SoSfWu72GI1JmAyZ9uvCalATsU9PIV+DVrH9VGpXejx1Rvy+r+RUi 88BmcItX8U02Im4X2rKIeuuJdkyEq2USE/lYv5BfLY46f9QvHPJdppj3PG967M9SEeXl tzgg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si15835199pgl.209.2019.01.22.08.27.27; Tue, 22 Jan 2019 08:27:43 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729111AbfAVQZG (ORCPT + 99 others); Tue, 22 Jan 2019 11:25:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54654 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728669AbfAVQZF (ORCPT ); Tue, 22 Jan 2019 11:25:05 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x0MGOshC062820 for ; Tue, 22 Jan 2019 11:25:04 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2q66dh8wb1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 22 Jan 2019 11:25:03 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Jan 2019 16:24:59 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 22 Jan 2019 16:24:56 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x0MGOtOw62324828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Jan 2019 16:24:56 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6E5D11C04C; Tue, 22 Jan 2019 16:24:55 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9870411C05B; Tue, 22 Jan 2019 16:24:55 +0000 (GMT) Received: from osiris (unknown [9.152.212.95]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 22 Jan 2019 16:24:55 +0000 (GMT) Date: Tue, 22 Jan 2019 17:24:54 +0100 From: Heiko Carstens To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Martin Schwidefsky , Kees Cook , Christian Borntraeger , Hendrik Brueckner , linux-s390@vger.kernel.org Subject: Re: [PATCH] s390: kernel: no need to check return value of debugfs_create functions References: <20190122152151.16139-3-gregkh@linuxfoundation.org> MIME-Version: 1.0 In-Reply-To: <20190122152151.16139-3-gregkh@linuxfoundation.org> X-TM-AS-GCONF: 00 x-cbid: 19012216-0008-0000-0000-000002B479DD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19012216-0009-0000-0000-00002220A69D Message-Id: <20190122162454.GA31034@osiris> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-01-22_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901220128 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 04:21:02PM +0100, 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. > > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: Kees Cook > Cc: Christian Borntraeger > Cc: Hendrik Brueckner > Cc: linux-s390@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > arch/s390/kernel/debug.c | 6 ------ > arch/s390/kernel/kdebugfs.c | 2 -- > arch/s390/kernel/sysinfo.c | 2 -- > 3 files changed, 10 deletions(-) > diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c > index 12f80d1f0415..2ac3c9b56a13 100644 > --- a/arch/s390/kernel/sysinfo.c > +++ b/arch/s390/kernel/sysinfo.c > @@ -545,8 +545,6 @@ static __init int stsi_init_debugfs(void) > int lvl, i; > > stsi_root = debugfs_create_dir("stsi", arch_debugfs_dir); > - if (IS_ERR_OR_NULL(stsi_root)) > - return 0; No objections, however will you also change the odd behaviour that e.g. debugfs_create_file() returns -ENODEV instead of (the expected) NULL pointer if CONFIG_DEBUGFS is disabled? I do remember this since it caused at least one crash ;) 19cdd08ba155 ("[S390] qdio: fix broken pointer in case of CONFIG_DEBUG_FS is disabled").