Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2591190ybz; Sun, 19 Apr 2020 05:06:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJejcXPSF8rI4oNGARZtTCUDX9tt6/Rc2wcBu23D6NhmyKa9zIKF9Qbtbn2z5JgwivyAtSo X-Received: by 2002:a50:8a03:: with SMTP id i3mr10100420edi.121.1587298012667; Sun, 19 Apr 2020 05:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587298012; cv=none; d=google.com; s=arc-20160816; b=b3mU3lFekdbICNBndSMbtxuQXXYoyr32IFPedo2cXsyjE9qqKcbbYjlC2Kx6azqU6D hwLTYPSoZrxRQVJ9Xc2exhRWIkYL7YMm09bEelz3Bb5BUYKfB83Iu7HPWTbi5sGa4U/0 1be/5f38qpGUuHC+sYiKfsiHxecZr25YHJeXPiWlrCuZ184GgMJcNQeNw7JOJSwgpN/x ayjIW7soCIXGrr8n8SESN2SVZpG6k7IBeOR/+M/CDs1ubedYcdjeZuGABgzumWumxa33 6ct8xAgBjemGonP4n8xZixpAYekFQyGJC2qamXgg1z0SY5EFUe7oiZZ+Zlv1WlrctjIr bMyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=f9VUMk2rfcDCKozLIVElNIzH5hKEWXos9AnWhgyiu+I=; b=0GA1ZIUAIIrWp+ZLuMORS7UyElf85k+LZlLvzY1Dqom2drvAHp/2JbEaQttcPtdxjO b0Awdt8Qd9V5E66qLACL6TyHe2dH42gckp0QUlvnZ3jkpPNf2YUpAPA5ns1f9WqRhFYl tTJ9ygYUPJsYLcWu+UkVZFjqaHWp9iq9gB4Wjzu9XXHCxJloJxB6B8yJA8dnlJrIwIIJ n4JWqTyE454Q4m5FUqQymCUK17uhxQRNW6Zytlh8O+EH2I9KXg3mf0/xbxLF3NAYZJsp BLpUHmVHF1zcCTQ4fpcGwo+In4pnQr4gq+E4OVlQBpla07IiSVPHUqoBMA1YFjgYLcqy OEdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BQIo366f; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si5988374edg.380.2020.04.19.05.06.16; Sun, 19 Apr 2020 05:06:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@kernel.org header.s=default header.b=BQIo366f; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725987AbgDSMDJ (ORCPT + 99 others); Sun, 19 Apr 2020 08:03:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:46508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725841AbgDSMDJ (ORCPT ); Sun, 19 Apr 2020 08:03:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 EEB2F21841; Sun, 19 Apr 2020 12:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587297788; bh=x2vOiaCnxxSwfQdLjmqVJM8lbr3nu9ilx4uLADcHgbI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BQIo366fubUyRRR8gy2ghwhRQu0Kwnh4p0dbM2JbxKVFUDW8yZ1SDgiYSl5JqwVeR wZ5SL8Ku8jXAHvkI6SEOWx2BKIwYfUnNkbRnpiO/xRR81S6FYbEAx2Q4OceLmb8Ctn LwJSFTVsq/8XLc3RC94BktgRcZXJ/hdv3QPM50lA= Date: Sun, 19 Apr 2020 14:03:04 +0200 From: Greg Kroah-Hartman To: Linus Torvalds Cc: Joe Perches , Rafael Wysocki , Randy Dunlap , Matthew Wilcox , Linux Kernel Mailing List , Andrew Morton , Alexander Viro , linux-fsdevel , Dmitry Torokhov , linux-input@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , "open list:NFS, SUNRPC, AND..." , Johannes Berg , Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm , "Martin K. Petersen" , linux-scsi , target-devel , Zzy Wysm Subject: Re: [PATCH 7/9] drivers/base: fix empty-body warnings in devcoredump.c Message-ID: <20200419120304.GA3668771@kroah.com> References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-8-rdunlap@infradead.org> <20200418185033.GQ5820@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sat, Apr 18, 2020 at 12:15:57PM -0700, Linus Torvalds wrote: > On Sat, Apr 18, 2020 at 11:57 AM Joe Perches wrote: > > > > sysfs_create_link is __must_check > > The way to handle __must_check if you really really don't want to test > and have good reasons is > > (a) add a big comment about why this case ostensibly doesn't need the check > > (b) cast a test of it to '(void)' or something (I guess we could add > a helper for this). So something like > > /* We will always clean up, we don't care whether this fails > or succeeds */ > (void)!!sysfs_create_link(...) > > There are other alternatives (like using WARN_ON_ONCE() instead, for > example). So it depends on the code. Which is why that comment is > important to show why the code chose that option. > > However, I wonder if in this case we should just remove the > __must_check. Greg? It goes back a long long time. Yeah, maybe it is time to remove it, the gyrations people go through to remove the warning when they "know" they are doing it right feels pretty bad compared to forcing people to check things for "normal" calls to the function. thanks, greg k-h