Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754266AbdLFIxC (ORCPT ); Wed, 6 Dec 2017 03:53:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33148 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753859AbdLFIxA (ORCPT ); Wed, 6 Dec 2017 03:53:00 -0500 Date: Wed, 6 Dec 2017 09:53:03 +0100 From: "gregkh@linuxfoundation.org" To: Andrii Vladyka Cc: "Dilger, Andreas" , "Drokin, Oleg" , "jsimmons@infradead.org" , "lustre-devel@lists.lustre.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap() Message-ID: <20171206085303.GA18289@kroah.com> References: <7A48E652-421B-464B-AD2A-C3D5613B48E5@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 25 On Mon, Dec 04, 2017 at 12:44:32PM +0200, Andrii Vladyka wrote: > Change 0 to NULL in lov_object_fiemap() in order to fix warning produced by > sparse > > Signed-off-by: Andrii Vladyka > Signed-off-by: Andreas Dilger > --- > > diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c > index 105b707..897cf2c 100644 > --- a/drivers/staging/lustre/lustre/lov/lov_object.c > +++ b/drivers/staging/lustre/lustre/lov/lov_object.c > @@ -1335,7 +1335,7 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj, > int rc = 0; > int cur_stripe; > int stripe_count; > - struct fiemap_state fs = { 0 }; > + struct fiemap_state fs = { NULL }; > lsm = lov_lsm_addref(cl2lov(obj)); > if (!lsm) Patch is corrupted, and can not apply, please fix up your email client and try it again. greg k-h