Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3112035imm; Fri, 10 Aug 2018 04:05:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxAqLxJCDIX8QCABvHp9VrfeQ7sG7pn4XfIii3XK4jWF9thDcogyQIDw+2NUHXgGDVmS1pc X-Received: by 2002:a62:6f87:: with SMTP id k129-v6mr6644666pfc.26.1533899139917; Fri, 10 Aug 2018 04:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533899139; cv=none; d=google.com; s=arc-20160816; b=nh9OhkE05oPh3m4Bxr1GkqSJ3TH9HoqK+sD5PujG21ZN++WOWlbKz+qRkFdlxJd4mL 0dUvwKtydtEdea6hure/CjWuNXgaUmtyGgMWjBkbwS9zTidFkQn5TVWbmkKjPPc9N3cM LHAEdtVGZq0sD72Bxln3E0BHdwCx3tuVQ5vlkw5xHvlUiaUHLhSarridoi43l7kyReKk 34Dh9KSXoUOP4ZfnDjIjxOYhC7fadyCNfCet7OLM3LRjbvdIR4cJ4Hx1/IsxxHPdA3+2 da6rvTRsnKN9PkuuuULBRI7j5o6mlgFBFNtWiYmJ2u3dcfMjsU2pSOHxH3ieoX0niw3e XDHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=HdWEbC5MNlUAWSOuaTtiyTEsb0MFuFSQzeIXMyo6x78=; b=aCkxRZHylOYZ8Bxh+E1N8NAk3wZVGEM6DcX8O1uBM6DQR0dnCt9jgPVaAKU3LC1UXy ue3MpD/R69JRsLSTxqaHOc/6vEa0XOFxl7kFHPvOQAG6MQHfI56nsx/LGYW8hSGmaESC JRi6trFiIXTsAb0gfs4mfdzfpFML10kSyN8H/YqcIZ17zNAfU2iK1myW/FoCuujUU6Od yXL8DVNi+TXkIgtqpqDfTkhfuLGZGkS2f82KtBWqFfW3fVcbM3NN5okfcnqbb6Hv4NPw H0KM47IjrrIzgW4uMRVP+XN6VD7Rptmr7/rLxFiYUUdwPMpuy0fYf2ug6H3LwSDFw5IR qEGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lOUX2qTz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b129-v6si9852925pfa.12.2018.08.10.04.05.24; Fri, 10 Aug 2018 04:05:39 -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=@gmail.com header.s=20161025 header.b=lOUX2qTz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbeHJN3U (ORCPT + 99 others); Fri, 10 Aug 2018 09:29:20 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:37143 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbeHJN3U (ORCPT ); Fri, 10 Aug 2018 09:29:20 -0400 Received: by mail-it0-f68.google.com with SMTP id h20-v6so2086670itf.2; Fri, 10 Aug 2018 03:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HdWEbC5MNlUAWSOuaTtiyTEsb0MFuFSQzeIXMyo6x78=; b=lOUX2qTzrsFi2ok/QJyhK1pssq5ZWff9srOoSWO2YsyFhr69B/NrJrTcpo/jS3jhOm 3JEJyFXHUW5+midYEXX7B6bmeQT5mLh5qKaKYxs9WVYOOPIYby/6nUhGr3awAsNXRzoB QEa8QACTuuQ1cXB1+ElqFJdg4u5bSZQ15udSaEz4LvFlTIpZMvvOTCtmw2/d9RRJg96J td+2Yjpgx3ZXk2l9+QMFkNNI2qbYsjaxhPiKfDZVjZ5eWOOgj48ZqPrSsGrEGbiJSPBr 8yCKIlmBOoC9emAl2fDDu6/evS7cleSOLNyFsk0URjubJP5NoL100Av2VCVxKAZrpHEr KhZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HdWEbC5MNlUAWSOuaTtiyTEsb0MFuFSQzeIXMyo6x78=; b=Bc3XndMKZfG1nQuxjfsPPPa20AgjC/4TaHHtnUpYlxOqSNkbrd9NA/yP9feqFgHQ+O tUKD4TdYTQOHccXwFehpuUipRYBL47Bw3sfOKGgew2PyI0uroEhPEOSlRXZXPZ3ojMe/ Bsd0r0GRC8FrWLAHL+FNEvsTi+s3JdoJ55/2WFWQ/6SopFbv0yOhlNlH34QJM6VQsp0u cdhUiKQrEtT9ybmpYNnzMmEA3wDCIHUa37Pe1l68eXiZFOmsle343zcgoxoedKVr/eif qgTUSPb/1S7yHtOURsq4i5Ugx7EerIGXgnIHfI/ViL4s8scopEF+KnzFBbdvexOQAd4G zVIA== X-Gm-Message-State: AOUpUlFnR7iDe/odNXE5Yq0vHjYFRTeiHiDHL8iYhFjLbb9WEtumGCi1 hS17Dtm0NVFqQtwyTkrkyYuKeEn7evCNKdOtAJM= X-Received: by 2002:a24:5d4a:: with SMTP id w71-v6mr1803061ita.118.1533898794740; Fri, 10 Aug 2018 03:59:54 -0700 (PDT) MIME-Version: 1.0 References: <20180808115257.6088-1-yuehaibing@huawei.com> In-Reply-To: <20180808115257.6088-1-yuehaibing@huawei.com> From: Ilya Dryomov Date: Fri, 10 Aug 2018 12:59:43 +0200 Message-ID: Subject: Re: [PATCH net-next] crush: fix using plain integer as NULL warning To: yuehaibing@huawei.com Cc: "David S. Miller" , linux-kernel@vger.kernel.org, netdev , "Yan, Zheng" , Sage Weil , Ceph Development Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 8, 2018 at 1:53 PM YueHaibing wrote: > > Fixes the following sparse warning: > net/ceph/crush/mapper.c:517:76: warning: Using plain integer as NULL pointer > net/ceph/crush/mapper.c:728:68: warning: Using plain integer as NULL pointer > > Signed-off-by: YueHaibing > --- > net/ceph/crush/mapper.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c > index 417df67..3f323ed 100644 > --- a/net/ceph/crush/mapper.c > +++ b/net/ceph/crush/mapper.c > @@ -514,7 +514,7 @@ static int crush_choose_firstn(const struct crush_map *map, > in, work->work[-1-in->id], > x, r, > (choose_args ? > - &choose_args[-1-in->id] : 0), > + &choose_args[-1-in->id] : NULL), > outpos); > if (item >= map->max_devices) { > dprintk(" bad item %d\n", item); > @@ -725,7 +725,7 @@ static void crush_choose_indep(const struct crush_map *map, > in, work->work[-1-in->id], > x, r, > (choose_args ? > - &choose_args[-1-in->id] : 0), > + &choose_args[-1-in->id] : NULL), > outpos); > if (item >= map->max_devices) { > dprintk(" bad item %d\n", item); Applied. Thanks, Ilya