Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp14427pxb; Mon, 8 Nov 2021 09:01:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJz63WlV7vyNFFN1xpcuTLkMis9X2+PoxhyiCN6YqWba8MzFcOEHj33Diwu+tzvPc4ssAbB9 X-Received: by 2002:a02:8663:: with SMTP id e90mr503871jai.14.1636390891419; Mon, 08 Nov 2021 09:01:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636390891; cv=none; d=google.com; s=arc-20160816; b=l5UUeU1VyjxawL42qy1snA/JzdSOmZ2pJ0uk4o+qijcwUkRMqXi1+hRa2Fvr+1VKT/ wQlwVKNOQHPapBfm6d10G0USckoewlSjaAOjiV3msrCS4UCTyTUoXOzRIUKYGQVRuh47 yUEfuthOmHcWWtIN+vuUtgHBF9CozLQhe3TDYn604385IwFbG5diSxqVDecjZgAQU6Lp UQF+EJnl+AI7sRMdiHyRYo1wVAzd3tIXO6sbQ6NRNB2oBB5hlgRrPqPq9kJG1fv3WRGt Wf4hDd6s80YxqJQS4NLz/QeyUXATiWL1guB2Yz13NTE4gqVkCxH/wG69QRzx5iewmN6K OcTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oQBbYlaqexu4t08cRZdDH3XaT2khXLTGUfDdhXY+o6w=; b=aMIeCC2chJ7jfnWFABAdigQm65YnCHZGXyvhcPYhg/LZHDQ+4/R82g3YGLpCYXP9Yn ymGP322p0G4t/6pmx300H7NKX5+OdhXvSMcPgBCOlCTNCv2OtZjP3UO/MNvv8BqjN0Gh ltOJMSZVVld2QtO/dGbfEr58tbn0amSJUc+1SYfWsEas4H1f9ZJcBfNdvOmV02qFdTn2 IUM43vMflS5yARKRDjXvBpIaL9VV13tbjCPVAFZ/ecL7y7ueXRTR8vGNcXlo+odVI/Iz kAMXbGF17svToK2TtOUWkyc9ga3X3HS1djd4s+YzrYh8OyFUef7ZnU2HtdcXiPDmhDCS QAjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BzFVBEJo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si20034459jaa.74.2021.11.08.09.01.11; Mon, 08 Nov 2021 09:01:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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=@alien8.de header.s=dkim header.b=BzFVBEJo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239245AbhKHO1a (ORCPT + 99 others); Mon, 8 Nov 2021 09:27:30 -0500 Received: from mail.skyhub.de ([5.9.137.197]:50114 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236155AbhKHO13 (ORCPT ); Mon, 8 Nov 2021 09:27:29 -0500 Received: from zn.tnic (p200300ec2f33110093973d8dfcf40fd9.dip0.t-ipconnect.de [IPv6:2003:ec:2f33:1100:9397:3d8d:fcf4:fd9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D54F61EC04EE; Mon, 8 Nov 2021 15:24:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636381481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=oQBbYlaqexu4t08cRZdDH3XaT2khXLTGUfDdhXY+o6w=; b=BzFVBEJotdv+x1wk5r7BVthkB7IfDjFkcs3Qa23VnQgw6n7GoUvAnfTwnsI1XwsFUQ2pfc wTEtmUg2zpiIKZgiV8GtlPXLXcMCnwwX7vbzvuM7Jd46qSvtVDp/eqlUHv6UrUSSdUIxSB fTiz2Hj9eXxtQyoPpRyOqBuxOD7Awrk= Date: Mon, 8 Nov 2021 15:24:39 +0100 From: Borislav Petkov To: Alan Stern Cc: LKML , Arnd Bergmann , Ayush Sawal , Greg Kroah-Hartman , Rohit Maheshwari , Steven Rostedt , Vinay Kumar Yadav , alsa-devel@alsa-project.org, bcm-kernel-feedback-list@broadcom.com, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-crypto@vger.kernel.org, linux-edac@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-iio@vger.kernel.org, linux-leds@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-remoteproc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-sh@vger.kernel.org, linux-staging@lists.linux.dev, linux-tegra@vger.kernel.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, netdev@vger.kernel.org, openipmi-developer@lists.sourceforge.net, rcu@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v0 00/42] notifiers: Return an error when callback is already registered Message-ID: References: <20211108101157.15189-1-bp@alien8.de> <20211108101924.15759-1-bp@alien8.de> <20211108141703.GB1666297@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211108141703.GB1666297@rowland.harvard.edu> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Nov 08, 2021 at 09:17:03AM -0500, Alan Stern wrote: > What reason is there for moving the check into the callers? It seems > like pointless churn. Why not add the error return code, change the > WARN to pr_warn, and leave the callers as they are? Wouldn't that end > up having exactly the same effect? > > For that matter, what sort of remedial action can a caller take if the > return code is -EEXIST? Is there any point in forcing callers to check > the return code if they can't do anything about it? See my reply to Geert from just now: https://lore.kernel.org/r/YYkyUEqcsOwQMb1S@zn.tnic I guess I can add another indirection to notifier_chain_register() and avoid touching all the call sites. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette