Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2494761imm; Mon, 28 May 2018 09:08:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq++STaGn5o0MK8hhoc9A1jD+RHNmxnH+5tZW6kKtNYgJgQ6bvluB1KHqkiX2l05LbCo/6a X-Received: by 2002:a62:6c3:: with SMTP id 186-v6mr13927081pfg.151.1527523739690; Mon, 28 May 2018 09:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527523739; cv=none; d=google.com; s=arc-20160816; b=f7K/IGdNuqLMfTxGm9/Eu2MIl9ca5Y7GYGyOEzl9uLJeBHB6JeDI4H2gqNOfiTy0uh N/PKVrXKhQlJXbFByEuSe9h13sd38izhNyoS3DqrZN5Oig8OqoKHt8EcCN0cZW2tDmbZ NoV4u0tF2fLro6TxPeE8R8FTCKj9YgVr59YAbFvtgIMHEIgb789VbcazwVzAspJnPNDI p699eVZFl/7UoRUOPoTa2UtsN9QKN+Ob3kCKOCFgyD0cVl6Blf/jsjhMlHZFFJne4vpT 807kNJerEdrmLDvwDCPfnN8AaF0qO7obLUGGlMmOLAuBbiVDTDnYYks3XpTjWDU6DuDj coqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JoPbebWYyH872PFziGi94W+ayCmMus4qolPx6DdpPzY=; b=qxhTwBX8Umz6/JOYc9KXEADSrUmdMJ4FfkU2cgHhN1y+HoWwSfltvU9Qj8xYOh/WZt VH/e099juetfRjzNBE2YUdJvnk213KcQLA5YC24vO3JKAHa2I5eGM6hMfLA9F1F5cFR5 fKFytd4B+uKrx8F/zYfc9ew7bSnTfiHVTfoBvsWnz0TXrewLu9pdGGp4heZeGRymc9rK wmIgRUy1bNNlzpv9AI5hZIQyxsA3ucshV15KxiPuB3KDqQ+Iq/2CZI8yOfsJhrFPe4o+ JxgYAunp+bNz1uzK9gCaySvLJJfj8NGjBxoTvthcbhH0/KtF9sagdcZh5mJLVD3T5hTb jltw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8-v6si18442951pge.271.2018.05.28.09.08.44; Mon, 28 May 2018 09:08:59 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936445AbeE1QII (ORCPT + 99 others); Mon, 28 May 2018 12:08:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:48419 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933203AbeE1QIC (ORCPT ); Mon, 28 May 2018 12:08:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 83A87AB4B; Mon, 28 May 2018 16:08:00 +0000 (UTC) Date: Mon, 28 May 2018 08:51:12 -0700 From: Davidlohr Bueso To: Herbert Xu Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org, tgraf@suug.ch, manfred@colorfullife.com, guillaume.knispel@supersonicimagine.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 1/6] lib/rhashtable: convert param sanitations to WARN_ON Message-ID: <20180528155112.iqsw6x3cdy5piaro@linux-n805> References: <20180524211135.27760-1-dave@stgolabs.net> <20180524211135.27760-2-dave@stgolabs.net> <20180528094048.etqeu2ubc227qrxf@gondor.apana.org.au> <20180528131209.mt4ythkapvfvykc7@linux-n805> <20180528155414.mbwyldat7mn6ro2j@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20180528155414.mbwyldat7mn6ro2j@gondor.apana.org.au> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 May 2018, Herbert Xu wrote: >On Mon, May 28, 2018 at 06:12:09AM -0700, Davidlohr Bueso wrote: >> >> Well, I don't really _want_ them; nor does the ipc code which already >> does a WARN_ON() (but that goes away in future patches). What I want >> is to get rid of the return path. So I don't really care if we convert >> them to WARN or remove them altogether. Would you be happy with the >> later? > >It has nothing to do with the error return path. Assuming you >remove the allocation failure path, then this error path can never >trigger for *your* use-case. Why would this be triggered by any use case if the developer setup the params correctly...? I don't see the point of not getting rid of the EINVAL or wrapping around warning around it. Ultimately it would be good to just have rhashtable_init() return void.