Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbbFHA7I (ORCPT ); Sun, 7 Jun 2015 20:59:08 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34262 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbbFHA66 (ORCPT ); Sun, 7 Jun 2015 20:58:58 -0400 Date: Mon, 8 Jun 2015 09:58:48 +0900 From: Tejun Heo To: Linus Torvalds Cc: Louis Langholtz , Linux Kernel Mailing List , trivial@kernel.org, Rusty Russell , Andrew Morton Subject: Re: [PATCH] kernel/params.c: make use of unused but set variable Message-ID: <20150608005848.GA21465@mtj.duckdns.org> References: <1433721270-9182-1-git-send-email-lou_langholtz@me.com> <20150608000007.GA3543@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 21 On Sun, Jun 07, 2015 at 05:17:20PM -0700, Linus Torvalds wrote: > At most, it could be a "WARN_ON_ONCE()". Maybe even just silently > ignore the error. But BUG_ON()? Hell no. Yeah, WARN_ON_ONCE() is the right one. The short history here is that sysfs_create_file() has __must_check on it which triggered this whole discussion. The rationale for having __must_check on the function was that the function's failure leads to userland visible behavior difference and it's very inviting to skip error handling on the function as file creation is often the last operation to be performed with no further dependency on it. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/