Received: by 10.223.185.116 with SMTP id b49csp6027919wrg; Wed, 28 Feb 2018 02:45:41 -0800 (PST) X-Google-Smtp-Source: AH8x224ioYwJ1Y1jTXLa97E+vLNX1p148KuHcLz1LWsQUMX1TDj6WHPYEIwLAI7BmpMrVpybEcLP X-Received: by 2002:a17:902:7789:: with SMTP id o9-v6mr17881487pll.422.1519814741591; Wed, 28 Feb 2018 02:45:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519814741; cv=none; d=google.com; s=arc-20160816; b=e31JRWT5uIEoCOYM8r3YV4uRmHb3inAihPPLyXkmtwj/h8jIS8gLj27vMNj6MLGYwT YZujPc07c4E2ziDLZYzKcCd/0vdMfs8PP3PQ8rGWcT3u4Q06Njw0Eegm+ZJSZIvKvh/x urajZqO+MdTK8a9mb3NLktPqEe8EqoYmBHysP8xy47GOrsYCocPGTGnqb+yqPT96+QQH lF2apNidIfkYIvW56/llmqKxJ/b6orrWUOpF8gs3NVeC8nWSD4IEC11osa0t9MfVruIt aD8g4rf5qyjOLdQ//ZNxcOJBXHblCe9XaVBpVG2AC/sOq1Uv4SM44/jF8PLo2aJ0Fl4I iKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=C7CPwRGX8xkIJb0OnKeMMYVlzETWBgieC5EjeO5fJTo=; b=ketgKDZhWtHfyAO/oZJgckrZH3njreENTuImOe8zsVhMs4tFNrOzc1UK0B9zkCdUyH OK4HUV7I2GyvAW2N5qoIJ/w2MNHL1WHbduig94/qS+2dphKdHa1It5C6nfg05IzuiWfA IE6wpZtuV/qiTlJmmmETQL2xFXzRDn03/F0RN5pSAt2TEN5Vkfic9N8OrLDhvca98NTd YiiumXDZqUf82FxaNPw3G4yay14R+98/hB1CSLUnD4UafGpkJjwWKTmKORp6GukiJueP 9Fe6ZbMA3S595v2QWQ95FoaeNY6eupM5YceHQVLQvdliYlkZIemUa/twxKwR6lzg5XgV mH7g== 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 18si1042681pfh.118.2018.02.28.02.45.24; Wed, 28 Feb 2018 02:45:41 -0800 (PST) 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 S1752501AbeB1Koc (ORCPT + 99 others); Wed, 28 Feb 2018 05:44:32 -0500 Received: from mga01.intel.com ([192.55.52.88]:17397 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299AbeB1Kob (ORCPT ); Wed, 28 Feb 2018 05:44:31 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2018 02:44:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,405,1515484800"; d="scan'208";a="20791509" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by fmsmga007.fm.intel.com with ESMTP; 28 Feb 2018 02:44:28 -0800 Message-ID: <1519814668.10722.268.camel@linux.intel.com> Subject: Re: [PATCH v2 8/9] lib/vsprintf: Remove useless NULL checks From: Andy Shevchenko To: Petr Mladek Cc: "Tobin C . Harding" , linux@rasmusvillemoes.dk, Joe Perches , linux-kernel@vger.kernel.org, Andrew Morton , Michal Hocko Date: Wed, 28 Feb 2018 12:44:28 +0200 In-Reply-To: <20180228100437.o4juwxbzomkqjvjx@pathway.suse.cz> References: <20180216210711.79901-1-andriy.shevchenko@linux.intel.com> <20180216210711.79901-8-andriy.shevchenko@linux.intel.com> <20180227155047.o74ohmoyj56up6pa@pathway.suse.cz> <1519752950.10722.231.camel@linux.intel.com> <20180228100437.o4juwxbzomkqjvjx@pathway.suse.cz> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-02-28 at 11:04 +0100, Petr Mladek wrote: > On Tue 2018-02-27 19:35:50, Andy Shevchenko wrote: > > On Tue, 2018-02-27 at 16:50 +0100, Petr Mladek wrote: > > > On Fri 2018-02-16 23:07:10, Andy Shevchenko wrote: > > > > > > > > > > This macro matches also values <= 16. > > > > Yes, I know. > > > > This had been discussed with Rasmus and we agreed that printing a > > result > > of kmalloc(0) is rather weird. > > I see > https://lkml.kernel.org/r/1500546142.29303.133.camel@linux.intel.com > There you suggested to move this check into pointer(). But I do not > see any agreement on this. > Btw, I'm pretty sure that the checks like this or another one with PAGE_SIZE is cargo cult programming rather than imaging possible so weird use cases. -- Andy Shevchenko Intel Finland Oy