Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp729390imm; Wed, 8 Aug 2018 04:54:32 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzVTqCF6mCD8E96p2VjCerqtvRSRaI3WM35Oeg3VsZ3tVL3mWHAP0MR6RVbIOgN1yPu3LCX X-Received: by 2002:a63:5d09:: with SMTP id r9-v6mr2255085pgb.303.1533729272324; Wed, 08 Aug 2018 04:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533729272; cv=none; d=google.com; s=arc-20160816; b=QtaKds5c5zDApbhqjSscEKYlqeDlRduhBJux9m4FZq2866nLjRKGO6P18czueS1fUu d0jkwkjS7+b4EUtFPYsIRtXOacmn6F9WnIb99PFKGgtywKI4HkH84LIrNJjygVYDbPgw lQyWGhGNbNxkGtRZgcFo3RoW5ELMGbBFEM67FM0v94+u+OEOt4hyygedVVT3umCvov4B YOMMzWltcawzOPdaDB8bLRj8wNc7Dt2Z0lTbwtGXfyy3GJO1prf/FBS1Z02uCw0Cuj/X jnrSMikkXJmNvJ+Drya9Q2HE/idrxL8wKhF5OpR4UcjL925QbdmOTlH8M8IDEkicuO3b n/jA== 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:subject:cc :to:from:arc-authentication-results; bh=/49clUC+u2KaVdh4VxGnTE2S+oriF34IbuUSz6Bd+Vs=; b=E+b/hdM8B/X3wYKQmrfqm6ml52vgZoG9YyT+Ha7wXEp2XTMnFFmV9IxcDRquC8HkDI 6X0bClM/LLs5Vu5UbvCF6dBsXTSVcNXvdniYu2Eljx9G4LuC/iO3c7tHBsLl2RrnTO8C yLcJt1HBQLHcHc2tL0+nZkg71pHI84nkcE5FqUTihxnmS2wt7pOkogKFhZHcp4/ChDL9 MdbGOhBlAWdX8xEZJdF9BhDB1/nakzvNpekgeczQFiQ6WcVo7gcuvvSh+4blvdRHxI4D HyAqkQu9NmVbRVQ/rx4TQnm4z2e4t0ptpQ3Dsc1Fnv+E4DeVdNvKu3k3Ln4zGAFYSWdU C0lg== 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 f28-v6si4563840pfh.33.2018.08.08.04.54.17; Wed, 08 Aug 2018 04:54:32 -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 S1727123AbeHHOMp (ORCPT + 99 others); Wed, 8 Aug 2018 10:12:45 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:53933 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726733AbeHHOMo (ORCPT ); Wed, 8 Aug 2018 10:12:44 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7C166AACD3145; Wed, 8 Aug 2018 19:53:18 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.399.0; Wed, 8 Aug 2018 19:53:13 +0800 From: YueHaibing To: , CC: , , , , , YueHaibing Subject: [PATCH net-next] crush: fix using plain integer as NULL warning Date: Wed, 8 Aug 2018 19:52:57 +0800 Message-ID: <20180808115257.6088-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.7.0