From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754432AbdLFJdt (ORCPT ); Wed, 6 Dec 2017 04:33:49 -0500 Received: from fallback6.mail.ru ([94.100.181.147]:37422 "EHLO fallback.mail.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753998AbdLFJdp (ORCPT ); Wed, 6 Dec 2017 04:33:45 -0500 Subject: [PATCH] staging: lustre: Fix sparse, using plain integer as NULL pointer in lov_object_fiemap() To: "gregkh@linuxfoundation.org" Cc: "Dilger, Andreas" , "Drokin, Oleg" , "jsimmons@infradead.org" , "lustre-devel@lists.lustre.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" References: <7A48E652-421B-464B-AD2A-C3D5613B48E5@intel.com> <20171206085303.GA18289@kroah.com> From: Andrii Message-ID: <3fe7db15-2dde-a697-0897-9e70fb9f7e70@mail.ru> Date: Wed, 6 Dec 2017 11:33:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171206085303.GA18289@kroah.com> Content-Type: multipart/mixed; boundary="------------7D7533EFD76F5DF2239C8FDC" Content-Language: en-US X-7FA49CB5: 0D63561A33F958A5FCD1B7FD16F43BD9A9037EA1706CC68CF94BCAF8487875F4725E5C173C3A84C37795E77BD711CB35B8AAB3140A3922EE3218473BE5707D41C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0FE4D3FA91A993F3A7574AF45C6390F7469DAA53EE0834AAEE X-Mailru-Sender: 4B400B7AF4454C3CF4F873E39CA59CE08144E3C455777BDA94AC240082C5D496E4F79E47D9F83B5DC26893093509CA89C77752E0C033A69EB3B202C14FA8F70A654C9FBB21AD9D583453F38A29522196 X-Mras: OK X-Mras: OK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------7D7533EFD76F5DF2239C8FDC Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 --------------7D7533EFD76F5DF2239C8FDC Content-Type: text/plain; charset=UTF-8; name="task16.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="task16.patch" 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) --------------7D7533EFD76F5DF2239C8FDC--