Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1436951yba; Sat, 6 Apr 2019 12:15:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx837ws05lumJutSLbIjPQE7i9FV+nnLM1tiBx7xME+S7jIFFEtJHjI6gN7bN9x8i8q6tuV X-Received: by 2002:a17:902:7893:: with SMTP id q19mr20497655pll.154.1554578121328; Sat, 06 Apr 2019 12:15:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554578121; cv=none; d=google.com; s=arc-20160816; b=N71HMxE8DK4/1DgsYerFTcO4rL5X5Y2fIiL/lH+k2kM2kkHl7MjbP9Z0FAmIzccTqy 4wwevS7fpUtzykem21DB7n1h7cV0sx7gJzMsl6OmKJIWwmLtUi3L3wLqHgbzJOzShnp6 +nbSSbv24CO4qDIQT78SsLcSQ80dW69HnARst2yzHarLzmxCW5bgABwjn0dhDZGf4cHb xyI/qPNyxcrzMG6DWgcSVhDvHJG1/0qxMuUtjg3hjd9iCulgtk3F/HERtNpIrXsqsa/r LJ2MdqUFwrQJkY58Mk+MJQ+rEhrJemLvjSEy855ejcOpZZyvYAiquixm3zgyQmz1rbfr 54dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dmarc-filter:dkim-signature :dkim-signature; bh=9LQQGAISqnI5HtrvZWKXvFfNPFYYAS9hj5b9tAIU0l8=; b=OHx9xPImW8ycsJDZWiYcN2DBQVme4pRV/UOqiWd9DRDpwfIEDR1KoTqRgJfnamS3r6 UxuieavWbB4SQvVlzI2mEUoIxliIiE+FkiNBDazEsY7Zfr2jyoma4E8gP9PQMYU6oDwQ +4NTVsSeNOKA5/OdwQ6DZXQQgbyE0xYx+OXM/KRggQ+B9CluvvaDGRU1klY6k8k/7w4O AlQrZaazKJ7f15OJgj5weJadPLpzDwNV5skZSyaPvpXegzSBdYH7Tuuf5K/VXV9u7Kaa wmLoDljrAyfbR9G8PZjk6p6bPW9smPhWe4Wlksc7JcYfHxTBgbr6sZ3ZeHhe9fYfKch2 WkFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HhKE9HBg; dkim=pass header.i=@codeaurora.org header.s=default header.b=HhKE9HBg; 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 v124si21644657pgb.475.2019.04.06.12.15.05; Sat, 06 Apr 2019 12:15:21 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=HhKE9HBg; dkim=pass header.i=@codeaurora.org header.s=default header.b=HhKE9HBg; 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 S1726638AbfDFTNH (ORCPT + 99 others); Sat, 6 Apr 2019 15:13:07 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:39206 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726427AbfDFTNH (ORCPT ); Sat, 6 Apr 2019 15:13:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9EEE360ADE; Sat, 6 Apr 2019 19:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554577986; bh=HpCdy244h/aIhd5jVZu04Iy8ZH8g0VAh+n7/UMhtaVQ=; h=Subject:To:References:From:Date:In-Reply-To:From; b=HhKE9HBg3PmrNO2WKoOV8yB1yW3OAnUjwLG9qBDep8AyDcVi+2FpleSS2daU5gE1o VYk+tP+dUNetaJ2NQTZwLk6Ze1+gx5XVGwMcgvZXT9FfPJC2ri1yqECXK8lfwNyueN 7N3PQOmkiZwSR5JD7LBiajrO0tL9Ru9+QdrNQ04s= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.79.171.6] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mojha@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EA29560A42; Sat, 6 Apr 2019 19:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554577986; bh=HpCdy244h/aIhd5jVZu04Iy8ZH8g0VAh+n7/UMhtaVQ=; h=Subject:To:References:From:Date:In-Reply-To:From; b=HhKE9HBg3PmrNO2WKoOV8yB1yW3OAnUjwLG9qBDep8AyDcVi+2FpleSS2daU5gE1o VYk+tP+dUNetaJ2NQTZwLk6Ze1+gx5XVGwMcgvZXT9FfPJC2ri1yqECXK8lfwNyueN 7N3PQOmkiZwSR5JD7LBiajrO0tL9Ru9+QdrNQ04s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EA29560A42 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mojha@codeaurora.org Subject: Re: [PATCH] kernel: pid_namespace : fix warning Using plain integer as NULL pointer To: Hariprasad Kelam , "Eric W. Biederman" , Thomas Gleixner , linux-kernel@vger.kernel.org References: <20190406104828.GA26135@hari-Inspiron-1545> From: Mukesh Ojha Message-ID: <9af19729-cd8a-c3ec-6e89-1696f338c5c1@codeaurora.org> Date: Sun, 7 Apr 2019 00:42:56 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190406104828.GA26135@hari-Inspiron-1545> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/6/2019 4:18 PM, Hariprasad Kelam wrote: > changed passing function argument "0 to NULL" to fix below sparse > warning > > kernel/pid_namespace.c:55:76: warning: Using plain integer as NULL > pointer > > did changes to avoid checkpatch error "prefer a maximum 75 chars per > line" > > Signed-off-by: Hariprasad Kelam Reviewed-by: Mukesh Ojha Cheers, -Mukesh > --- > kernel/pid_namespace.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c > index aa6e72f..6e4afdc 100644 > --- a/kernel/pid_namespace.c > +++ b/kernel/pid_namespace.c > @@ -52,7 +52,8 @@ static struct kmem_cache *create_pid_cachep(unsigned int level) > mutex_lock(&pid_caches_mutex); > /* Name collision forces to do allocation under mutex. */ > if (!*pkc) > - *pkc = kmem_cache_create(name, len, 0, SLAB_HWCACHE_ALIGN, 0); > + *pkc = > + kmem_cache_create(name, len, 0, SLAB_HWCACHE_ALIGN, NULL); > mutex_unlock(&pid_caches_mutex); > /* current can fail, but someone else can succeed. */ > return READ_ONCE(*pkc);