Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423663AbbFEOZG (ORCPT ); Fri, 5 Jun 2015 10:25:06 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36588 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423624AbbFEOYj (ORCPT ); Fri, 5 Jun 2015 10:24:39 -0400 Date: Fri, 5 Jun 2015 23:24:31 +0900 From: Tejun Heo To: Rusty Russell Cc: Louis Langholtz , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: kernel/params.c: 'err' variable "set but not used" and perhaps should be? Message-ID: <20150605142431.GB4444@mtj.duckdns.org> References: <87vbf628uy.fsf@rustcorp.com.au> <7E8FFE0D-B9F7-4816-8ECF-2AA5980F3890@me.com> <20150603202237.GI20091@mtj.duckdns.org> <87eglsuujn.fsf@rustcorp.com.au> <20150604021935.GN20091@mtj.duckdns.org> <878ubzuuhe.fsf@rustcorp.com.au> <20150604203034.GS20091@mtj.duckdns.org> <87oakvt2da.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oakvt2da.fsf@rustcorp.com.au> 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: 938 Lines: 27 Hello, Rusty. On Fri, Jun 05, 2015 at 10:09:29AM +0930, Rusty Russell wrote: > What will a second warning which is never triggered achieve? A bit of How do you know that tho? Somebody may change something in the module code, kernfs or sysfs and break something in an unexpected way. We've always used BUG_ON() in __init functions to annotate things which shouldn't fail. > code bloat and confusion, when I really do want to ignore the value. BUG_ON()s are very light weight, __init code gets dropped once done, and this is an established way of annotating operations which aren't expected to fail. I'm having a hard time understanding the point of this thread. :( 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/