Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp955253ybg; Mon, 1 Jun 2020 20:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwp6JnBR5eDqmc5OVn+jbBMPrpyARLWJ5bpS7BjQEQcDOkaWjiFqveFp65FUAI3HYadmVvf X-Received: by 2002:aa7:d05a:: with SMTP id n26mr25664840edo.173.1591066863011; Mon, 01 Jun 2020 20:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591066863; cv=none; d=google.com; s=arc-20160816; b=ez/EI0Ozj9Dj0Xn6EY/AUaq4ocW81+0vMb8zd76um5Q6Zq9Bo343SruAhEh444hDD8 TThpoxhrJR0IS35fzUpdn9P1XDnyE+4PcMRe7MEicesZLJKM6SsM8wZ36Y+onklKPsLQ VRD8pR3yaS0LuPm+hR4tsQpm9lXkfEO02Zk3n1syp6EIyuYpviRMBLrGTOHD7aA/xrrq 7ZgSanMTd2mgnndOBXDGWuD6w7f4rA8FY9fPoZmeuyE8aJHeQTromsJqlIRxUMBimlEI ZIoAFyAWpsE1lxsiNaQyfDxWNuGE8aiRnoMOGQ7V9uglfLm7OufXmJuac4qrZeFv4r7L yyQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=YCwgkBAIWR9lwcZTT3gJGRHrETSDKFKv9oHQKKerD1g=; b=pe28Mf/DatZoj02tz+tXnZV5wFaB/L2IjyQnhvVioOIhT6lMCeMsjKIEQaCYMqd/yb pP0FXaXWUl7DJsJOzJEmfGHEAb7N+z384addDelU/tH4Zl6/mngsh6bX0y09GYlTVlJI rGCz0ltf+J2i7c+Gim9M7JKbCAVqvrGpkrdqyry0srgn6l6yv8G9wTvxYe5t/GZz52h7 1eEwkUa0Gm3isQNgSzpZTTj9Q/vr8a1VP6OZwYliRNdBI93zzcqPd6pkFJWHEeDeJQrM hPGawHfEp14o59xWHBnX2ffA/+o8E2eWkXTvxu6JTBdrBEZrMcVb1KoudpdZe6oWvXH/ E7Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="hbBdgWq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 g23si680351ejh.337.2020.06.01.20.00.39; Mon, 01 Jun 2020 20:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ellerman.id.au header.s=201909 header.b="hbBdgWq/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726516AbgFBC44 (ORCPT + 99 others); Mon, 1 Jun 2020 22:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726232AbgFBC4y (ORCPT ); Mon, 1 Jun 2020 22:56:54 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 848BCC061A0E; Mon, 1 Jun 2020 19:56:53 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49bcBn3GWMz9sSg; Tue, 2 Jun 2020 12:56:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1591066611; bh=YCwgkBAIWR9lwcZTT3gJGRHrETSDKFKv9oHQKKerD1g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hbBdgWq/e1Emt3gRHmqD91+k4UdRYjXCpeFqENlHwoArQaV+KU7uWGLPbrf5+6Trr Fqj/ynRGm/Lfi0OnBPtSJmw41FmwJq9Imu80idpvhtdRhtX7lStU/LJAP5M5khPQm+ 8+MwVX42mFeaetY8yuod+gPeLHl9z0gsE04oJor+DF3BIskjXraOCLxzzxpLOfLNPz gK6Rxx4IzvN8CZnX4iVw2uflA+suvEVTUjyGExPXzSPZ5/WPxVL7RMquIsh75zaXsl CoF+zwYUD2yso3mE3N7oW9Yb61Shiw7rcqu1KRC4WQfh4f7qyw5k4uPG1PNvvl3tzt jmTVNMdNqKBag== From: Michael Ellerman To: Markus Elfring , Liao Pingfang , linuxppc-dev@lists.ozlabs.org Cc: Allison Randal , Anton Vorontsov , Benjamin Herrenschmidt , Colin Cross , Greg Kroah-Hartman , Kees Cook , Paul Mackerras , Thomas Gleixner , Tony Luck , Wang Liang , Xue Zhihong , Yi Wang , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] powerpc/nvram: Replace kmalloc with kzalloc in the error message In-Reply-To: References: Date: Tue, 02 Jun 2020 12:57:11 +1000 Message-ID: <87imgai394.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Markus Elfring writes: >> Please just remove the message instead, it's a tiny allocation that's >> unlikely to ever fail, and the caller will print an error anyway. > > How do you think about to take another look at a previous update suggestion > like the following? > > powerpc/nvram: Delete three error messages for a failed memory allocation > https://patchwork.ozlabs.org/project/linuxppc-dev/patch/00845261-8528-d011-d3b8-e9355a231d3a@users.sourceforge.net/ > https://lore.kernel.org/linuxppc-dev/00845261-8528-d011-d3b8-e9355a231d3a@users.sourceforge.net/ > https://lore.kernel.org/patchwork/patch/752720/ > https://lkml.org/lkml/2017/1/19/537 That deleted the messages from nvram_scan_partitions(), but neither of the callers of nvram_scan_paritions() check its return value or print anything if it fails. So removing those messages would make those failures silent which is not what we want. cheers